@limetech/lime-crm-building-blocks 1.55.1 → 1.55.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/cjs/limebb-mention.cjs.entry.js +3 -3
- package/dist/collection/components/mention/mention.css +15 -25
- package/dist/collection/components/mention/mention.js +5 -2
- package/dist/components/limebb-mention.js +3 -3
- package/dist/esm/limebb-mention.entry.js +3 -3
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/p-6abd79e1.entry.js +1 -0
- package/dist/types/components/mention/mention.d.ts +3 -0
- package/package.json +3 -3
- package/dist/lime-crm-building-blocks/p-0b662fa5.entry.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## [1.55.2](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.55.1...v1.55.2) (2024-12-11)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
* **mention:** display the `@` as a pseudo element ([2d8c171](https://github.com/Lundalogik/lime-crm-building-blocks/commit/2d8c171e9ad789f8979f7994b4e56f9010cf2a69))
|
|
7
|
+
* **mention:** ensure long- or multiple words break into new lines ([6a683a4](https://github.com/Lundalogik/lime-crm-building-blocks/commit/6a683a4eed05c42c705d4afa1ce53add98542cb3))
|
|
8
|
+
* **mention:** transition background color on hover ([c52e24f](https://github.com/Lundalogik/lime-crm-building-blocks/commit/c52e24f1fdaff3ec6c3b2e71ad327b55e6fd08f6))
|
|
9
|
+
|
|
1
10
|
## [1.55.1](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.55.0...v1.55.1) (2024-12-10)
|
|
2
11
|
|
|
3
12
|
### Bug Fixes
|
|
@@ -30,7 +30,7 @@ function isShadowRoot(node) {
|
|
|
30
30
|
return (node === null || node === void 0 ? void 0 : node.nodeType) === Node.DOCUMENT_FRAGMENT_NODE;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
const mentionCss = ":host(limebb-mention){display:inline
|
|
33
|
+
const mentionCss = ":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}";
|
|
34
34
|
|
|
35
35
|
const Mention = class {
|
|
36
36
|
constructor(hostRef) {
|
|
@@ -74,10 +74,10 @@ const Mention = class {
|
|
|
74
74
|
return this.renderLimeObject(this.limeobject);
|
|
75
75
|
}
|
|
76
76
|
renderLimeObject(limeobject) {
|
|
77
|
-
return (index.h("a", {
|
|
77
|
+
return (index.h("a", { href: `object/${this.limetype}/${this.objectid}` }, limeobject.descriptive, this.renderSlot({ hidden: true })));
|
|
78
78
|
}
|
|
79
79
|
renderSlot(attributes = {}) {
|
|
80
|
-
return (index.h("span", Object.assign({}, attributes),
|
|
80
|
+
return (index.h("span", Object.assign({}, attributes), index.h("slot", null)));
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
83
|
Mention.style = mentionCss;
|
|
@@ -1,34 +1,24 @@
|
|
|
1
1
|
:host(limebb-mention) {
|
|
2
|
-
display: inline
|
|
2
|
+
display: inline;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
background-color
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
white-space: nowrap;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.mention-loading {
|
|
15
|
-
background-color: rgb(var(--color-green-default), 0.1);
|
|
16
|
-
color: rgb(var(--color-green-light));
|
|
17
|
-
padding: 0.125rem 0.25rem;
|
|
5
|
+
a {
|
|
6
|
+
transition: background-color 0.2s ease;
|
|
7
|
+
white-space: normal;
|
|
8
|
+
overflow-wrap: break-word;
|
|
9
|
+
word-break: break-word;
|
|
10
|
+
padding: 0 0.125rem;
|
|
18
11
|
border-radius: 0.25rem;
|
|
19
12
|
text-decoration: none;
|
|
20
|
-
|
|
13
|
+
color: rgb(var(--color-blue-default));
|
|
14
|
+
background-color: rgb(var(--color-blue-default), 0.06);
|
|
21
15
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
background-color: rgb(var(--color-red-default), 0.1);
|
|
25
|
-
color: rgb(var(--color-red-light));
|
|
26
|
-
padding: 0.125rem 0.25rem;
|
|
27
|
-
border-radius: 0.25rem;
|
|
28
|
-
text-decoration: none;
|
|
29
|
-
white-space: nowrap;
|
|
16
|
+
a:hover {
|
|
17
|
+
background-color: rgb(var(--color-blue-default), 0.16);
|
|
30
18
|
}
|
|
31
19
|
|
|
32
|
-
|
|
33
|
-
|
|
20
|
+
a:before,
|
|
21
|
+
span:before {
|
|
22
|
+
content: "@";
|
|
23
|
+
opacity: 0.7;
|
|
34
24
|
}
|
|
@@ -8,6 +8,8 @@ import { getElement, h } from '@stencil/core';
|
|
|
8
8
|
* been mentioned. The mentioned user descriptive should be added as a slot along with
|
|
9
9
|
* the limetype and object id of the mentioned user object.
|
|
10
10
|
*
|
|
11
|
+
* This component is internally used together with `limebb-text-editor` to
|
|
12
|
+
* render "mentioned" coworkers inside the `<p>` elements.
|
|
11
13
|
*
|
|
12
14
|
* :::note
|
|
13
15
|
* Platform will be fetched from the DOM if not supplied
|
|
@@ -15,6 +17,7 @@ import { getElement, h } from '@stencil/core';
|
|
|
15
17
|
*
|
|
16
18
|
* @exampleComponent limebb-example-mention
|
|
17
19
|
* @exampleComponent limebb-example-mention-with-invalid-object
|
|
20
|
+
* @exampleComponent limebb-example-mention-multi-lines
|
|
18
21
|
* @private
|
|
19
22
|
*/
|
|
20
23
|
export class Mention {
|
|
@@ -56,10 +59,10 @@ export class Mention {
|
|
|
56
59
|
return this.renderLimeObject(this.limeobject);
|
|
57
60
|
}
|
|
58
61
|
renderLimeObject(limeobject) {
|
|
59
|
-
return (h("a", {
|
|
62
|
+
return (h("a", { href: `object/${this.limetype}/${this.objectid}` }, limeobject.descriptive, this.renderSlot({ hidden: true })));
|
|
60
63
|
}
|
|
61
64
|
renderSlot(attributes = {}) {
|
|
62
|
-
return (h("span", Object.assign({}, attributes),
|
|
65
|
+
return (h("span", Object.assign({}, attributes), h("slot", null)));
|
|
63
66
|
}
|
|
64
67
|
static get is() { return "limebb-mention"; }
|
|
65
68
|
static get encapsulation() { return "shadow"; }
|
|
@@ -26,7 +26,7 @@ function isShadowRoot(node) {
|
|
|
26
26
|
return (node === null || node === void 0 ? void 0 : node.nodeType) === Node.DOCUMENT_FRAGMENT_NODE;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
const mentionCss = ":host(limebb-mention){display:inline
|
|
29
|
+
const mentionCss = ":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}";
|
|
30
30
|
|
|
31
31
|
const Mention = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
32
32
|
constructor() {
|
|
@@ -72,10 +72,10 @@ const Mention = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
72
72
|
return this.renderLimeObject(this.limeobject);
|
|
73
73
|
}
|
|
74
74
|
renderLimeObject(limeobject) {
|
|
75
|
-
return (h("a", {
|
|
75
|
+
return (h("a", { href: `object/${this.limetype}/${this.objectid}` }, limeobject.descriptive, this.renderSlot({ hidden: true })));
|
|
76
76
|
}
|
|
77
77
|
renderSlot(attributes = {}) {
|
|
78
|
-
return (h("span", Object.assign({}, attributes),
|
|
78
|
+
return (h("span", Object.assign({}, attributes), h("slot", null)));
|
|
79
79
|
}
|
|
80
80
|
static get style() { return mentionCss; }
|
|
81
81
|
}, [1, "limebb-mention", {
|
|
@@ -26,7 +26,7 @@ function isShadowRoot(node) {
|
|
|
26
26
|
return (node === null || node === void 0 ? void 0 : node.nodeType) === Node.DOCUMENT_FRAGMENT_NODE;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
const mentionCss = ":host(limebb-mention){display:inline
|
|
29
|
+
const mentionCss = ":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}";
|
|
30
30
|
|
|
31
31
|
const Mention = class {
|
|
32
32
|
constructor(hostRef) {
|
|
@@ -70,10 +70,10 @@ const Mention = class {
|
|
|
70
70
|
return this.renderLimeObject(this.limeobject);
|
|
71
71
|
}
|
|
72
72
|
renderLimeObject(limeobject) {
|
|
73
|
-
return (h("a", {
|
|
73
|
+
return (h("a", { href: `object/${this.limetype}/${this.objectid}` }, limeobject.descriptive, this.renderSlot({ hidden: true })));
|
|
74
74
|
}
|
|
75
75
|
renderSlot(attributes = {}) {
|
|
76
|
-
return (h("span", Object.assign({}, attributes),
|
|
76
|
+
return (h("span", Object.assign({}, attributes), h("slot", null)));
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
79
|
Mention.style = mentionCss;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-8e85017b.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((e=>t([["p-4b389d50",[[1,"limebb-feed",{platform:[16],context:[16],items:[16],emptyStateMessage:[1,"empty-state-message"],heading:[1],loading:[4],minutesOfProximity:[2,"minutes-of-proximity"],totalCount:[2,"total-count"],lastVisitedTimestamp:[1,"last-visited-timestamp"]}]]],["p-32ab34e5",[[1,"limebb-kanban",{platform:[16],context:[16],items:[16],paginationSize:[2,"pagination-size"],groupBy:[513,"group-by"],groups:[16]}]]],["p-3f9b33ca",[[1,"limebb-text-editor",{platform:[16],context:[16],allowMentioning:[4,"allow-mentioning"],contentType:[1,"content-type"],language:[513],disabled:[516],readonly:[516],helperText:[513,"helper-text"],placeholder:[513],label:[513],invalid:[516],required:[516],selectedContext:[16],ui:[513],allowResize:[4,"allow-resize"],value:[1],items:[32],highlightedItemIndex:[32],customElements:[32],registeredTriggers:[32],editorPickerQuery:[32],searchableLimetypes:[32],isPickerOpen:[32],isSearching:[32]}]]],["p-2e549d89",[[1,"limebb-date-range",{platform:[16],context:[16],startTime:[16],endTime:[16],startTimeLabel:[1,"start-time-label"],endTimeLabel:[1,"end-time-label"],language:[1],timeFormat:[1,"time-format"],type:[1]}]]],["p-beb4e864",[[1,"limebb-info-tile-currency-format",{platform:[16],context:[16],value:[16]}]]],["p-56654f3d",[[1,"limebb-notification-list",{platform:[16],context:[16],items:[16],loading:[4],lastVisitedTimestamp:[1,"last-visited-timestamp"]}]]],["p-c4e176ca",[[17,"limebb-browser",{platform:[16],context:[16],items:[16],layout:[1],filter:[32]}]]],["p-dc97e968",[[1,"limebb-component-config",{platform:[16],context:[16],value:[16],required:[4],readonly:[4],disabled:[4],label:[1],helperText:[1,"helper-text"],formInfo:[16],type:[1],nameField:[1,"name-field"],configComponent:[32],configViewType:[32]}]]],["p-3f66a22e",[[1,"limebb-component-picker",{platform:[16],context:[16],type:[1],tags:[16],value:[1],copyLabel:[1,"copy-label"],hideCopyButton:[4,"hide-copy-button"],required:[4],readonly:[4],disabled:[4],label:[1],helperText:[1,"helper-text"]}]]],["p-74dfea73",[[1,"limebb-dashboard-widget",{heading:[513],subheading:[513],supportingText:[513,"supporting-text"],icon:[513]}]]],["p-8aafd8fb",[[1,"limebb-icon-picker",{value:[1],required:[4],readonly:[4],invalid:[4],disabled:[4],label:[1],helperText:[1,"helper-text"]}]]],["p-949f5146",[[1,"limebb-info-tile",{platform:[16],context:[16],filterId:[513,"filter-id"],disabled:[4],icon:[513],label:[1],prefix:[1],suffix:[1],propertyName:[1,"property-name"],aggregateOperator:[1,"aggregate-operator"],format:[16],config:[32],filters:[32],value:[32],loading:[32],error:[32]}]]],["p-3602eb38",[[1,"limebb-info-tile-date-format",{value:[16]}]]],["p-87d08f0d",[[1,"limebb-info-tile-decimal-format",{value:[16]}]]],["p-2867f980",[[1,"limebb-info-tile-format",{platform:[16],context:[16],type:[1],value:[16]}]]],["p-c163374e",[[1,"limebb-info-tile-relative-date-format",{value:[16]}]]],["p-d0a17301",[[1,"limebb-info-tile-unit-format",{value:[16]}]]],["p-58416605",[[1,"limebb-limeobject-file-viewer",{platform:[16],context:[16],property:[1],fileTypes:[16],limeobject:[32],limetype:[32]}]]],["p-1acd64f5",[[1,"limebb-locale-picker",{platform:[16],context:[16],value:[1],required:[4],disabled:[4],label:[1],helperText:[1,"helper-text"],readonly:[4],multipleChoice:[4,"multiple-choice"],allLanguages:[32]}]]],["p-
|
|
1
|
+
import{p as e,b as t}from"./p-8e85017b.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((e=>t([["p-4b389d50",[[1,"limebb-feed",{platform:[16],context:[16],items:[16],emptyStateMessage:[1,"empty-state-message"],heading:[1],loading:[4],minutesOfProximity:[2,"minutes-of-proximity"],totalCount:[2,"total-count"],lastVisitedTimestamp:[1,"last-visited-timestamp"]}]]],["p-32ab34e5",[[1,"limebb-kanban",{platform:[16],context:[16],items:[16],paginationSize:[2,"pagination-size"],groupBy:[513,"group-by"],groups:[16]}]]],["p-3f9b33ca",[[1,"limebb-text-editor",{platform:[16],context:[16],allowMentioning:[4,"allow-mentioning"],contentType:[1,"content-type"],language:[513],disabled:[516],readonly:[516],helperText:[513,"helper-text"],placeholder:[513],label:[513],invalid:[516],required:[516],selectedContext:[16],ui:[513],allowResize:[4,"allow-resize"],value:[1],items:[32],highlightedItemIndex:[32],customElements:[32],registeredTriggers:[32],editorPickerQuery:[32],searchableLimetypes:[32],isPickerOpen:[32],isSearching:[32]}]]],["p-2e549d89",[[1,"limebb-date-range",{platform:[16],context:[16],startTime:[16],endTime:[16],startTimeLabel:[1,"start-time-label"],endTimeLabel:[1,"end-time-label"],language:[1],timeFormat:[1,"time-format"],type:[1]}]]],["p-beb4e864",[[1,"limebb-info-tile-currency-format",{platform:[16],context:[16],value:[16]}]]],["p-56654f3d",[[1,"limebb-notification-list",{platform:[16],context:[16],items:[16],loading:[4],lastVisitedTimestamp:[1,"last-visited-timestamp"]}]]],["p-c4e176ca",[[17,"limebb-browser",{platform:[16],context:[16],items:[16],layout:[1],filter:[32]}]]],["p-dc97e968",[[1,"limebb-component-config",{platform:[16],context:[16],value:[16],required:[4],readonly:[4],disabled:[4],label:[1],helperText:[1,"helper-text"],formInfo:[16],type:[1],nameField:[1,"name-field"],configComponent:[32],configViewType:[32]}]]],["p-3f66a22e",[[1,"limebb-component-picker",{platform:[16],context:[16],type:[1],tags:[16],value:[1],copyLabel:[1,"copy-label"],hideCopyButton:[4,"hide-copy-button"],required:[4],readonly:[4],disabled:[4],label:[1],helperText:[1,"helper-text"]}]]],["p-74dfea73",[[1,"limebb-dashboard-widget",{heading:[513],subheading:[513],supportingText:[513,"supporting-text"],icon:[513]}]]],["p-8aafd8fb",[[1,"limebb-icon-picker",{value:[1],required:[4],readonly:[4],invalid:[4],disabled:[4],label:[1],helperText:[1,"helper-text"]}]]],["p-949f5146",[[1,"limebb-info-tile",{platform:[16],context:[16],filterId:[513,"filter-id"],disabled:[4],icon:[513],label:[1],prefix:[1],suffix:[1],propertyName:[1,"property-name"],aggregateOperator:[1,"aggregate-operator"],format:[16],config:[32],filters:[32],value:[32],loading:[32],error:[32]}]]],["p-3602eb38",[[1,"limebb-info-tile-date-format",{value:[16]}]]],["p-87d08f0d",[[1,"limebb-info-tile-decimal-format",{value:[16]}]]],["p-2867f980",[[1,"limebb-info-tile-format",{platform:[16],context:[16],type:[1],value:[16]}]]],["p-c163374e",[[1,"limebb-info-tile-relative-date-format",{value:[16]}]]],["p-d0a17301",[[1,"limebb-info-tile-unit-format",{value:[16]}]]],["p-58416605",[[1,"limebb-limeobject-file-viewer",{platform:[16],context:[16],property:[1],fileTypes:[16],limeobject:[32],limetype:[32]}]]],["p-1acd64f5",[[1,"limebb-locale-picker",{platform:[16],context:[16],value:[1],required:[4],disabled:[4],label:[1],helperText:[1,"helper-text"],readonly:[4],multipleChoice:[4,"multiple-choice"],allLanguages:[32]}]]],["p-6abd79e1",[[1,"limebb-mention",{limetype:[1],objectid:[2],limeobject:[32]}]]],["p-25011706",[[17,"limebb-navigation-button",{href:[513],tooltipLabel:[513,"tooltip-label"],tooltipHelperLabel:[513,"tooltip-helper-label"],type:[513]}]]],["p-fd6bc5af",[[1,"limebb-kanban-column",{platform:[16],context:[16],columnHeading:[1,"column-heading"],items:[16],loading:[4],paginationSize:[2,"pagination-size"],displayedItemCount:[32]}]]],["p-a3aeec8e",[[1,"limebb-text-editor-picker",{items:[16],open:[516],isSearching:[4,"is-searching"],emptyMessage:[1,"empty-message"]}]]],["p-99a45f29",[[1,"limebb-currency-picker",{platform:[16],context:[16],label:[513],currencies:[16],helperText:[513,"helper-text"],required:[516],readonly:[516],invalid:[516],disabled:[516],value:[1]}]]],["p-bf3dfc8b",[[1,"limebb-date-picker",{platform:[16],context:[16],disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],required:[516],value:[1],type:[513]}]]],["p-abdc6601",[[1,"limebb-feed-timeline-item",{platform:[16],context:[16],item:[16],ui:[513],isBundled:[516,"is-bundled"],headingCanExpand:[32],isHeadingExpanded:[32],showMore:[32],isTall:[32]}]]],["p-39b80f7a",[[1,"limebb-notification-item",{platform:[16],context:[16],item:[16]}]]],["p-9e9e54f3",[[1,"limebb-kanban-item",{platform:[16],context:[16],item:[16]}]]],["p-b4e15af7",[[1,"limebb-empty-state",{heading:[513],value:[513],icon:[16]}]]]],e)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,g as o,h as r}from"./p-8e85017b.js";import{P as e}from"./p-4506e883.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}
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* been mentioned. The mentioned user descriptive should be added as a slot along with
|
|
6
6
|
* the limetype and object id of the mentioned user object.
|
|
7
7
|
*
|
|
8
|
+
* This component is internally used together with `limebb-text-editor` to
|
|
9
|
+
* render "mentioned" coworkers inside the `<p>` elements.
|
|
8
10
|
*
|
|
9
11
|
* :::note
|
|
10
12
|
* Platform will be fetched from the DOM if not supplied
|
|
@@ -12,6 +14,7 @@
|
|
|
12
14
|
*
|
|
13
15
|
* @exampleComponent limebb-example-mention
|
|
14
16
|
* @exampleComponent limebb-example-mention-with-invalid-object
|
|
17
|
+
* @exampleComponent limebb-example-mention-multi-lines
|
|
15
18
|
* @private
|
|
16
19
|
*/
|
|
17
20
|
export declare class Mention {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetech/lime-crm-building-blocks",
|
|
3
|
-
"version": "1.55.
|
|
3
|
+
"version": "1.55.2",
|
|
4
4
|
"description": "A home for shared components meant for use with Lime CRM",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@eslint/eslintrc": "^3.2.0",
|
|
45
45
|
"@eslint/js": "^9.16.0",
|
|
46
|
-
"@limetech/lime-elements": "^37.
|
|
46
|
+
"@limetech/lime-elements": "^37.76.0",
|
|
47
47
|
"@limetech/lime-web-components": "^5.41.0",
|
|
48
48
|
"@lundalogik/lime-icons8": "^2.30.1",
|
|
49
|
-
"@lundalogik/limeclient.js": "^1.
|
|
49
|
+
"@lundalogik/limeclient.js": "^1.73.1",
|
|
50
50
|
"@stencil/core": "<2.19.0",
|
|
51
51
|
"@stencil/sass": "^3.0.12",
|
|
52
52
|
"@types/jest": "^27.0.3",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,g as o,h as e}from"./p-8e85017b.js";import{P as t}from"./p-4506e883.js";function n(r,o){if(o(r))return r;let e=r.parentElement||r.parentNode;var t;return(null==(t=e)?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&(e=e.host),e?n(e,o):void 0}const i=class{constructor(o){r(this,o)}connectedCallback(){const r=n(o(this),this.hasPlatform);r&&this.loadLimeObject(r.platform)}hasPlatform(r){return"platform"in r&&!!r.platform&&"object"==typeof r.platform}async loadLimeObject(r){const o=r.get(t.LimeObjectRepository);if(this.limeobject=o.getObject(this.limetype,this.objectid),!this.limeobject){try{await o.loadObject(this.limetype,this.objectid)}catch(r){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(r){return e("a",{class:"mention",href:`object/${this.limetype}/${this.objectid}`},"@",r.descriptive,this.renderSlot({hidden:!0}))}renderSlot(r={}){return e("span",Object.assign({},r),"@",e("slot",null))}};i.style=":host(limebb-mention){display:inline-block}.mention{background-color:rgb(var(--color-blue-default), 0.1);color:rgb(var(--color-blue-default));padding:0.125rem 0.25rem;border-radius:0.25rem;text-decoration:none;white-space:nowrap}.mention-loading{background-color:rgb(var(--color-green-default), 0.1);color:rgb(var(--color-green-light));padding:0.125rem 0.25rem;border-radius:0.25rem;text-decoration:none;white-space:nowrap}.mention-failure{background-color:rgb(var(--color-red-default), 0.1);color:rgb(var(--color-red-light));padding:0.125rem 0.25rem;border-radius:0.25rem;text-decoration:none;white-space:nowrap}.mention:hover{background-color:rgb(var(--color-blue-default), 0.15)}";export{i as limebb_mention}
|