@limetech/lime-crm-building-blocks 1.35.2 → 1.36.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 +16 -0
- package/dist/cjs/{index-3a3f23be.js → index-ccc44b16.js} +10 -0
- package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
- package/dist/cjs/limebb-browser.cjs.entry.js +1 -1
- package/dist/cjs/limebb-currency-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-dashboard-widget.cjs.entry.js +1 -1
- package/dist/cjs/limebb-date-picker.cjs.entry.js +35 -2
- package/dist/cjs/limebb-date-range.cjs.entry.js +1 -1
- package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +15 -5
- package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
- package/dist/cjs/limebb-icon-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-limeobject-file-viewer.cjs.entry.js +1 -1
- package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-navigation-button.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/date-picker/date-picker.js +34 -1
- package/dist/collection/components/feed/feed-item/feed-timeline-item.css +52 -1
- package/dist/collection/components/feed/feed-item/feed-timeline-item.js +13 -3
- package/dist/components/date-picker.js +34 -1
- package/dist/components/feed-timeline-item.js +14 -4
- package/dist/esm/{index-74b81b35.js → index-8468022a.js} +10 -0
- package/dist/esm/lime-crm-building-blocks.js +1 -1
- package/dist/esm/limebb-browser.entry.js +1 -1
- package/dist/esm/limebb-currency-picker.entry.js +1 -1
- package/dist/esm/limebb-dashboard-widget.entry.js +1 -1
- package/dist/esm/limebb-date-picker.entry.js +35 -2
- package/dist/esm/limebb-date-range.entry.js +1 -1
- package/dist/esm/limebb-feed-timeline-item.entry.js +15 -5
- package/dist/esm/limebb-feed.entry.js +1 -1
- package/dist/esm/limebb-icon-picker.entry.js +1 -1
- package/dist/esm/limebb-limeobject-file-viewer.entry.js +1 -1
- package/dist/esm/limebb-locale-picker.entry.js +1 -1
- package/dist/esm/limebb-navigation-button.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/{p-581cb898.js → p-09a9a5fa.js} +2 -2
- package/dist/lime-crm-building-blocks/{p-ae50c451.entry.js → p-16969305.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-1895e593.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-7c604ae9.entry.js → p-1bd3523d.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-23444c50.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-14a2348e.entry.js → p-31828dc2.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-974b1bb4.entry.js → p-5b17aae3.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-c0420276.entry.js → p-68e4fc72.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-8466275c.entry.js → p-9b4ada81.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-c6320270.entry.js → p-ac7c2a10.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-ccc50b2e.entry.js → p-af734874.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-b7c9bf1f.entry.js → p-df53b19d.entry.js} +1 -1
- package/dist/types/components/date-picker/date-picker.d.ts +3 -0
- package/dist/types/components/feed/feed-item/feed-item.types.d.ts +2 -1
- package/dist/types/components/feed/feed-item/feed-timeline-item.d.ts +2 -0
- package/package.json +2 -2
- package/dist/lime-crm-building-blocks/p-b7d01d96.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-e5d15256.entry.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [1.36.0](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.35.3...v1.36.0) (2024-06-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
* **feed:** add new `ui` type for visualizing `thread-message`s ([1a765f2](https://github.com/Lundalogik/lime-crm-building-blocks/commit/1a765f298b1ab55bfd0f39b5da319571047f9f0b))
|
|
8
|
+
|
|
9
|
+
### [1.35.3](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.35.2...v1.35.3) (2024-06-26)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
* **date-picker:** pass app language to date picker ([619ee6d](https://github.com/Lundalogik/lime-crm-building-blocks/commit/619ee6dba3cb4399e17d3f655ee09c1918ef60ac))
|
|
16
|
+
|
|
1
17
|
### [1.35.2](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.35.1...v1.35.2) (2024-06-24)
|
|
2
18
|
|
|
3
19
|
|
|
@@ -1154,6 +1154,7 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1154
1154
|
hostRef.$flags$ &= ~8 /* HOST_FLAGS.isConstructingInstance */;
|
|
1155
1155
|
}
|
|
1156
1156
|
endNewInstance();
|
|
1157
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1157
1158
|
}
|
|
1158
1159
|
if (Cstr.style) {
|
|
1159
1160
|
// this component has styles but we haven't registered them yet
|
|
@@ -1182,6 +1183,11 @@ const initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId, Cstr) =>
|
|
|
1182
1183
|
schedule();
|
|
1183
1184
|
}
|
|
1184
1185
|
};
|
|
1186
|
+
const fireConnectedCallback = (instance) => {
|
|
1187
|
+
{
|
|
1188
|
+
safeCall(instance, 'connectedCallback');
|
|
1189
|
+
}
|
|
1190
|
+
};
|
|
1185
1191
|
const connectedCallback = (elm) => {
|
|
1186
1192
|
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1187
1193
|
const hostRef = getHostRef(elm);
|
|
@@ -1220,6 +1226,10 @@ const connectedCallback = (elm) => {
|
|
|
1220
1226
|
initializeComponent(elm, hostRef, cmpMeta);
|
|
1221
1227
|
}
|
|
1222
1228
|
}
|
|
1229
|
+
else {
|
|
1230
|
+
// fire off connectedCallback() on component instance
|
|
1231
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1232
|
+
}
|
|
1223
1233
|
endConnected();
|
|
1224
1234
|
}
|
|
1225
1235
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-ccc44b16.js');
|
|
6
6
|
|
|
7
7
|
const dashboardWidgetCss = ":host(limebb-dashboard-widget){--dashboard-widget-background-color:var(\n --start-page-grid-widget-background-color,\n rgb(var(--contrast-100))\n );--header-icon-color:var(--dashboard-widget-icon-color);--header-background-color:var(\n --dashboard-widget-header-background-color,\n var(--start-page-grid-widget-header-color)\n );--dashboard-widget-border-radius:var(\n --start-page-grid-widget-border-radius,\n 1rem\n );--header-top-right-left-border-radius:0;display:flex;flex-direction:column;border-radius:var(--dashboard-widget-border-radius);background-color:var(--dashboard-widget-background-color);height:100%;width:100%;overflow:hidden}";
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-ccc44b16.js');
|
|
6
6
|
const types = require('./types-3a79f256.js');
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -70,11 +70,14 @@ const DatePicker = class {
|
|
|
70
70
|
};
|
|
71
71
|
this.formatter = (value) => this.dateTimeFormatter.format(value, dateTimePropertyTypes[this.type] || this.type);
|
|
72
72
|
}
|
|
73
|
+
connectedCallback() {
|
|
74
|
+
this.language = this.getAppLanguage();
|
|
75
|
+
}
|
|
73
76
|
render() {
|
|
74
77
|
if (this.value) {
|
|
75
78
|
this.shouldEmitValueAsString = typeof this.value === 'string';
|
|
76
79
|
}
|
|
77
|
-
return (index.h("limel-date-picker", { disabled: this.disabled, readonly: this.readonly, invalid: this.invalid, label: this.label, placeholder: this.placeholder, helperText: this.helperText, required: this.required, value: this.parseDateValue(), type: this.type, formatter: this.formatter, onChange: this.handleChange }));
|
|
80
|
+
return (index.h("limel-date-picker", { disabled: this.disabled, readonly: this.readonly, invalid: this.invalid, label: this.label, placeholder: this.placeholder, helperText: this.helperText, required: this.required, value: this.parseDateValue(), type: this.type, language: this.language, formatter: this.formatter, onChange: this.handleChange }));
|
|
78
81
|
}
|
|
79
82
|
parseDateValue() {
|
|
80
83
|
const value = this.value;
|
|
@@ -86,10 +89,40 @@ const DatePicker = class {
|
|
|
86
89
|
get dateTimeFormatter() {
|
|
87
90
|
return this.platform.get(types.PlatformServiceName.DateTimeFormatter);
|
|
88
91
|
}
|
|
92
|
+
getAppLanguage() {
|
|
93
|
+
const translator = this.platform.get(types.PlatformServiceName.Translate);
|
|
94
|
+
const application = this.platform.get(types.PlatformServiceName.Application);
|
|
95
|
+
let language;
|
|
96
|
+
if (hasLanguage(translator)) {
|
|
97
|
+
language = translator.getLanguage();
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
language = application.getLanguage();
|
|
101
|
+
}
|
|
102
|
+
if (isSupportedLanguage(language)) {
|
|
103
|
+
return language;
|
|
104
|
+
}
|
|
105
|
+
return 'en';
|
|
106
|
+
}
|
|
89
107
|
};
|
|
90
108
|
const dateTimePropertyTypes = {
|
|
91
109
|
datetime: 'time',
|
|
92
110
|
time: 'timeofday',
|
|
93
111
|
};
|
|
112
|
+
const supportedLanguages = new Set([
|
|
113
|
+
'da',
|
|
114
|
+
'de',
|
|
115
|
+
'en',
|
|
116
|
+
'fi',
|
|
117
|
+
'fr',
|
|
118
|
+
'nb',
|
|
119
|
+
'no',
|
|
120
|
+
'nl',
|
|
121
|
+
'sv',
|
|
122
|
+
]);
|
|
123
|
+
const isSupportedLanguage = (language) => supportedLanguages.has(language);
|
|
124
|
+
function hasLanguage(service) {
|
|
125
|
+
return typeof (service === null || service === void 0 ? void 0 : service.getLanguage) === 'function';
|
|
126
|
+
}
|
|
94
127
|
|
|
95
128
|
exports.limebb_date_picker = DatePicker;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-ccc44b16.js');
|
|
6
6
|
|
|
7
7
|
const dateRangeCss = ":host(limebb-date-range){isolation:isolate;display:block;position:relative}*{box-sizing:border-box}.date-pickers{display:grid;grid-template-columns:repeat(auto-fit, minmax(13.5rem, 1fr));gap:0.5rem;padding:0.75rem 1rem 1.25rem 1rem}.label-group{display:flex;align-items:center;margin-bottom:0.25rem}.end-time .label-group{flex-direction:row-reverse}.label-group .label{font-size:0.75rem;padding:0 0.25rem}.label-group .circle{flex-shrink:0;width:0.5rem;height:0.5rem;border-radius:50%}.start-time .label-group .circle{background-color:rgb(var(--color-green-default))}.end-time .label-group .circle{background-color:rgb(var(--color-coral-default))}.label-group .line{flex-grow:1;height:0.25rem;border-radius:1rem}.start-time .label-group .line{background-image:linear-gradient(to right, rgb(var(--color-green-light)), rgb(var(--contrast-400)) 30%)}.end-time .label-group .line{background-image:linear-gradient(to left, rgb(var(--color-coral-light)), rgb(var(--contrast-400)) 30%)}.date-pickers:has(>:last-child:nth-child(2)) .start-time .line{margin-right:-0.5rem}.date-pickers:has(>:last-child:nth-child(2)) .end-time .line{margin-left:-0.5rem}";
|
|
8
8
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-ccc44b16.js');
|
|
6
6
|
const types = require('./types-3a79f256.js');
|
|
7
7
|
|
|
8
|
-
const feedTimelineItemCss = "@charset \"UTF-8\";*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate}:host(limebb-feed-timeline-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-feed-timeline-item[is-bundled]:hover){--limebb-feed-item-timestamp-opacity-delay:0.5s}:host(limebb-feed-timeline-item[is-bundled]:hover) .timestamp{opacity:1}:host(limebb-feed-timeline-item[is-bundled]) .timestamp{opacity:0}.left:before{content:\"\";position:absolute;z-index:0;top:-0.25rem;bottom:-0.25rem;left:1rem;width:1px;background-color:rgb(var(--contrast-600));z-index:-1}.info{position:sticky;top:0.5rem;display:flex;flex-direction:column;align-items:center;gap:0.25rem}.right,.content{display:flex;flex-direction:column;flex-grow:1;min-width:0}.content{border-radius:1rem;gap:0.25rem;padding:var(--limebb-feed-item-paddings)}.header{display:flex;gap:0.25rem;padding-bottom:0.25rem;margin-top:-0.25rem;color:rgb(var(--contrast-900));font-size:0.875rem}:host(.has-unpromoted-actions) .header{padding-right:2rem}.header limel-markdown{--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.heading{flex-grow:1;overflow:hidden;white-space:nowrap}.heading.expanded-heading{white-space:normal}button.expand-heading{all:unset;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:rgb(var(--color-blue-default));background-color:transparent;border-radius:1rem;padding:0 0.25rem 0.25rem 0.25rem;height:1rem;white-space:nowrap}button.expand-heading:hover{color:rgb(var(--color-blue-default));background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button.expand-heading:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}button.collapse-heading{all:unset;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:1.5rem;width:1rem}button.collapse-heading:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button.collapse-heading:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}button.collapse-heading:focus{outline:none}button.collapse-heading:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.collapse-heading limel-icon{width:0.75rem}.unpromoted-actions-menu{position:absolute;top:0;right:0;z-index:1}.timestamp{transition:color 0.4s ease, opacity 0.2s ease;transition-delay:var(--limebb-feed-item-timestamp-opacity-delay, 0s);font-size:0.75rem;text-align:center;color:rgb(var(--contrast-800));background-color:var(--limebb-feed-background-color);padding:0.125rem 0;width:2rem}.icon{--icon-background-color:var(--limebb-feed-background-color);width:2rem;padding:0.125rem}:host(.has-author-picture) .icon{width:1.5rem}img{border-radius:50%;width:2rem;height:2rem;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:\"\";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}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-feed-item-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-feed-item-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-feed-item-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-feed-item-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-feed-item-action-bar-grid-template-rows-transition-delay);padding-bottom:0.5rem}:host(limebb-feed-timeline-item:hover) .action-bar,:host(limebb-feed-timeline-item:focus-within) .action-bar,:host(limebb-feed-timeline-item:focus-visible) .action-bar{--limebb-feed-item-action-bar-grid-template-rows:1fr;will-change:grid-template-rows}:host(limebb-feed-timeline-item:hover) limel-action-bar,:host(limebb-feed-timeline-item:focus-within) limel-action-bar,:host(limebb-feed-timeline-item:focus-visible) limel-action-bar{will-change:opacity;opacity:1}:host(limebb-feed-timeline-item:hover){--limebb-feed-item-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-feed-item-action-bar-grid-template-rows-transition-delay:0.5s}:host(limebb-feed-timeline-item.is-tall) .markdown-container{margin-bottom:0.5rem}:host(limebb-feed-timeline-item.is-tall) .body-text{min-height:10.25rem}:host(limebb-feed-timeline-item.is-tall) .body-text:after{transition:opacity 0.6s ease;content:\"\";opacity:0.26;pointer-events:none;position:absolute;bottom:-0.125rem;right:-0.125rem;left:-0.125rem;height:2.5rem;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0)) 0 100%, linear-gradient(to bottom, rgb(var(--limebb-feed-item-background-color), 0) 0%, rgb(var(--limebb-feed-item-background-color), 90%) 100%);background-repeat:no-repeat;background-size:100% 0.5rem, 100% 100%}:host(limebb-feed-timeline-item.is-tall.shows-less) .markdown-container{grid-template-rows:0fr}:host(limebb-feed-timeline-item.is-tall.shows-less) .body-text:after{opacity:1}:host(limebb-feed-timeline-item.is-tall.shows-more) .markdown-container{grid-template-rows:1fr}:host(limebb-feed-timeline-item.is-tall.shows-more) #show-more-button limel-icon{rotate:180deg}.markdown-container{position:relative;display:grid}.markdown-container:not(.opened){transition:grid-template-rows min(var(--body-text-height) * 1.2ms, 500ms) cubic-bezier(1, 0.09, 0, 0.89)}.body-text{display:block;overflow:hidden}#show-more-button{all:unset;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);z-index:1;position:absolute;right:0;bottom:-0.6rem;left:0;margin:0 auto;display:flex;align-items:center;justify-content:center;border-radius:3rem;width:2rem;height:1rem}#show-more-button:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}#show-more-button:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}#show-more-button:focus{outline:none}#show-more-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}#show-more-button limel-icon{transition:rotate 0.2s ease 0.5s;color:var(--mdc-theme-primary);width:0.75rem}:host(limebb-feed-timeline-item[ui=standard]) .content{background-color:rgb(var(--limebb-feed-item-background-color))}:host(limebb-feed-timeline-item[ui=emphasized]) .content{border:1px dashed rgb(var(--contrast-800))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown{--markdown-hyperlink-color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown:hover{--markdown-hyperlink-color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) a.author{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .header:hover a.author{color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) .icon{color:rgb(var(--contrast-900)) !important}:host(limebb-feed-timeline-item[ui=minimal]) .body-text{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .body-text:hover{color:rgb(var(--contrast-1100))}.content{position:relative}.content:before,.content:after{content:\"\";position:absolute;top:1rem;bottom:1rem;left:-0.125rem;width:0.25rem;border-radius:0.25rem}.content:before{background-color:var(--color-code)}:host(limebb-feed-timeline-item[ui=emphasized]) .content:before,:host(limebb-feed-timeline-item[ui=emphasized]) .content:after{left:calc(-0.125rem - 0.5px)}:host(limebb-feed-timeline-item[ui=minimal]) .content:before{opacity:0.25}:host(limebb-feed-timeline-item[ui=minimal]) .content:after{opacity:0.5;background:repeating-linear-gradient(45deg, var(--color-code), var(--color-code) 0.5rem, transparent 0.5rem, transparent 1rem);background-size:0.25rem 100%;background-repeat:repeat-y;background-position:left;rotate:180deg}";
|
|
8
|
+
const feedTimelineItemCss = "@charset \"UTF-8\";*{box-sizing:border-box}:host(limebb-feed-timeline-item){--limebb-feed-item-paddings:0.75rem;display:flex;gap:0.75rem;position:relative;isolation:isolate}:host(limebb-feed-timeline-item:hover) .timestamp{color:rgb(var(--contrast-1100))}:host(limebb-feed-timeline-item[is-bundled]:hover){--limebb-feed-item-timestamp-opacity-delay:0.5s}:host(limebb-feed-timeline-item[is-bundled]:hover) .timestamp{opacity:1}:host(limebb-feed-timeline-item[is-bundled]) .timestamp{opacity:0}.left:before{content:\"\";position:absolute;z-index:0;top:-0.25rem;bottom:-0.25rem;left:1rem;width:1px;background-color:rgb(var(--contrast-600));z-index:-1}.info{position:sticky;top:0.5rem;display:flex;flex-direction:column;align-items:center;gap:0.25rem}.right,.content{display:flex;flex-direction:column;flex-grow:1;min-width:0}.content{border-radius:1rem;gap:0.25rem;padding:var(--limebb-feed-item-paddings)}.header{position:relative;display:flex;gap:0.25rem;padding-bottom:0.25rem;margin-top:-0.25rem;color:rgb(var(--contrast-900));font-size:0.875rem}:host(.has-unpromoted-actions) .header{padding-right:2rem}.header limel-markdown{--markdown-hyperlink-color:var(--mdc-theme-primary);--markdown-hyperlink-color--hovered:rgb(var(--color-teal-light))}.heading{flex-grow:1;overflow:hidden;white-space:nowrap}.heading.expanded-heading{white-space:normal}button.expand-heading{all:unset;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:rgb(var(--color-blue-default));background-color:transparent;border-radius:1rem;padding:0 0.25rem 0.25rem 0.25rem;height:1rem;white-space:nowrap}button.expand-heading:hover{color:rgb(var(--color-blue-default));background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button.expand-heading:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}button.collapse-heading{all:unset;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);flex-shrink:0;display:flex;align-items:center;justify-content:center;border-radius:1.5rem;width:1rem}button.collapse-heading:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}button.collapse-heading:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}button.collapse-heading:focus{outline:none}button.collapse-heading:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button.collapse-heading limel-icon{width:0.75rem}.unpromoted-actions-menu{position:absolute;top:0;right:0;z-index:1}.timestamp{transition:color 0.4s ease, opacity 0.2s ease;transition-delay:var(--limebb-feed-item-timestamp-opacity-delay, 0s);font-size:0.75rem;text-align:center;color:rgb(var(--contrast-800));background-color:var(--limebb-feed-background-color);padding:0.125rem 0;width:2rem}.icon{--icon-background-color:var(--limebb-feed-background-color);width:2rem;padding:0.125rem}:host(.has-author-picture) .icon{width:1.5rem}img{border-radius:50%;width:2rem;height:2rem;object-fit:cover;box-shadow:0 0 0 1px rgb(var(--contrast-600))}.author{font-weight:bold;text-decoration:none;white-space:nowrap}a.author{position:relative;cursor:pointer;transition:color 0.2s ease;color:var(--mdc-theme-primary)}a.author:before{transition:opacity 0.2s ease, transform 0.3s ease-out;content:\"\";position:absolute;inset:auto 0 0 0;width:calc(100% - 0.5rem);margin:auto;height:0.125rem;border-radius:1rem;background-color:currentColor;opacity:0;transform:scale(0.6)}a.author:hover{color:rgb(var(--color-teal-light))}a.author:hover:before{opacity:0.3;transform:scale(1)}limel-chip-set{--button-shadow-normal:none;margin-left:-1rem;margin-bottom:-0.5rem}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-feed-item-action-bar-grid-template-rows-transition-speed, 0.2s) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-feed-item-action-bar-grid-template-rows-transition-delay, 0s);grid-template-rows:var(--limebb-feed-item-action-bar-grid-template-rows, 1fr)}.action-bar-hider{overflow:hidden}limel-action-bar{transition:padding var(--limebb-feed-item-action-bar-grid-template-rows-transition-speed) cubic-bezier(1, 0.09, 0, 0.89) var(--limebb-feed-item-action-bar-grid-template-rows-transition-delay);padding-bottom:0.5rem}:host(limebb-feed-timeline-item:hover) .action-bar,:host(limebb-feed-timeline-item:focus-within) .action-bar,:host(limebb-feed-timeline-item:focus-visible) .action-bar{--limebb-feed-item-action-bar-grid-template-rows:1fr;will-change:grid-template-rows}:host(limebb-feed-timeline-item:hover) limel-action-bar,:host(limebb-feed-timeline-item:focus-within) limel-action-bar,:host(limebb-feed-timeline-item:focus-visible) limel-action-bar{will-change:opacity;opacity:1}:host(limebb-feed-timeline-item:hover){--limebb-feed-item-action-bar-grid-template-rows-transition-speed:0.46s;--limebb-feed-item-action-bar-grid-template-rows-transition-delay:0.5s}:host(limebb-feed-timeline-item.is-tall) .markdown-container{margin-bottom:0.5rem}:host(limebb-feed-timeline-item.is-tall) .body-text{--body-text-min-height-set-by-code:10rem;min-height:calc(var(--body-text-min-height-set-by-code) + 0.25rem)}:host(limebb-feed-timeline-item.is-tall) .body-text:after{transition:opacity 0.6s ease;content:\"\";opacity:0.26;pointer-events:none;position:absolute;bottom:-0.125rem;right:-0.125rem;left:-0.125rem;height:2.5rem;background:radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0)) 0 100%, linear-gradient(to bottom, rgb(var(--limebb-feed-item-background-color), 0) 0%, rgb(var(--limebb-feed-item-background-color), 90%) 100%);background-repeat:no-repeat;background-size:100% 0.5rem, 100% 100%}:host(limebb-feed-timeline-item.is-tall.shows-less) .markdown-container{grid-template-rows:0fr}:host(limebb-feed-timeline-item.is-tall.shows-less) .body-text:after{opacity:1}:host(limebb-feed-timeline-item.is-tall.shows-more) .markdown-container{grid-template-rows:1fr}:host(limebb-feed-timeline-item.is-tall.shows-more) #show-more-button limel-icon{rotate:180deg}.markdown-container{position:relative;display:grid}.markdown-container:not(.opened){transition:grid-template-rows min(var(--body-text-height) * 1.2ms, 500ms) cubic-bezier(1, 0.09, 0, 0.89)}.body-text{display:block;overflow:hidden}#show-more-button{all:unset;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-normal);z-index:1;position:absolute;right:0;bottom:-0.6rem;left:0;margin:0 auto;display:flex;align-items:center;justify-content:center;border-radius:3rem;width:2rem;height:1rem}#show-more-button:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}#show-more-button:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}#show-more-button:focus{outline:none}#show-more-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}#show-more-button limel-icon{transition:rotate 0.2s ease 0.5s;color:var(--mdc-theme-primary);width:0.75rem}:host(limebb-feed-timeline-item[ui=standard]) .content{background-color:rgb(var(--limebb-feed-item-background-color))}:host(limebb-feed-timeline-item[ui=emphasized]) .content{border:1px dashed rgb(var(--contrast-800))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown{--markdown-hyperlink-color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) limel-markdown:hover{--markdown-hyperlink-color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) a.author{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .header:hover a.author{color:rgb(var(--color-blue-default))}:host(limebb-feed-timeline-item[ui=minimal]) .icon{color:rgb(var(--contrast-900)) !important}:host(limebb-feed-timeline-item[ui=minimal]) .body-text{color:rgb(var(--contrast-900))}:host(limebb-feed-timeline-item[ui=minimal]) .body-text:hover{color:rgb(var(--contrast-1100))}:host(limebb-feed-timeline-item[ui=thread-message]) .content{border-radius:0;box-shadow:var(--button-shadow-normal);margin-bottom:0.25rem;background-color:var(--lime-elevated-surface-background-color)}:host(limebb-feed-timeline-item[ui=thread-message]) .header{padding-bottom:0.75rem;margin-bottom:0.25rem}:host(limebb-feed-timeline-item[ui=thread-message]) .header:before{content:\"\";position:absolute;top:calc(var(--limebb-feed-item-paddings) * -1 + 0.25rem);left:calc(var(--limebb-feed-item-paddings) * -1);right:calc(var(--limebb-feed-item-paddings) * -1);bottom:0;pointer-events:none;border-bottom:1px dashed rgb(var(--contrast-600))}:host(limebb-feed-timeline-item[ui=thread-message]) .thread-effects{transition:transform 0.2s ease;pointer-events:none;content:\"\";position:absolute;z-index:-1;top:0;right:0;bottom:0;left:0;box-shadow:var(--button-shadow-normal);transform:translate3d(-0.225rem, -0.125rem, 0) rotate(1.5deg);background-color:rgb(var(--contrast-300))}:host(limebb-feed-timeline-item[ui=thread-message]) .content:hover .thread-effects{transform:translate3d(-0.325rem, -0.3rem, 0) rotate(1.5deg)}:host(limebb-feed-timeline-item.is-tall[ui=thread-message]) .body-text{--body-text-min-height-set-by-code:3rem;min-height:calc(var(--body-text-min-height-set-by-code) + 0.25rem)}.content{position:relative}.content:before,.content:after{content:\"\";position:absolute;top:1rem;bottom:1rem;left:-0.125rem;width:0.25rem;border-radius:0.25rem}.content:before{background-color:var(--color-code)}:host(limebb-feed-timeline-item[ui=emphasized]) .content:before,:host(limebb-feed-timeline-item[ui=emphasized]) .content:after{left:calc(-0.125rem - 0.5px)}:host(limebb-feed-timeline-item[ui=minimal]) .content:before{opacity:0.25}:host(limebb-feed-timeline-item[ui=minimal]) .content:after{opacity:0.5;background:repeating-linear-gradient(45deg, var(--color-code), var(--color-code) 0.5rem, transparent 0.5rem, transparent 1rem);background-size:0.25rem 100%;background-repeat:repeat-y;background-position:left;rotate:180deg}:host(limebb-feed-timeline-item[ui=thread-message]) .content:before{top:0.25rem;bottom:unset;height:1.75rem}";
|
|
9
9
|
|
|
10
10
|
const FeedTimelineItem = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -53,7 +53,8 @@ const FeedTimelineItem = class {
|
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
55
|
const height = entries[0].contentRect.height;
|
|
56
|
-
|
|
56
|
+
// eslint-disable-next-line no-magic-numbers
|
|
57
|
+
const maxHeight = this.isThreadMessage ? 48 : 160;
|
|
57
58
|
this.isTall = height > maxHeight ? true : false;
|
|
58
59
|
if (this.bodyTextHeight === undefined) {
|
|
59
60
|
this.bodyTextHeight = height;
|
|
@@ -205,7 +206,13 @@ const FeedTimelineItem = class {
|
|
|
205
206
|
} }));
|
|
206
207
|
}
|
|
207
208
|
renderContent() {
|
|
208
|
-
return (index.h("div", { class: "right" }, index.h("div", { class: "content" }, this.renderHeader(), this.renderUnpromotedActionsMenu(), this.renderValue(), this.renderRelations()), this.renderPromotedActions()));
|
|
209
|
+
return (index.h("div", { class: "right" }, index.h("div", { class: "content" }, this.renderThreadEffects(), this.renderHeader(), this.renderUnpromotedActionsMenu(), this.renderValue(), this.renderRelations()), this.renderPromotedActions()));
|
|
210
|
+
}
|
|
211
|
+
renderThreadEffects() {
|
|
212
|
+
if (this.isThreadMessage) {
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
return index.h("div", { class: "thread-effects", role: "presentation" });
|
|
209
216
|
}
|
|
210
217
|
renderAuthor() {
|
|
211
218
|
if (!this.item.author || (this.isBundled && !this.item.heading)) {
|
|
@@ -256,7 +263,7 @@ const FeedTimelineItem = class {
|
|
|
256
263
|
return element.offsetWidth < element.scrollWidth;
|
|
257
264
|
}
|
|
258
265
|
renderShowMoreButton() {
|
|
259
|
-
if (!this.isTall) {
|
|
266
|
+
if (this.isThreadMessage || !this.isTall) {
|
|
260
267
|
return;
|
|
261
268
|
}
|
|
262
269
|
return [
|
|
@@ -305,6 +312,9 @@ const FeedTimelineItem = class {
|
|
|
305
312
|
var _a;
|
|
306
313
|
return (_a = this.platform) === null || _a === void 0 ? void 0 : _a.get(types.PlatformServiceName.CommandBus);
|
|
307
314
|
}
|
|
315
|
+
get isThreadMessage() {
|
|
316
|
+
return this.ui === 'thread-message';
|
|
317
|
+
}
|
|
308
318
|
get el() { return index.getElement(this); }
|
|
309
319
|
};
|
|
310
320
|
FeedTimelineItem.style = feedTimelineItemCss;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-ccc44b16.js');
|
|
6
6
|
|
|
7
7
|
const navigationButtonCss = "@charset \"UTF-8\";.navigation-button{all:unset;isolation:isolate;position:relative;display:flex;justify-content:center;align-items:center;height:1.875rem;width:1.875rem;border-radius:50%;transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;cursor:pointer;color:var(--mdc-theme-on-surface);background-color:var(--navigation-button-background-color, var(--lime-elevated-surface-background-color))}.navigation-button:hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.navigation-button:active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}.navigation-button:focus{outline:none}.navigation-button:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.navigation-button limel-icon{transition:color 0.2s ease, transform 0.2s cubic-bezier(0.84, 0.15, 0.52, 1.42);color:var(--header-menu-icon-color);width:1.25rem}.newTab limel-icon{transition:transform 0.2s ease;transform:scale(0.8);z-index:3}.newTab:before{z-index:2}.newTab::after{z-index:1}.newTab:before,.newTab:after{content:\"\";transition:transform 0.2s ease, border-color 0.2s ease;position:absolute;width:0.875rem;height:0.875rem;border:1px solid rgb(var(--contrast-900));background-color:var(--navigation-button-background-color, rgb(var(--contrast-100)))}.newTab:hover limel-icon{color:var(--mdc-theme-primary);transform:translate3d(-0.1rem, 0.1rem, 0) scale(1)}.newTab:hover:before{transform:translate3d(0.125rem, -0.125rem, 0);border-color:rgb(var(--contrast-1000));box-shadow:var(--shadow-depth-8)}.newTab:hover:after{transform:translate3d(-0.15rem, 0.15rem, 0) scale(0.9);border-color:rgb(var(--contrast-700))}.expand:after{transition:transform 0.2s ease;content:\"\";position:absolute;z-index:1;background-color:var(--navigation-button-background-color, rgb(var(--contrast-100)));width:0.75rem;height:0.75rem}.expand:hover limel-icon{color:var(--mdc-theme-primary)}.expand:hover:after{transform:scale(0.5)}.expand:hover limel-icon{transform:scale(1.18)}.minimize:before,.minimize:after,.maximize:before,.maximize:after{content:\"\";transition:transform 0.3s ease-out 0.15s, background-color 0.1s ease}.minimize limel-icon,.maximize limel-icon{transition:transform 0.2s ease 0.1s}.minimize:before,.maximize:after,.maximize:hover:before{transform:scaleY(1) scaleX(1);z-index:-1;box-sizing:border-box;position:absolute;width:70%;height:60%;border-radius:0.25rem;transform-origin:bottom}.minimize:hover:before,.maximize:before{transition:transform 0.3s ease-out 0.15s, background-color 0.1s ease;transform:scaleY(0.3) scaleX(0.7);background-color:rgb(var(--contrast-500))}.minimize:hover limel-icon,.maximize limel-icon{transform:scaleX(0.8) translate3d(0, 0.4rem, 0)}.maximize limel-icon{color:rgb(var(--contrast-900))}.maximize:hover limel-icon{color:currentColor;transform:scaleX(1.1) translate3d(0, -0.1rem, 0)}.maximize:after{z-index:-2;border:1px dashed rgb(var(--contrast-800))}.close limel-icon{transition:transform 0.2s ease, color 0.2s ease}.close:before,.close:after{transition-delay:0.1s;content:\"\";position:absolute;inset:0;border-radius:50%;opacity:0}.close:before{transition:transform 0.3s ease, opacity 0.3s ease;background-color:rgb(var(--color-orange-dark))}.close:after{transition:transform 0.6s ease, opacity 0.6s ease;background-color:rgb(var(--color-orange-light))}.close:hover limel-icon{color:rgb(var(--color-white));transform:scale(0.7) rotate(90deg)}.close:hover:before{opacity:1;transform:scale(0.4)}.close:hover:after{opacity:0.4;transform:scale(0.6)}.float:after{transition:width 0.2s ease-out, opacity 0.2s ease;content:\"\";position:absolute;inset:0 0.5rem 0 auto;border-radius:1px;opacity:0.8;transform:translate3d(0, 0, 0);background-color:rgb(var(--contrast-800));width:0.125rem;height:0.6rem;margin:auto}.float:hover:after{width:0.4rem;opacity:1;transform:translate3d(0, 0, 0)}";
|
|
8
8
|
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -59,11 +59,14 @@ export class DatePicker {
|
|
|
59
59
|
};
|
|
60
60
|
this.formatter = (value) => this.dateTimeFormatter.format(value, dateTimePropertyTypes[this.type] || this.type);
|
|
61
61
|
}
|
|
62
|
+
connectedCallback() {
|
|
63
|
+
this.language = this.getAppLanguage();
|
|
64
|
+
}
|
|
62
65
|
render() {
|
|
63
66
|
if (this.value) {
|
|
64
67
|
this.shouldEmitValueAsString = typeof this.value === 'string';
|
|
65
68
|
}
|
|
66
|
-
return (h("limel-date-picker", { disabled: this.disabled, readonly: this.readonly, invalid: this.invalid, label: this.label, placeholder: this.placeholder, helperText: this.helperText, required: this.required, value: this.parseDateValue(), type: this.type, formatter: this.formatter, onChange: this.handleChange }));
|
|
69
|
+
return (h("limel-date-picker", { disabled: this.disabled, readonly: this.readonly, invalid: this.invalid, label: this.label, placeholder: this.placeholder, helperText: this.helperText, required: this.required, value: this.parseDateValue(), type: this.type, language: this.language, formatter: this.formatter, onChange: this.handleChange }));
|
|
67
70
|
}
|
|
68
71
|
parseDateValue() {
|
|
69
72
|
const value = this.value;
|
|
@@ -75,6 +78,21 @@ export class DatePicker {
|
|
|
75
78
|
get dateTimeFormatter() {
|
|
76
79
|
return this.platform.get(PlatformServiceName.DateTimeFormatter);
|
|
77
80
|
}
|
|
81
|
+
getAppLanguage() {
|
|
82
|
+
const translator = this.platform.get(PlatformServiceName.Translate);
|
|
83
|
+
const application = this.platform.get(PlatformServiceName.Application);
|
|
84
|
+
let language;
|
|
85
|
+
if (hasLanguage(translator)) {
|
|
86
|
+
language = translator.getLanguage();
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
language = application.getLanguage();
|
|
90
|
+
}
|
|
91
|
+
if (isSupportedLanguage(language)) {
|
|
92
|
+
return language;
|
|
93
|
+
}
|
|
94
|
+
return 'en';
|
|
95
|
+
}
|
|
78
96
|
static get is() { return "limebb-date-picker"; }
|
|
79
97
|
static get encapsulation() { return "shadow"; }
|
|
80
98
|
static get properties() {
|
|
@@ -321,3 +339,18 @@ const dateTimePropertyTypes = {
|
|
|
321
339
|
datetime: 'time',
|
|
322
340
|
time: 'timeofday',
|
|
323
341
|
};
|
|
342
|
+
const supportedLanguages = new Set([
|
|
343
|
+
'da',
|
|
344
|
+
'de',
|
|
345
|
+
'en',
|
|
346
|
+
'fi',
|
|
347
|
+
'fr',
|
|
348
|
+
'nb',
|
|
349
|
+
'no',
|
|
350
|
+
'nl',
|
|
351
|
+
'sv',
|
|
352
|
+
]);
|
|
353
|
+
const isSupportedLanguage = (language) => supportedLanguages.has(language);
|
|
354
|
+
function hasLanguage(service) {
|
|
355
|
+
return typeof (service === null || service === void 0 ? void 0 : service.getLanguage) === 'function';
|
|
356
|
+
}
|
|
@@ -115,6 +115,7 @@
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
.header {
|
|
118
|
+
position: relative;
|
|
118
119
|
display: flex;
|
|
119
120
|
gap: 0.25rem;
|
|
120
121
|
padding-bottom: 0.25rem;
|
|
@@ -312,7 +313,8 @@ limel-action-bar {
|
|
|
312
313
|
margin-bottom: 0.5rem;
|
|
313
314
|
}
|
|
314
315
|
:host(limebb-feed-timeline-item.is-tall) .body-text {
|
|
315
|
-
min-height:
|
|
316
|
+
--body-text-min-height-set-by-code: 10rem;
|
|
317
|
+
min-height: calc(var(--body-text-min-height-set-by-code) + 0.25rem);
|
|
316
318
|
}
|
|
317
319
|
:host(limebb-feed-timeline-item.is-tall) .body-text:after {
|
|
318
320
|
transition: opacity 0.6s ease;
|
|
@@ -428,6 +430,49 @@ limel-action-bar {
|
|
|
428
430
|
color: rgb(var(--contrast-1100));
|
|
429
431
|
}
|
|
430
432
|
|
|
433
|
+
:host(limebb-feed-timeline-item[ui=thread-message]) .content {
|
|
434
|
+
border-radius: 0;
|
|
435
|
+
box-shadow: var(--button-shadow-normal);
|
|
436
|
+
margin-bottom: 0.25rem;
|
|
437
|
+
background-color: var(--lime-elevated-surface-background-color);
|
|
438
|
+
}
|
|
439
|
+
:host(limebb-feed-timeline-item[ui=thread-message]) .header {
|
|
440
|
+
padding-bottom: 0.75rem;
|
|
441
|
+
margin-bottom: 0.25rem;
|
|
442
|
+
}
|
|
443
|
+
:host(limebb-feed-timeline-item[ui=thread-message]) .header:before {
|
|
444
|
+
content: "";
|
|
445
|
+
position: absolute;
|
|
446
|
+
top: calc(var(--limebb-feed-item-paddings) * -1 + 0.25rem);
|
|
447
|
+
left: calc(var(--limebb-feed-item-paddings) * -1);
|
|
448
|
+
right: calc(var(--limebb-feed-item-paddings) * -1);
|
|
449
|
+
bottom: 0;
|
|
450
|
+
pointer-events: none;
|
|
451
|
+
border-bottom: 1px dashed rgb(var(--contrast-600));
|
|
452
|
+
}
|
|
453
|
+
:host(limebb-feed-timeline-item[ui=thread-message]) .thread-effects {
|
|
454
|
+
transition: transform 0.2s ease;
|
|
455
|
+
pointer-events: none;
|
|
456
|
+
content: "";
|
|
457
|
+
position: absolute;
|
|
458
|
+
z-index: -1;
|
|
459
|
+
top: 0;
|
|
460
|
+
right: 0;
|
|
461
|
+
bottom: 0;
|
|
462
|
+
left: 0;
|
|
463
|
+
box-shadow: var(--button-shadow-normal);
|
|
464
|
+
transform: translate3d(-0.225rem, -0.125rem, 0) rotate(1.5deg);
|
|
465
|
+
background-color: rgb(var(--contrast-300));
|
|
466
|
+
}
|
|
467
|
+
:host(limebb-feed-timeline-item[ui=thread-message]) .content:hover .thread-effects {
|
|
468
|
+
transform: translate3d(-0.325rem, -0.3rem, 0) rotate(1.5deg);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
:host(limebb-feed-timeline-item.is-tall[ui=thread-message]) .body-text {
|
|
472
|
+
--body-text-min-height-set-by-code: 3rem;
|
|
473
|
+
min-height: calc(var(--body-text-min-height-set-by-code) + 0.25rem);
|
|
474
|
+
}
|
|
475
|
+
|
|
431
476
|
.content {
|
|
432
477
|
position: relative;
|
|
433
478
|
}
|
|
@@ -458,4 +503,10 @@ limel-action-bar {
|
|
|
458
503
|
background-repeat: repeat-y;
|
|
459
504
|
background-position: left;
|
|
460
505
|
rotate: 180deg;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
:host(limebb-feed-timeline-item[ui=thread-message]) .content:before {
|
|
509
|
+
top: 0.25rem;
|
|
510
|
+
bottom: unset;
|
|
511
|
+
height: 1.75rem;
|
|
461
512
|
}
|
|
@@ -50,7 +50,8 @@ export class FeedTimelineItem {
|
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
const height = entries[0].contentRect.height;
|
|
53
|
-
|
|
53
|
+
// eslint-disable-next-line no-magic-numbers
|
|
54
|
+
const maxHeight = this.isThreadMessage ? 48 : 160;
|
|
54
55
|
this.isTall = height > maxHeight ? true : false;
|
|
55
56
|
if (this.bodyTextHeight === undefined) {
|
|
56
57
|
this.bodyTextHeight = height;
|
|
@@ -202,7 +203,13 @@ export class FeedTimelineItem {
|
|
|
202
203
|
} }));
|
|
203
204
|
}
|
|
204
205
|
renderContent() {
|
|
205
|
-
return (h("div", { class: "right" }, h("div", { class: "content" }, this.renderHeader(), this.renderUnpromotedActionsMenu(), this.renderValue(), this.renderRelations()), this.renderPromotedActions()));
|
|
206
|
+
return (h("div", { class: "right" }, h("div", { class: "content" }, this.renderThreadEffects(), this.renderHeader(), this.renderUnpromotedActionsMenu(), this.renderValue(), this.renderRelations()), this.renderPromotedActions()));
|
|
207
|
+
}
|
|
208
|
+
renderThreadEffects() {
|
|
209
|
+
if (this.isThreadMessage) {
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
return h("div", { class: "thread-effects", role: "presentation" });
|
|
206
213
|
}
|
|
207
214
|
renderAuthor() {
|
|
208
215
|
if (!this.item.author || (this.isBundled && !this.item.heading)) {
|
|
@@ -253,7 +260,7 @@ export class FeedTimelineItem {
|
|
|
253
260
|
return element.offsetWidth < element.scrollWidth;
|
|
254
261
|
}
|
|
255
262
|
renderShowMoreButton() {
|
|
256
|
-
if (!this.isTall) {
|
|
263
|
+
if (this.isThreadMessage || !this.isTall) {
|
|
257
264
|
return;
|
|
258
265
|
}
|
|
259
266
|
return [
|
|
@@ -302,6 +309,9 @@ export class FeedTimelineItem {
|
|
|
302
309
|
var _a;
|
|
303
310
|
return (_a = this.platform) === null || _a === void 0 ? void 0 : _a.get(PlatformServiceName.CommandBus);
|
|
304
311
|
}
|
|
312
|
+
get isThreadMessage() {
|
|
313
|
+
return this.ui === 'thread-message';
|
|
314
|
+
}
|
|
305
315
|
static get is() { return "limebb-feed-timeline-item"; }
|
|
306
316
|
static get encapsulation() { return "shadow"; }
|
|
307
317
|
static get originalStyleUrls() {
|
|
@@ -68,11 +68,14 @@ const DatePicker = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
68
68
|
};
|
|
69
69
|
this.formatter = (value) => this.dateTimeFormatter.format(value, dateTimePropertyTypes[this.type] || this.type);
|
|
70
70
|
}
|
|
71
|
+
connectedCallback() {
|
|
72
|
+
this.language = this.getAppLanguage();
|
|
73
|
+
}
|
|
71
74
|
render() {
|
|
72
75
|
if (this.value) {
|
|
73
76
|
this.shouldEmitValueAsString = typeof this.value === 'string';
|
|
74
77
|
}
|
|
75
|
-
return (h("limel-date-picker", { disabled: this.disabled, readonly: this.readonly, invalid: this.invalid, label: this.label, placeholder: this.placeholder, helperText: this.helperText, required: this.required, value: this.parseDateValue(), type: this.type, formatter: this.formatter, onChange: this.handleChange }));
|
|
78
|
+
return (h("limel-date-picker", { disabled: this.disabled, readonly: this.readonly, invalid: this.invalid, label: this.label, placeholder: this.placeholder, helperText: this.helperText, required: this.required, value: this.parseDateValue(), type: this.type, language: this.language, formatter: this.formatter, onChange: this.handleChange }));
|
|
76
79
|
}
|
|
77
80
|
parseDateValue() {
|
|
78
81
|
const value = this.value;
|
|
@@ -84,6 +87,21 @@ const DatePicker = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
84
87
|
get dateTimeFormatter() {
|
|
85
88
|
return this.platform.get(PlatformServiceName.DateTimeFormatter);
|
|
86
89
|
}
|
|
90
|
+
getAppLanguage() {
|
|
91
|
+
const translator = this.platform.get(PlatformServiceName.Translate);
|
|
92
|
+
const application = this.platform.get(PlatformServiceName.Application);
|
|
93
|
+
let language;
|
|
94
|
+
if (hasLanguage(translator)) {
|
|
95
|
+
language = translator.getLanguage();
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
language = application.getLanguage();
|
|
99
|
+
}
|
|
100
|
+
if (isSupportedLanguage(language)) {
|
|
101
|
+
return language;
|
|
102
|
+
}
|
|
103
|
+
return 'en';
|
|
104
|
+
}
|
|
87
105
|
}, [1, "limebb-date-picker", {
|
|
88
106
|
"platform": [16],
|
|
89
107
|
"context": [16],
|
|
@@ -101,6 +119,21 @@ const dateTimePropertyTypes = {
|
|
|
101
119
|
datetime: 'time',
|
|
102
120
|
time: 'timeofday',
|
|
103
121
|
};
|
|
122
|
+
const supportedLanguages = new Set([
|
|
123
|
+
'da',
|
|
124
|
+
'de',
|
|
125
|
+
'en',
|
|
126
|
+
'fi',
|
|
127
|
+
'fr',
|
|
128
|
+
'nb',
|
|
129
|
+
'no',
|
|
130
|
+
'nl',
|
|
131
|
+
'sv',
|
|
132
|
+
]);
|
|
133
|
+
const isSupportedLanguage = (language) => supportedLanguages.has(language);
|
|
134
|
+
function hasLanguage(service) {
|
|
135
|
+
return typeof (service === null || service === void 0 ? void 0 : service.getLanguage) === 'function';
|
|
136
|
+
}
|
|
104
137
|
function defineCustomElement() {
|
|
105
138
|
if (typeof customElements === "undefined") {
|
|
106
139
|
return;
|