@limetech/lime-crm-building-blocks 1.30.3 → 1.30.4
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 +8 -0
- package/dist/cjs/limebb-feed.cjs.entry.js +2 -2
- package/dist/collection/components/feed/feed.css +4 -0
- package/dist/collection/components/feed/feed.js +1 -1
- package/dist/components/limebb-feed.js +2 -2
- package/dist/esm/limebb-feed.entry.js +2 -2
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/{p-c746f4f7.entry.js → p-49c44234.entry.js} +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
### [1.30.4](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.30.3...v1.30.4) (2024-02-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
* **feed:** add more space on top of the load more button ([7cf0314](https://github.com/Lundalogik/lime-crm-building-blocks/commit/7cf0314620c6ff54e68ec15f43a3c535dfac4828))
|
|
8
|
+
|
|
1
9
|
### [1.30.3](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.30.2...v1.30.3) (2024-02-26)
|
|
2
10
|
|
|
3
11
|
|
|
@@ -164,7 +164,7 @@ function differenceInMinutes(dateLeft, dateRight, options) {
|
|
|
164
164
|
return getRoundingMethod(options?.roundingMethod)(diff);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
const feedCss = ":host(limebb-feed){--limebb-feed-background-color:var(\n --feed-background-color,\n rgb(var(--contrast-100))\n );--limebb-feed-item-background-color:var(--contrast-300);display:flex;flex-direction:column;gap:0.25rem;max-width:45rem;background-color:var(--limebb-feed-background-color)}.empty-state{text-align:center}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-heading{font-weight:600;font-size:0.875rem;margin:1.25rem 0 0.5rem 0;color:rgb(var(--contrast-900))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-feed-item-action-bar-grid-template-rows:0fr}";
|
|
167
|
+
const feedCss = ":host(limebb-feed){--limebb-feed-background-color:var(\n --feed-background-color,\n rgb(var(--contrast-100))\n );--limebb-feed-item-background-color:var(--contrast-300);display:flex;flex-direction:column;gap:0.25rem;max-width:45rem;background-color:var(--limebb-feed-background-color)}.empty-state{text-align:center}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-heading{font-weight:600;font-size:0.875rem;margin:1.25rem 0 0.5rem 0;color:rgb(var(--contrast-900))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-feed-item-action-bar-grid-template-rows:0fr}.load-more-button{margin-top:0.5rem}";
|
|
168
168
|
|
|
169
169
|
const MINUTES_OF_PROXIMITY = 5;
|
|
170
170
|
const Feed = class {
|
|
@@ -255,7 +255,7 @@ const Feed = class {
|
|
|
255
255
|
if (!this.items.length || this.totalCount <= this.items.length) {
|
|
256
256
|
return;
|
|
257
257
|
}
|
|
258
|
-
return (index.h("limel-icon-button", { class: "
|
|
258
|
+
return (index.h("limel-icon-button", { class: "load-more-button", icon: "more", onClick: this.handleLoadMore, elevated: true, label: this.loadMoreLabel }));
|
|
259
259
|
}
|
|
260
260
|
get dateTimeFormatter() {
|
|
261
261
|
return this.platform.get(types.PlatformServiceName.DateTimeFormatter);
|
|
@@ -112,7 +112,7 @@ export class Feed {
|
|
|
112
112
|
if (!this.items.length || this.totalCount <= this.items.length) {
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
|
-
return (h("limel-icon-button", { class: "
|
|
115
|
+
return (h("limel-icon-button", { class: "load-more-button", icon: "more", onClick: this.handleLoadMore, elevated: true, label: this.loadMoreLabel }));
|
|
116
116
|
}
|
|
117
117
|
get dateTimeFormatter() {
|
|
118
118
|
return this.platform.get(PlatformServiceName.DateTimeFormatter);
|
|
@@ -161,7 +161,7 @@ function differenceInMinutes(dateLeft, dateRight, options) {
|
|
|
161
161
|
return getRoundingMethod(options?.roundingMethod)(diff);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
const feedCss = ":host(limebb-feed){--limebb-feed-background-color:var(\n --feed-background-color,\n rgb(var(--contrast-100))\n );--limebb-feed-item-background-color:var(--contrast-300);display:flex;flex-direction:column;gap:0.25rem;max-width:45rem;background-color:var(--limebb-feed-background-color)}.empty-state{text-align:center}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-heading{font-weight:600;font-size:0.875rem;margin:1.25rem 0 0.5rem 0;color:rgb(var(--contrast-900))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-feed-item-action-bar-grid-template-rows:0fr}";
|
|
164
|
+
const feedCss = ":host(limebb-feed){--limebb-feed-background-color:var(\n --feed-background-color,\n rgb(var(--contrast-100))\n );--limebb-feed-item-background-color:var(--contrast-300);display:flex;flex-direction:column;gap:0.25rem;max-width:45rem;background-color:var(--limebb-feed-background-color)}.empty-state{text-align:center}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-heading{font-weight:600;font-size:0.875rem;margin:1.25rem 0 0.5rem 0;color:rgb(var(--contrast-900))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-feed-item-action-bar-grid-template-rows:0fr}.load-more-button{margin-top:0.5rem}";
|
|
165
165
|
|
|
166
166
|
const MINUTES_OF_PROXIMITY = 5;
|
|
167
167
|
const Feed = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
@@ -254,7 +254,7 @@ const Feed = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
254
254
|
if (!this.items.length || this.totalCount <= this.items.length) {
|
|
255
255
|
return;
|
|
256
256
|
}
|
|
257
|
-
return (h("limel-icon-button", { class: "
|
|
257
|
+
return (h("limel-icon-button", { class: "load-more-button", icon: "more", onClick: this.handleLoadMore, elevated: true, label: this.loadMoreLabel }));
|
|
258
258
|
}
|
|
259
259
|
get dateTimeFormatter() {
|
|
260
260
|
return this.platform.get(PlatformServiceName.DateTimeFormatter);
|
|
@@ -160,7 +160,7 @@ function differenceInMinutes(dateLeft, dateRight, options) {
|
|
|
160
160
|
return getRoundingMethod(options?.roundingMethod)(diff);
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
const feedCss = ":host(limebb-feed){--limebb-feed-background-color:var(\n --feed-background-color,\n rgb(var(--contrast-100))\n );--limebb-feed-item-background-color:var(--contrast-300);display:flex;flex-direction:column;gap:0.25rem;max-width:45rem;background-color:var(--limebb-feed-background-color)}.empty-state{text-align:center}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-heading{font-weight:600;font-size:0.875rem;margin:1.25rem 0 0.5rem 0;color:rgb(var(--contrast-900))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-feed-item-action-bar-grid-template-rows:0fr}";
|
|
163
|
+
const feedCss = ":host(limebb-feed){--limebb-feed-background-color:var(\n --feed-background-color,\n rgb(var(--contrast-100))\n );--limebb-feed-item-background-color:var(--contrast-300);display:flex;flex-direction:column;gap:0.25rem;max-width:45rem;background-color:var(--limebb-feed-background-color)}.empty-state{text-align:center}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-heading{font-weight:600;font-size:0.875rem;margin:1.25rem 0 0.5rem 0;color:rgb(var(--contrast-900))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-feed-item-action-bar-grid-template-rows:0fr}.load-more-button{margin-top:0.5rem}";
|
|
164
164
|
|
|
165
165
|
const MINUTES_OF_PROXIMITY = 5;
|
|
166
166
|
const Feed = class {
|
|
@@ -251,7 +251,7 @@ const Feed = class {
|
|
|
251
251
|
if (!this.items.length || this.totalCount <= this.items.length) {
|
|
252
252
|
return;
|
|
253
253
|
}
|
|
254
|
-
return (h("limel-icon-button", { class: "
|
|
254
|
+
return (h("limel-icon-button", { class: "load-more-button", icon: "more", onClick: this.handleLoadMore, elevated: true, label: this.loadMoreLabel }));
|
|
255
255
|
}
|
|
256
256
|
get dateTimeFormatter() {
|
|
257
257
|
return this.platform.get(PlatformServiceName.DateTimeFormatter);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-2912b7e7.js";(()=>{const t=import.meta.url,l={};return""!==t&&(l.resourcesUrl=new URL(".",t).href),e(l)})().then((e=>t([["p-81bfe796",[[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-
|
|
1
|
+
import{p as e,b as t}from"./p-2912b7e7.js";(()=>{const t=import.meta.url,l={};return""!==t&&(l.resourcesUrl=new URL(".",t).href),e(l)})().then((e=>t([["p-81bfe796",[[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-49c44234",[[1,"limebb-feed",{platform:[16],context:[16],items:[16],emptyStateMessage:[1,"empty-state-message"],loading:[4],minutesOfProximity:[2,"minutes-of-proximity"],totalCount:[2,"total-count"]}]]],["p-03d8633c",[[1,"limebb-currency-picker",{label:[513],platform:[16],currencies:[16],helperText:[513,"helper-text"],required:[516],readonly:[516],invalid:[516],disabled:[516],value:[16]}]]],["p-0f8928a9",[[1,"limebb-dashboard-widget",{heading:[513],subheading:[513],supportingText:[513,"supporting-text"],icon:[513]}]]],["p-25771878",[[1,"limebb-icon-picker",{value:[1],required:[4],readonly:[4],invalid:[4],disabled:[4],label:[1],helperText:[1,"helper-text"]}]]],["p-317858e2",[[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-6ad70097",[[1,"limebb-navigation-button",{href:[513],tooltipLabel:[513,"tooltip-label"],tooltipHelperLabel:[513,"tooltip-helper-label"],type:[513]}]]],["p-0ca85b0a",[[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-dd1c0cb7",[[1,"limebb-feed-timeline-item",{platform:[16],context:[16],item:[16],ui:[513],isBundled:[516,"is-bundled"],showMore:[32],isTall:[32]}]]]],e)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as i}from"./p-2912b7e7.js";import{P as r}from"./p-39d48976.js";function n(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}const o=class{constructor(i){e(this,i),this.loadMore=t(this,"loadMore",7),this.items=[],this.minutesOfProximity=5,this.totalCount=0,this.isBundled=(e,t)=>{var i,r,o,s,a,l;if(0===t)return!1;if((null===(r=null===(i=this.items[t-1])||void 0===i?void 0:i.author)||void 0===r?void 0:r.id)!==(null===(o=null==e?void 0:e.author)||void 0===o?void 0:o.id))return!1;if((null===(a=null===(s=this.items[t-1])||void 0===s?void 0:s.icon)||void 0===a?void 0:a.name)!==(null===(l=null==e?void 0:e.icon)||void 0===l?void 0:l.name))return!1;const d=new Date(e.timestamp),m=new Date(this.items[t-1].timestamp),c=new Date(m);return function(e,t,i){const r=function(e,t){return+n(e)-+n(t)}(e,t)/6e4;return(o=i?.roundingMethod,e=>{const t=(o?Math[o]:Math.trunc)(e);return 0===t?0:t})(r);var o}(new Date(d),c)<=this.minutesOfProximity},this.handleLoadMore=e=>{e.stopPropagation(),this.loadMore.emit()}}render(){return[this.renderLoadMore(),this.renderEmptyFeedMessage(),this.renderSpinner(),this.renderFeedItems()]}renderSpinner(){if(this.loading)return i("limel-spinner",{size:"small"})}renderEmptyFeedMessage(){if(!this.loading)return 0===this.items.length?i("p",{class:"empty-state"},this.emptyStateMessage):void 0}renderFeedItems(){return this.items.map(((e,t)=>[this.renderDateHeader(e.timestamp,t),i("limebb-feed-timeline-item",{platform:this.platform,context:this.context,item:e,key:e.id,ui:null==e?void 0:e.ui,isBundled:this.isBundled(e,t)})]))}renderDateHeader(e,t){const r=this.dateTimeFormatter.format(e,"date");return 0===t||this.dateTimeFormatter.format(this.items[t-1].timestamp,"date")!==r?i("a",{class:"date-heading"},r):void 0}renderLoadMore(){if(this.items.length&&!(this.totalCount<=this.items.length))return i("limel-icon-button",{class:"
|
|
1
|
+
import{r as e,c as t,h as i}from"./p-2912b7e7.js";import{P as r}from"./p-39d48976.js";function n(e){const t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new e.constructor(+e):"number"==typeof e||"[object Number]"===t||"string"==typeof e||"[object String]"===t?new Date(e):new Date(NaN)}const o=class{constructor(i){e(this,i),this.loadMore=t(this,"loadMore",7),this.items=[],this.minutesOfProximity=5,this.totalCount=0,this.isBundled=(e,t)=>{var i,r,o,s,a,l;if(0===t)return!1;if((null===(r=null===(i=this.items[t-1])||void 0===i?void 0:i.author)||void 0===r?void 0:r.id)!==(null===(o=null==e?void 0:e.author)||void 0===o?void 0:o.id))return!1;if((null===(a=null===(s=this.items[t-1])||void 0===s?void 0:s.icon)||void 0===a?void 0:a.name)!==(null===(l=null==e?void 0:e.icon)||void 0===l?void 0:l.name))return!1;const d=new Date(e.timestamp),m=new Date(this.items[t-1].timestamp),c=new Date(m);return function(e,t,i){const r=function(e,t){return+n(e)-+n(t)}(e,t)/6e4;return(o=i?.roundingMethod,e=>{const t=(o?Math[o]:Math.trunc)(e);return 0===t?0:t})(r);var o}(new Date(d),c)<=this.minutesOfProximity},this.handleLoadMore=e=>{e.stopPropagation(),this.loadMore.emit()}}render(){return[this.renderLoadMore(),this.renderEmptyFeedMessage(),this.renderSpinner(),this.renderFeedItems()]}renderSpinner(){if(this.loading)return i("limel-spinner",{size:"small"})}renderEmptyFeedMessage(){if(!this.loading)return 0===this.items.length?i("p",{class:"empty-state"},this.emptyStateMessage):void 0}renderFeedItems(){return this.items.map(((e,t)=>[this.renderDateHeader(e.timestamp,t),i("limebb-feed-timeline-item",{platform:this.platform,context:this.context,item:e,key:e.id,ui:null==e?void 0:e.ui,isBundled:this.isBundled(e,t)})]))}renderDateHeader(e,t){const r=this.dateTimeFormatter.format(e,"date");return 0===t||this.dateTimeFormatter.format(this.items[t-1].timestamp,"date")!==r?i("a",{class:"date-heading"},r):void 0}renderLoadMore(){if(this.items.length&&!(this.totalCount<=this.items.length))return i("limel-icon-button",{class:"load-more-button",icon:"more",onClick:this.handleLoadMore,elevated:!0,label:this.loadMoreLabel})}get dateTimeFormatter(){return this.platform.get(r.DateTimeFormatter)}get loadMoreLabel(){return this.translator.get("webclient.load-more")}get translator(){return this.platform.get(r.Translate)}};o.style=":host(limebb-feed){--limebb-feed-background-color:var(\n --feed-background-color,\n rgb(var(--contrast-100))\n );--limebb-feed-item-background-color:var(--contrast-300);display:flex;flex-direction:column;gap:0.25rem;max-width:45rem;background-color:var(--limebb-feed-background-color)}.empty-state{text-align:center}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-heading{font-weight:600;font-size:0.875rem;margin:1.25rem 0 0.5rem 0;color:rgb(var(--contrast-900))}limebb-feed-timeline-item:has(+limebb-feed-timeline-item[is-bundled]){--limebb-feed-item-action-bar-grid-template-rows:0fr}.load-more-button{margin-top:0.5rem}";export{o as limebb_feed}
|