@limetech/lime-crm-building-blocks 1.118.0 → 1.118.1
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 +7 -0
- package/dist/cjs/limebb-data-cells.cjs.entry.js +22 -1
- package/dist/collection/components/data-cells/data-cells.js +22 -1
- package/dist/components/limebb-data-cells.js +1 -1
- package/dist/esm/limebb-data-cells.entry.js +22 -1
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/p-ece5c8ad.entry.js +1 -0
- package/dist/types/components/data-cells/data-cells.d.ts +1 -0
- package/package.json +1 -1
- package/dist/lime-crm-building-blocks/p-5fc88ece.entry.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.118.1](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.118.0...v1.118.1) (2026-04-29)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
* **data-cells:** render tooltip for relative dates ([4a51b24](https://github.com/Lundalogik/lime-crm-building-blocks/commit/4a51b24dde3a37403b0d890584c1187f9bcf6749))
|
|
7
|
+
|
|
1
8
|
## [1.118.0](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.117.2...v1.118.0) (2026-04-29)
|
|
2
9
|
|
|
3
10
|
### Features
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C_OnxXhP.js');
|
|
4
4
|
var index_esm = require('./index.esm-DhBVH875.js');
|
|
5
|
+
var randomString = require('./random-string-BdZGIsGg.js');
|
|
5
6
|
|
|
6
7
|
const SECOND = 1000;
|
|
7
8
|
const MINUTE = 60 * SECOND;
|
|
@@ -100,7 +101,11 @@ const DataCells = class {
|
|
|
100
101
|
if (Number.isNaN(date.getTime())) {
|
|
101
102
|
return item.value;
|
|
102
103
|
}
|
|
103
|
-
|
|
104
|
+
const id = randomString.createRandomString();
|
|
105
|
+
return [
|
|
106
|
+
index.h("span", { id: id }, formatRelativeDate(date, this.language)),
|
|
107
|
+
index.h("limel-tooltip", { elementId: id, label: this.formatAbsoluteDate(date, item.type) }),
|
|
108
|
+
];
|
|
104
109
|
}
|
|
105
110
|
if (item.type === 'percent') {
|
|
106
111
|
return (index.h("limebb-percentage-visualizer", { value: Number(item.value), multiplier: 100, displayPercentageColors: true, reducePresence: false }));
|
|
@@ -148,6 +153,22 @@ const DataCells = class {
|
|
|
148
153
|
return navigator.language;
|
|
149
154
|
}
|
|
150
155
|
}
|
|
156
|
+
formatAbsoluteDate(date, type) {
|
|
157
|
+
var _a;
|
|
158
|
+
try {
|
|
159
|
+
const formatter = (_a = this.platform) === null || _a === void 0 ? void 0 : _a.get(index_esm.n.DateTimeFormatter);
|
|
160
|
+
if (formatter) {
|
|
161
|
+
return formatter.format(date, type);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
catch (_b) {
|
|
165
|
+
// Fall through to default formatting.
|
|
166
|
+
}
|
|
167
|
+
return date.toLocaleString(this.language, {
|
|
168
|
+
dateStyle: 'long',
|
|
169
|
+
timeStyle: type === 'time' ? 'short' : undefined,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
151
172
|
};
|
|
152
173
|
DataCells.style = dataCellsCss();
|
|
153
174
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { PlatformServiceName, } from "@limetech/lime-web-components";
|
|
3
3
|
import { formatRelativeDate } from "../../util/format-relative-date";
|
|
4
|
+
import { createRandomString } from "../../util/random-string";
|
|
4
5
|
/**
|
|
5
6
|
* Renders a list of key-value data cells in two visual groups:
|
|
6
7
|
* primary (prominent) and secondary (less dominant).
|
|
@@ -81,7 +82,11 @@ export class DataCells {
|
|
|
81
82
|
if (Number.isNaN(date.getTime())) {
|
|
82
83
|
return item.value;
|
|
83
84
|
}
|
|
84
|
-
|
|
85
|
+
const id = createRandomString();
|
|
86
|
+
return [
|
|
87
|
+
h("span", { id: id }, formatRelativeDate(date, this.language)),
|
|
88
|
+
h("limel-tooltip", { elementId: id, label: this.formatAbsoluteDate(date, item.type) }),
|
|
89
|
+
];
|
|
85
90
|
}
|
|
86
91
|
if (item.type === 'percent') {
|
|
87
92
|
return (h("limebb-percentage-visualizer", { value: Number(item.value), multiplier: 100, displayPercentageColors: true, reducePresence: false }));
|
|
@@ -129,6 +134,22 @@ export class DataCells {
|
|
|
129
134
|
return navigator.language;
|
|
130
135
|
}
|
|
131
136
|
}
|
|
137
|
+
formatAbsoluteDate(date, type) {
|
|
138
|
+
var _a;
|
|
139
|
+
try {
|
|
140
|
+
const formatter = (_a = this.platform) === null || _a === void 0 ? void 0 : _a.get(PlatformServiceName.DateTimeFormatter);
|
|
141
|
+
if (formatter) {
|
|
142
|
+
return formatter.format(date, type);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
catch (_b) {
|
|
146
|
+
// Fall through to default formatting.
|
|
147
|
+
}
|
|
148
|
+
return date.toLocaleString(this.language, {
|
|
149
|
+
dateStyle: 'long',
|
|
150
|
+
timeStyle: type === 'time' ? 'short' : undefined,
|
|
151
|
+
});
|
|
152
|
+
}
|
|
132
153
|
static get is() { return "limebb-data-cells"; }
|
|
133
154
|
static get encapsulation() { return "shadow"; }
|
|
134
155
|
static get originalStyleUrls() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement as e,HTMLElement as
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,h as r,transformTag as o}from"@stencil/core/internal/client";import{n as i}from"./index.esm.js";import{c as n}from"./random-string.js";import{d as s}from"./percentage-visualizer.js";const a=36e5,l=24*a,d=[{unit:"year",ms:365*l},{unit:"month",ms:30*l},{unit:"week",ms:7*l},{unit:"day",ms:l},{unit:"hour",ms:a},{unit:"minute",ms:6e4},{unit:"second",ms:1e3}];function c(e,t){var r;const o=e.getTime()-Date.now(),{unit:i,ms:n}=null!==(r=d.find((e=>Math.abs(o)>=e.ms)))&&void 0!==r?r:d.at(-1);return new Intl.RelativeTimeFormat(t,{style:"long"}).format(Math.round(o/n),i)}const m=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.items=[],this.renderCell=e=>r("div",null,r("dt",null,r("span",null,e.label)),r("dd",null,r("span",null,this.renderValue(e))))}render(){const e=this.items.some((e=>!e.secondary));return[this.renderPrimary(e),this.renderSecondary(e)]}renderPrimary(e){if(!e)return;const t=this.items.filter((e=>!e.secondary));return r("dl",{class:"primary"},this.renderImageCell(),t.map(this.renderCell))}renderSecondary(e){const t=this.items.filter((e=>e.secondary));if(0!==t.length)return r("dl",{class:"secondary"},!e&&this.renderImageCell(),t.map(this.renderCell))}renderImageCell(){var e;if(this.image)return r("div",{class:"image-cell"},r("img",{src:this.image.src,alt:this.image.alt,loading:null!==(e=this.image.loading)&&void 0!==e?e:"lazy"}))}renderValue(e){if(null==e.value||""===e.value)return"–";if("belongsto"===e.type){const t=this.getBelongsToHref(e.field);return t?r("a",{class:"belongs-to",href:t},e.value):e.value}if("phone"===e.type)return r("a",{href:this.toTelUri(e.value)},e.value);if("email"===e.type)return r("a",{href:"mailto:"+e.value},e.value);if("link"===e.type)return r("a",{href:this.ensureUrlProtocol(e.value),target:"_blank",rel:"noopener"},this.stripUrlPrefix(e.value));if("time"===e.type||"date"===e.type){const t=new Date(e.value);if(Number.isNaN(t.getTime()))return e.value;const o=n();return[r("span",{id:o},c(t,this.language)),r("limel-tooltip",{elementId:o,label:this.formatAbsoluteDate(t,e.type)})]}return"percent"===e.type?r("limebb-percentage-visualizer",{value:Number(e.value),multiplier:100,displayPercentageColors:!0,reducePresence:!1}):e.value}toTelUri(e){return"tel:"+e.replaceAll(" ","")}ensureUrlProtocol(e){return/^https?:\/\//i.test(e)?e:"https://"+e}stripUrlPrefix(e){return e.replace(/^https?:\/\//,"").replace(/^www\./,"")}getBelongsToHref(e){var t;if(this.limeobject&&e)try{const r=this.limeobject.getValue(e);if(!r||"object"!=typeof r)return;const o=null===(t=r.getLimetype)||void 0===t?void 0:t.call(r);if(!(null==o?void 0:o.name)||!r.id)return;return`object/${o.name}/${r.id}`}catch(e){return}}get language(){var e;try{return null===(e=this.platform)||void 0===e?void 0:e.get(i.Application).getLanguage()}catch(e){return navigator.language}}formatAbsoluteDate(e,t){var r;try{const o=null===(r=this.platform)||void 0===r?void 0:r.get(i.DateTimeFormatter);if(o)return o.format(e,t)}catch(e){}return e.toLocaleString(this.language,{dateStyle:"long",timeStyle:"time"===t?"short":void 0})}static get style(){return'@charset "UTF-8";*,*:before,*:after{box-sizing:border-box;min-width:0;min-height:0}:host(limebb-data-cells){box-sizing:border-box;display:flex;flex-direction:column;gap:0.5rem;padding:var(--limebb-data-cells-padding)}div{display:flex;flex-direction:column}dl{display:flex;flex-wrap:wrap;gap:0.75rem 1rem;margin:0;padding:0;list-style:none}dd,dt{display:flex;align-items:center}dd span,dt span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}dd{margin:0;font-size:var(--limel-theme-default-font-size);line-height:1.25rem;height:1.25rem;font-weight:500;color:rgb(var(--contrast-1100))}dd a{text-decoration:none;border-radius:1.25rem}dd a:focus{outline:none}dd a:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}dd a:not(.belongs-to){position:relative;cursor:pointer;transition:color 0.2s ease;color:rgb(var(--color-blue-default))}dd a:not(.belongs-to):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)}dd a:not(.belongs-to):hover{color:rgb(var(--color-blue-default))}dd a:not(.belongs-to):hover:before{opacity:0.3;transform:scale(1)}dd a.belongs-to{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);color:inherit;background-color:rgb(var(--contrast-400));padding:1px 0.375rem}dd a.belongs-to:hover,dd a.belongs-to:focus-visible{color:rgb(var(--color-white));background-color:rgb(var(--color-sky-default))}dd:has(.belongs-to){transform:translateX(-0.375rem)}dt{order:1;transition:color 0.2s ease;font-size:0.65rem;color:rgb(var(--contrast-800))}:host(:hover) dt,:host(:focus-within) dt{color:rgb(var(--contrast-900))}.primary+.secondary{padding-top:0.5rem;border-top:1px dashed rgb(var(--contrast-500))}.secondary dd{font-size:0.75rem;font-weight:400;line-height:1rem;height:1rem}div.image-cell{flex-shrink:0}div.image-cell img{display:block;width:2.5rem;height:2.5rem;border-radius:var(--data-cells-image-border-radius, 50%);object-fit:var(--data-cells-image-object-fit, cover);background-color:rgb(var(--color-white));box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.25)}'}},[1,"limebb-data-cells",{platform:[16],context:[16],limeobject:[8],items:[16],image:[16]}]),u=m,h=function(){"undefined"!=typeof customElements&&["limebb-data-cells","limebb-percentage-visualizer"].forEach((e=>{switch(e){case"limebb-data-cells":customElements.get(o(e))||customElements.define(o(e),m);break;case"limebb-percentage-visualizer":customElements.get(o(e))||s()}}))};export{u as LimebbDataCells,h as defineCustomElement}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-BIwHMk6j.js';
|
|
2
2
|
import { n } from './index.esm-BjlE4usG.js';
|
|
3
|
+
import { c as createRandomString } from './random-string-C2JP2nLw.js';
|
|
3
4
|
|
|
4
5
|
const SECOND = 1000;
|
|
5
6
|
const MINUTE = 60 * SECOND;
|
|
@@ -98,7 +99,11 @@ const DataCells = class {
|
|
|
98
99
|
if (Number.isNaN(date.getTime())) {
|
|
99
100
|
return item.value;
|
|
100
101
|
}
|
|
101
|
-
|
|
102
|
+
const id = createRandomString();
|
|
103
|
+
return [
|
|
104
|
+
h("span", { id: id }, formatRelativeDate(date, this.language)),
|
|
105
|
+
h("limel-tooltip", { elementId: id, label: this.formatAbsoluteDate(date, item.type) }),
|
|
106
|
+
];
|
|
102
107
|
}
|
|
103
108
|
if (item.type === 'percent') {
|
|
104
109
|
return (h("limebb-percentage-visualizer", { value: Number(item.value), multiplier: 100, displayPercentageColors: true, reducePresence: false }));
|
|
@@ -146,6 +151,22 @@ const DataCells = class {
|
|
|
146
151
|
return navigator.language;
|
|
147
152
|
}
|
|
148
153
|
}
|
|
154
|
+
formatAbsoluteDate(date, type) {
|
|
155
|
+
var _a;
|
|
156
|
+
try {
|
|
157
|
+
const formatter = (_a = this.platform) === null || _a === void 0 ? void 0 : _a.get(n.DateTimeFormatter);
|
|
158
|
+
if (formatter) {
|
|
159
|
+
return formatter.format(date, type);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
catch (_b) {
|
|
163
|
+
// Fall through to default formatting.
|
|
164
|
+
}
|
|
165
|
+
return date.toLocaleString(this.language, {
|
|
166
|
+
dateStyle: 'long',
|
|
167
|
+
timeStyle: type === 'time' ? 'short' : undefined,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
149
170
|
};
|
|
150
171
|
DataCells.style = dataCellsCss();
|
|
151
172
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-BIwHMk6j.js";export{s as setNonce}from"./p-BIwHMk6j.js";import{g as i}from"./p-DQuL1Twl.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((async e=>(await i(),t(JSON.parse('[["p-fdf269f7",[[1,"limebb-lime-query-builder",{"platform":[16],"context":[16],"value":[16],"label":[1],"activeLimetype":[1,"active-limetype"],"limetypes":[32],"mode":[32],"codeValue":[32],"limetype":[32],"filter":[32],"internalResponseFormat":[32],"limit":[32],"orderBy":[32],"description":[32]}]]],["p-21ec697f",[[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"],"direction":[513],"lastVisitedTimestamp":[1,"last-visited-timestamp"],"highlightedItemId":[8,"highlighted-item-id"]},null,{"highlightedItemId":[{"highlightedItemIdChanged":0}]}]]],["p-3252e153",[[1,"limebb-kanban",{"platform":[16],"context":[16],"groups":[16]}]]],["p-b10faec5",[[1,"limebb-chat-list",{"platform":[16],"context":[16],"items":[16],"loading":[516],"isTypingIndicatorVisible":[516,"is-typing-indicator-visible"],"lastVisitedTimestamp":[513,"last-visited-timestamp"],"order":[513]},null,{"items":[{"handleItemsChange":0}]}]]],["p-9ae55a96",[[1,"limebb-lime-query-response-format-builder",{"platform":[16],"context":[16],"limetype":[1],"value":[16],"label":[1],"helperText":[1,"helper-text"],"limetypes":[32],"mode":[32],"codeValue":[32],"internalValue":[32]}]]],["p-ebe6040f",[[1,"limebb-document-chips",{"accessibleLabel":[513,"accessible-label"],"files":[16]},null,{"files":[{"onFilesChanged":0}]}]]],["p-8e2cc2e8",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["p-b36ad4e8",[[17,"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],"draftIdentifier":[1,"draft-identifier"],"triggerMap":[16],"customElements":[16],"allowInlineImages":[4,"allow-inline-images"],"items":[32],"highlightedItemIndex":[32],"editorPickerQuery":[32],"searchableLimetypes":[32],"isPickerOpen":[32],"isSearching":[32]},null,{"isPickerOpen":[{"watchOpen":0}],"editorPickerQuery":[{"watchQuery":0}]}]]],["p-5fc88ece",[[1,"limebb-data-cells",{"platform":[16],"context":[16],"limeobject":[8],"items":[16],"image":[16]}]]],["p-35a51259",[[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-685dd8a1",[[1,"limebb-document-picker",{"platform":[16],"context":[16],"items":[16],"label":[513],"helperText":[513,"helper-text"],"invalid":[516],"required":[516],"type":[513]}]]],["p-b2383e7f",[[1,"limebb-info-tile-currency-format",{"platform":[16],"context":[16],"value":[16]}]]],["p-e2e9adff",[[1,"limebb-notification-list",{"platform":[16],"context":[16],"items":[16],"loading":[4],"lastVisitedTimestamp":[1,"last-visited-timestamp"]},null,{"items":[{"handleItemsChange":0}]}]]],["p-fcedbc77",[[257,"limebb-alert-dialog",{"type":[513],"open":[516],"icon":[513],"heading":[513],"subheading":[1]}]]],["p-aaeecca6",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["p-ba42e434",[[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]},null,{"formInfo":[{"watchFormInfo":0}],"configComponent":[{"watchconfigComponent":0}]}]]],["p-38201f65",[[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-528f3635",[[257,"limebb-composer-toolbar",{"platform":[16],"mentions":[516],"textSnippets":[516,"text-snippets"],"internalLinks":[516,"internal-links"],"richText":[516,"rich-text"],"fileInput":[16]}]]],["p-18fc1a06",[[257,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["p-4ddd75bc",[[1,"limebb-icon-picker",{"value":[1],"required":[4],"readonly":[4],"invalid":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["p-943c8589",[[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],"limetypes":[32]},null,{"filterId":[{"watchFilterId":0}],"propertyName":[{"watchPropertyName":0}],"aggregateOperator":[{"watchAggregateOperator":0}]}]]],["p-1428aa13",[[1,"limebb-info-tile-date-format",{"value":[16]}]]],["p-dabb227b",[[1,"limebb-info-tile-decimal-format",{"value":[16]}]]],["p-152edb10",[[1,"limebb-info-tile-format",{"platform":[16],"context":[16],"type":[1],"value":[16]}]]],["p-32f8477f",[[1,"limebb-info-tile-relative-date-format",{"value":[16]}]]],["p-3263f8d5",[[1,"limebb-info-tile-unit-format",{"value":[16]}]]],["p-60e22f51",[[1,"limebb-loader",{"platform":[16],"context":[16]}]]],["p-71191041",[[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-0afc0db2",[[257,"limebb-mention",{"limetype":[1],"objectid":[2],"limeobject":[32]}]]],["p-6cb2d9dd",[[1,"limebb-mention-group-counter",{"count":[2],"limetype":[16],"helperLabel":[1,"helper-label"]}]]],["p-740ae712",[[1,"limebb-object-chip",{"limetype":[1],"objectid":[2],"size":[1],"platform":[16],"data":[32]},null,{"limetype":[{"handlePropChange":0}],"objectid":[{"handlePropChange":0}]}]]],["p-5a1f0a2b",[[1,"limebb-trend-indicator",{"platform":[16],"context":[16],"value":[520],"formerValue":[514,"former-value"],"suffix":[513],"label":[513],"invalid":[516],"required":[516],"helperText":[513,"helper-text"],"reducePresence":[516,"reduce-presence"]},null,{"value":[{"valueChanged":0}]}]]],["p-b3ee6683",[[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"ui":[513],"helperText":[1,"helper-text"],"hasError":[516,"has-error"],"isBundled":[516,"is-bundled"],"headingCanExpand":[32],"isHeadingExpanded":[32],"showMore":[32],"isTall":[32]}]]],["p-62437a1d",[[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-8477cb5d",[[257,"limebb-kanban-item",{"platform":[16],"context":[16],"item":[16]}]]],["p-be8dc8ae",[[1,"limebb-kanban-group",{"platform":[16],"context":[16],"identifier":[1],"heading":[513],"help":[1],"items":[16],"summary":[1],"loading":[516],"totalCount":[514,"total-count"]}]]],["p-4446f170",[[1,"limebb-empty-state",{"heading":[513],"value":[513],"icon":[16]}]]],["p-d2a01f51",[[1,"limebb-text-editor-picker",{"items":[16],"open":[516],"isSearching":[4,"is-searching"],"emptyMessage":[1,"empty-message"]},null,{"open":[{"watchOpen":0}]}]]],["p-6fdee70a",[[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-f23ea0e7",[[17,"limebb-document-item",{"platform":[16],"context":[16],"item":[16],"type":[513],"fileTypes":[16]}]]],["p-c3b13800",[[1,"limebb-live-docs-info"]]],["p-cff9bccd",[[1,"limebb-notification-item",{"platform":[16],"context":[16],"item":[16]}]]],["p-f375d69a",[[1,"limebb-percentage-visualizer",{"platform":[16],"context":[16],"value":[520],"rangeMax":[514,"range-max"],"rangeMin":[514,"range-min"],"multiplier":[514],"label":[513],"invalid":[516],"required":[516],"helperText":[513,"helper-text"],"reducePresence":[516,"reduce-presence"],"displayPercentageColors":[516,"display-percentage-colors"]},null,{"value":[{"valueChanged":0}]}]]],["p-eec0a0c8",[[1,"limebb-lime-query-order-by-item",{"platform":[16],"context":[16],"limetype":[1],"item":[16]}]]],["p-fa41a9e6",[[1,"limebb-feed-item-thumbnail-file-info",{"description":[1]}]]],["p-52fb2a66",[[1,"limebb-lime-query-filter-builder",{"platform":[16],"context":[16],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}],[1,"limebb-lime-query-order-by-editor",{"platform":[16],"context":[16],"limetype":[1],"value":[16],"label":[1],"items":[32]},null,{"value":[{"handleValueChange":0}]}],[0,"limebb-limetype-field",{"platform":[16],"context":[16],"label":[513],"required":[516],"readonly":[516],"disabled":[516],"value":[513],"helperText":[513,"helper-text"],"invalid":[4],"limetypes":[16],"propertyFields":[16],"fieldName":[1,"field-name"],"formInfo":[16]}]]],["p-8a05a0e5",[[1,"limebb-chat-icon-list",{"item":[16]}],[1,"limebb-chat-item",{"platform":[16],"context":[16],"item":[16],"helperText":[1,"helper-text"],"hasError":[516,"has-error"]}],[1,"limebb-typing-indicator"]]],["p-1f02a411",[[1,"limebb-property-selector",{"platform":[16],"context":[16],"limetype":[1],"value":[1],"label":[1],"required":[4],"helperText":[1,"helper-text"],"limetypes":[32],"isOpen":[32],"navigationPath":[32]}]]],["p-1a61674f",[[1,"limebb-lime-query-response-format-editor",{"platform":[16],"context":[16],"limetype":[1],"value":[16],"label":[1],"items":[32]}],[1,"limebb-lime-query-response-format-item",{"platform":[16],"context":[16],"limetype":[1],"item":[16],"showAliasInput":[32],"showDescriptionInput":[32]}]]],["p-a48a6ff8",[[1,"limebb-lime-query-filter-expression",{"platform":[16],"context":[16],"label":[1],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}],[1,"limebb-lime-query-filter-comparison",{"platform":[16],"context":[16],"label":[513],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}]]],["p-ffb847d0",[[257,"limebb-summary-popover",{"triggerDelay":[514,"trigger-delay"],"heading":[513],"subheading":[513],"image":[16],"file":[16],"icon":[513],"value":[1],"openDirection":[513,"open-direction"],"popoverMaxWidth":[513,"popover-max-width"],"popoverMaxHeight":[513,"popover-max-height"],"actions":[16],"isPopoverOpen":[32]}],[17,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["p-bac3d599",[[1,"limebb-lime-query-value-input",{"platform":[16],"context":[16],"limetype":[1],"activeLimetype":[1,"active-limetype"],"propertyPath":[1,"property-path"],"operator":[1],"value":[8],"label":[1],"limetypes":[32],"inputMode":[32]}],[1,"limebb-lime-query-filter-group",{"platform":[16],"context":[16],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16],"value":[32]}],[1,"limebb-lime-query-filter-not",{"platform":[16],"context":[16],"label":[1],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}]]]]'),e))));
|
|
1
|
+
import{p as e,b as t}from"./p-BIwHMk6j.js";export{s as setNonce}from"./p-BIwHMk6j.js";import{g as i}from"./p-DQuL1Twl.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((async e=>(await i(),t(JSON.parse('[["p-fdf269f7",[[1,"limebb-lime-query-builder",{"platform":[16],"context":[16],"value":[16],"label":[1],"activeLimetype":[1,"active-limetype"],"limetypes":[32],"mode":[32],"codeValue":[32],"limetype":[32],"filter":[32],"internalResponseFormat":[32],"limit":[32],"orderBy":[32],"description":[32]}]]],["p-21ec697f",[[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"],"direction":[513],"lastVisitedTimestamp":[1,"last-visited-timestamp"],"highlightedItemId":[8,"highlighted-item-id"]},null,{"highlightedItemId":[{"highlightedItemIdChanged":0}]}]]],["p-3252e153",[[1,"limebb-kanban",{"platform":[16],"context":[16],"groups":[16]}]]],["p-b10faec5",[[1,"limebb-chat-list",{"platform":[16],"context":[16],"items":[16],"loading":[516],"isTypingIndicatorVisible":[516,"is-typing-indicator-visible"],"lastVisitedTimestamp":[513,"last-visited-timestamp"],"order":[513]},null,{"items":[{"handleItemsChange":0}]}]]],["p-9ae55a96",[[1,"limebb-lime-query-response-format-builder",{"platform":[16],"context":[16],"limetype":[1],"value":[16],"label":[1],"helperText":[1,"helper-text"],"limetypes":[32],"mode":[32],"codeValue":[32],"internalValue":[32]}]]],["p-ebe6040f",[[1,"limebb-document-chips",{"accessibleLabel":[513,"accessible-label"],"files":[16]},null,{"files":[{"onFilesChanged":0}]}]]],["p-8e2cc2e8",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["p-b36ad4e8",[[17,"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],"draftIdentifier":[1,"draft-identifier"],"triggerMap":[16],"customElements":[16],"allowInlineImages":[4,"allow-inline-images"],"items":[32],"highlightedItemIndex":[32],"editorPickerQuery":[32],"searchableLimetypes":[32],"isPickerOpen":[32],"isSearching":[32]},null,{"isPickerOpen":[{"watchOpen":0}],"editorPickerQuery":[{"watchQuery":0}]}]]],["p-ece5c8ad",[[1,"limebb-data-cells",{"platform":[16],"context":[16],"limeobject":[8],"items":[16],"image":[16]}]]],["p-35a51259",[[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-685dd8a1",[[1,"limebb-document-picker",{"platform":[16],"context":[16],"items":[16],"label":[513],"helperText":[513,"helper-text"],"invalid":[516],"required":[516],"type":[513]}]]],["p-b2383e7f",[[1,"limebb-info-tile-currency-format",{"platform":[16],"context":[16],"value":[16]}]]],["p-e2e9adff",[[1,"limebb-notification-list",{"platform":[16],"context":[16],"items":[16],"loading":[4],"lastVisitedTimestamp":[1,"last-visited-timestamp"]},null,{"items":[{"handleItemsChange":0}]}]]],["p-fcedbc77",[[257,"limebb-alert-dialog",{"type":[513],"open":[516],"icon":[513],"heading":[513],"subheading":[1]}]]],["p-aaeecca6",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["p-ba42e434",[[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]},null,{"formInfo":[{"watchFormInfo":0}],"configComponent":[{"watchconfigComponent":0}]}]]],["p-38201f65",[[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-528f3635",[[257,"limebb-composer-toolbar",{"platform":[16],"mentions":[516],"textSnippets":[516,"text-snippets"],"internalLinks":[516,"internal-links"],"richText":[516,"rich-text"],"fileInput":[16]}]]],["p-18fc1a06",[[257,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["p-4ddd75bc",[[1,"limebb-icon-picker",{"value":[1],"required":[4],"readonly":[4],"invalid":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["p-943c8589",[[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],"limetypes":[32]},null,{"filterId":[{"watchFilterId":0}],"propertyName":[{"watchPropertyName":0}],"aggregateOperator":[{"watchAggregateOperator":0}]}]]],["p-1428aa13",[[1,"limebb-info-tile-date-format",{"value":[16]}]]],["p-dabb227b",[[1,"limebb-info-tile-decimal-format",{"value":[16]}]]],["p-152edb10",[[1,"limebb-info-tile-format",{"platform":[16],"context":[16],"type":[1],"value":[16]}]]],["p-32f8477f",[[1,"limebb-info-tile-relative-date-format",{"value":[16]}]]],["p-3263f8d5",[[1,"limebb-info-tile-unit-format",{"value":[16]}]]],["p-60e22f51",[[1,"limebb-loader",{"platform":[16],"context":[16]}]]],["p-71191041",[[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-0afc0db2",[[257,"limebb-mention",{"limetype":[1],"objectid":[2],"limeobject":[32]}]]],["p-6cb2d9dd",[[1,"limebb-mention-group-counter",{"count":[2],"limetype":[16],"helperLabel":[1,"helper-label"]}]]],["p-740ae712",[[1,"limebb-object-chip",{"limetype":[1],"objectid":[2],"size":[1],"platform":[16],"data":[32]},null,{"limetype":[{"handlePropChange":0}],"objectid":[{"handlePropChange":0}]}]]],["p-5a1f0a2b",[[1,"limebb-trend-indicator",{"platform":[16],"context":[16],"value":[520],"formerValue":[514,"former-value"],"suffix":[513],"label":[513],"invalid":[516],"required":[516],"helperText":[513,"helper-text"],"reducePresence":[516,"reduce-presence"]},null,{"value":[{"valueChanged":0}]}]]],["p-b3ee6683",[[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"ui":[513],"helperText":[1,"helper-text"],"hasError":[516,"has-error"],"isBundled":[516,"is-bundled"],"headingCanExpand":[32],"isHeadingExpanded":[32],"showMore":[32],"isTall":[32]}]]],["p-62437a1d",[[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-8477cb5d",[[257,"limebb-kanban-item",{"platform":[16],"context":[16],"item":[16]}]]],["p-be8dc8ae",[[1,"limebb-kanban-group",{"platform":[16],"context":[16],"identifier":[1],"heading":[513],"help":[1],"items":[16],"summary":[1],"loading":[516],"totalCount":[514,"total-count"]}]]],["p-4446f170",[[1,"limebb-empty-state",{"heading":[513],"value":[513],"icon":[16]}]]],["p-d2a01f51",[[1,"limebb-text-editor-picker",{"items":[16],"open":[516],"isSearching":[4,"is-searching"],"emptyMessage":[1,"empty-message"]},null,{"open":[{"watchOpen":0}]}]]],["p-6fdee70a",[[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-f23ea0e7",[[17,"limebb-document-item",{"platform":[16],"context":[16],"item":[16],"type":[513],"fileTypes":[16]}]]],["p-c3b13800",[[1,"limebb-live-docs-info"]]],["p-cff9bccd",[[1,"limebb-notification-item",{"platform":[16],"context":[16],"item":[16]}]]],["p-f375d69a",[[1,"limebb-percentage-visualizer",{"platform":[16],"context":[16],"value":[520],"rangeMax":[514,"range-max"],"rangeMin":[514,"range-min"],"multiplier":[514],"label":[513],"invalid":[516],"required":[516],"helperText":[513,"helper-text"],"reducePresence":[516,"reduce-presence"],"displayPercentageColors":[516,"display-percentage-colors"]},null,{"value":[{"valueChanged":0}]}]]],["p-eec0a0c8",[[1,"limebb-lime-query-order-by-item",{"platform":[16],"context":[16],"limetype":[1],"item":[16]}]]],["p-fa41a9e6",[[1,"limebb-feed-item-thumbnail-file-info",{"description":[1]}]]],["p-52fb2a66",[[1,"limebb-lime-query-filter-builder",{"platform":[16],"context":[16],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}],[1,"limebb-lime-query-order-by-editor",{"platform":[16],"context":[16],"limetype":[1],"value":[16],"label":[1],"items":[32]},null,{"value":[{"handleValueChange":0}]}],[0,"limebb-limetype-field",{"platform":[16],"context":[16],"label":[513],"required":[516],"readonly":[516],"disabled":[516],"value":[513],"helperText":[513,"helper-text"],"invalid":[4],"limetypes":[16],"propertyFields":[16],"fieldName":[1,"field-name"],"formInfo":[16]}]]],["p-8a05a0e5",[[1,"limebb-chat-icon-list",{"item":[16]}],[1,"limebb-chat-item",{"platform":[16],"context":[16],"item":[16],"helperText":[1,"helper-text"],"hasError":[516,"has-error"]}],[1,"limebb-typing-indicator"]]],["p-1f02a411",[[1,"limebb-property-selector",{"platform":[16],"context":[16],"limetype":[1],"value":[1],"label":[1],"required":[4],"helperText":[1,"helper-text"],"limetypes":[32],"isOpen":[32],"navigationPath":[32]}]]],["p-1a61674f",[[1,"limebb-lime-query-response-format-editor",{"platform":[16],"context":[16],"limetype":[1],"value":[16],"label":[1],"items":[32]}],[1,"limebb-lime-query-response-format-item",{"platform":[16],"context":[16],"limetype":[1],"item":[16],"showAliasInput":[32],"showDescriptionInput":[32]}]]],["p-a48a6ff8",[[1,"limebb-lime-query-filter-expression",{"platform":[16],"context":[16],"label":[1],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}],[1,"limebb-lime-query-filter-comparison",{"platform":[16],"context":[16],"label":[513],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}]]],["p-ffb847d0",[[257,"limebb-summary-popover",{"triggerDelay":[514,"trigger-delay"],"heading":[513],"subheading":[513],"image":[16],"file":[16],"icon":[513],"value":[1],"openDirection":[513,"open-direction"],"popoverMaxWidth":[513,"popover-max-width"],"popoverMaxHeight":[513,"popover-max-height"],"actions":[16],"isPopoverOpen":[32]}],[17,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["p-bac3d599",[[1,"limebb-lime-query-value-input",{"platform":[16],"context":[16],"limetype":[1],"activeLimetype":[1,"active-limetype"],"propertyPath":[1,"property-path"],"operator":[1],"value":[8],"label":[1],"limetypes":[32],"inputMode":[32]}],[1,"limebb-lime-query-filter-group",{"platform":[16],"context":[16],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16],"value":[32]}],[1,"limebb-lime-query-filter-not",{"platform":[16],"context":[16],"label":[1],"limetype":[1],"activeLimetype":[1,"active-limetype"],"expression":[16]}]]]]'),e))));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as r}from"./p-BIwHMk6j.js";import{n as t}from"./p-CcGMZOP-.js";import{c as o}from"./p-C2JP2nLw.js";const i=36e5,n=24*i,a=[{unit:"year",ms:365*n},{unit:"month",ms:30*n},{unit:"week",ms:7*n},{unit:"day",ms:n},{unit:"hour",ms:i},{unit:"minute",ms:6e4},{unit:"second",ms:1e3}];function s(e,r){var t;const o=e.getTime()-Date.now(),{unit:i,ms:n}=null!==(t=a.find((e=>Math.abs(o)>=e.ms)))&&void 0!==t?t:a.at(-1);return new Intl.RelativeTimeFormat(r,{style:"long"}).format(Math.round(o/n),i)}const l=class{constructor(t){e(this,t),this.items=[],this.renderCell=e=>r("div",null,r("dt",null,r("span",null,e.label)),r("dd",null,r("span",null,this.renderValue(e))))}render(){const e=this.items.some((e=>!e.secondary));return[this.renderPrimary(e),this.renderSecondary(e)]}renderPrimary(e){if(!e)return;const t=this.items.filter((e=>!e.secondary));return r("dl",{class:"primary"},this.renderImageCell(),t.map(this.renderCell))}renderSecondary(e){const t=this.items.filter((e=>e.secondary));if(0!==t.length)return r("dl",{class:"secondary"},!e&&this.renderImageCell(),t.map(this.renderCell))}renderImageCell(){var e;if(this.image)return r("div",{class:"image-cell"},r("img",{src:this.image.src,alt:this.image.alt,loading:null!==(e=this.image.loading)&&void 0!==e?e:"lazy"}))}renderValue(e){if(null==e.value||""===e.value)return"–";if("belongsto"===e.type){const t=this.getBelongsToHref(e.field);return t?r("a",{class:"belongs-to",href:t},e.value):e.value}if("phone"===e.type)return r("a",{href:this.toTelUri(e.value)},e.value);if("email"===e.type)return r("a",{href:`mailto:${e.value}`},e.value);if("link"===e.type)return r("a",{href:this.ensureUrlProtocol(e.value),target:"_blank",rel:"noopener"},this.stripUrlPrefix(e.value));if("time"===e.type||"date"===e.type){const t=new Date(e.value);if(Number.isNaN(t.getTime()))return e.value;const i=o();return[r("span",{id:i},s(t,this.language)),r("limel-tooltip",{elementId:i,label:this.formatAbsoluteDate(t,e.type)})]}return"percent"===e.type?r("limebb-percentage-visualizer",{value:Number(e.value),multiplier:100,displayPercentageColors:!0,reducePresence:!1}):e.value}toTelUri(e){return`tel:${e.replaceAll(" ","")}`}ensureUrlProtocol(e){return/^https?:\/\//i.test(e)?e:`https://${e}`}stripUrlPrefix(e){return e.replace(/^https?:\/\//,"").replace(/^www\./,"")}getBelongsToHref(e){var r;if(this.limeobject&&e)try{const t=this.limeobject.getValue(e);if(!t||"object"!=typeof t)return;const o=null===(r=t.getLimetype)||void 0===r?void 0:r.call(t);if(!(null==o?void 0:o.name)||!t.id)return;return`object/${o.name}/${t.id}`}catch(e){return}}get language(){var e;try{return null===(e=this.platform)||void 0===e?void 0:e.get(t.Application).getLanguage()}catch(e){return navigator.language}}formatAbsoluteDate(e,r){var o;try{const i=null===(o=this.platform)||void 0===o?void 0:o.get(t.DateTimeFormatter);if(i)return i.format(e,r)}catch(e){}return e.toLocaleString(this.language,{dateStyle:"long",timeStyle:"time"===r?"short":void 0})}};l.style='@charset "UTF-8";*,*:before,*:after{box-sizing:border-box;min-width:0;min-height:0}:host(limebb-data-cells){box-sizing:border-box;display:flex;flex-direction:column;gap:0.5rem;padding:var(--limebb-data-cells-padding)}div{display:flex;flex-direction:column}dl{display:flex;flex-wrap:wrap;gap:0.75rem 1rem;margin:0;padding:0;list-style:none}dd,dt{display:flex;align-items:center}dd span,dt span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}dd{margin:0;font-size:var(--limel-theme-default-font-size);line-height:1.25rem;height:1.25rem;font-weight:500;color:rgb(var(--contrast-1100))}dd a{text-decoration:none;border-radius:1.25rem}dd a:focus{outline:none}dd a:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}dd a:not(.belongs-to){position:relative;cursor:pointer;transition:color 0.2s ease;color:rgb(var(--color-blue-default))}dd a:not(.belongs-to):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)}dd a:not(.belongs-to):hover{color:rgb(var(--color-blue-default))}dd a:not(.belongs-to):hover:before{opacity:0.3;transform:scale(1)}dd a.belongs-to{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);color:inherit;background-color:rgb(var(--contrast-400));padding:1px 0.375rem}dd a.belongs-to:hover,dd a.belongs-to:focus-visible{color:rgb(var(--color-white));background-color:rgb(var(--color-sky-default))}dd:has(.belongs-to){transform:translateX(-0.375rem)}dt{order:1;transition:color 0.2s ease;font-size:0.65rem;color:rgb(var(--contrast-800))}:host(:hover) dt,:host(:focus-within) dt{color:rgb(var(--contrast-900))}.primary+.secondary{padding-top:0.5rem;border-top:1px dashed rgb(var(--contrast-500))}.secondary dd{font-size:0.75rem;font-weight:400;line-height:1rem;height:1rem}div.image-cell{flex-shrink:0}div.image-cell img{display:block;width:2.5rem;height:2.5rem;border-radius:var(--data-cells-image-border-radius, 50%);object-fit:var(--data-cells-image-object-fit, cover);background-color:rgb(var(--color-white));box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.25)}';export{l as limebb_data_cells}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as r}from"./p-BIwHMk6j.js";import{n as t}from"./p-CcGMZOP-.js";const o=36e5,i=24*o,a=[{unit:"year",ms:365*i},{unit:"month",ms:30*i},{unit:"week",ms:7*i},{unit:"day",ms:i},{unit:"hour",ms:o},{unit:"minute",ms:6e4},{unit:"second",ms:1e3}],n=class{constructor(t){e(this,t),this.items=[],this.renderCell=e=>r("div",null,r("dt",null,r("span",null,e.label)),r("dd",null,r("span",null,this.renderValue(e))))}render(){const e=this.items.some((e=>!e.secondary));return[this.renderPrimary(e),this.renderSecondary(e)]}renderPrimary(e){if(!e)return;const t=this.items.filter((e=>!e.secondary));return r("dl",{class:"primary"},this.renderImageCell(),t.map(this.renderCell))}renderSecondary(e){const t=this.items.filter((e=>e.secondary));if(0!==t.length)return r("dl",{class:"secondary"},!e&&this.renderImageCell(),t.map(this.renderCell))}renderImageCell(){var e;if(this.image)return r("div",{class:"image-cell"},r("img",{src:this.image.src,alt:this.image.alt,loading:null!==(e=this.image.loading)&&void 0!==e?e:"lazy"}))}renderValue(e){if(null==e.value||""===e.value)return"–";if("belongsto"===e.type){const t=this.getBelongsToHref(e.field);return t?r("a",{class:"belongs-to",href:t},e.value):e.value}if("phone"===e.type)return r("a",{href:this.toTelUri(e.value)},e.value);if("email"===e.type)return r("a",{href:`mailto:${e.value}`},e.value);if("link"===e.type)return r("a",{href:this.ensureUrlProtocol(e.value),target:"_blank",rel:"noopener"},this.stripUrlPrefix(e.value));if("time"===e.type||"date"===e.type){const r=new Date(e.value);return Number.isNaN(r.getTime())?e.value:function(e,r){var t;const o=e.getTime()-Date.now(),{unit:i,ms:n}=null!==(t=a.find((e=>Math.abs(o)>=e.ms)))&&void 0!==t?t:a.at(-1);return new Intl.RelativeTimeFormat(r,{style:"long"}).format(Math.round(o/n),i)}(r,this.language)}return"percent"===e.type?r("limebb-percentage-visualizer",{value:Number(e.value),multiplier:100,displayPercentageColors:!0,reducePresence:!1}):e.value}toTelUri(e){return`tel:${e.replaceAll(" ","")}`}ensureUrlProtocol(e){return/^https?:\/\//i.test(e)?e:`https://${e}`}stripUrlPrefix(e){return e.replace(/^https?:\/\//,"").replace(/^www\./,"")}getBelongsToHref(e){var r;if(this.limeobject&&e)try{const t=this.limeobject.getValue(e);if(!t||"object"!=typeof t)return;const o=null===(r=t.getLimetype)||void 0===r?void 0:r.call(t);if(!(null==o?void 0:o.name)||!t.id)return;return`object/${o.name}/${t.id}`}catch(e){return}}get language(){var e;try{return null===(e=this.platform)||void 0===e?void 0:e.get(t.Application).getLanguage()}catch(e){return navigator.language}}};n.style='@charset "UTF-8";*,*:before,*:after{box-sizing:border-box;min-width:0;min-height:0}:host(limebb-data-cells){box-sizing:border-box;display:flex;flex-direction:column;gap:0.5rem;padding:var(--limebb-data-cells-padding)}div{display:flex;flex-direction:column}dl{display:flex;flex-wrap:wrap;gap:0.75rem 1rem;margin:0;padding:0;list-style:none}dd,dt{display:flex;align-items:center}dd span,dt span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}dd{margin:0;font-size:var(--limel-theme-default-font-size);line-height:1.25rem;height:1.25rem;font-weight:500;color:rgb(var(--contrast-1100))}dd a{text-decoration:none;border-radius:1.25rem}dd a:focus{outline:none}dd a:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}dd a:not(.belongs-to){position:relative;cursor:pointer;transition:color 0.2s ease;color:rgb(var(--color-blue-default))}dd a:not(.belongs-to):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)}dd a:not(.belongs-to):hover{color:rgb(var(--color-blue-default))}dd a:not(.belongs-to):hover:before{opacity:0.3;transform:scale(1)}dd a.belongs-to{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);color:inherit;background-color:rgb(var(--contrast-400));padding:1px 0.375rem}dd a.belongs-to:hover,dd a.belongs-to:focus-visible{color:rgb(var(--color-white));background-color:rgb(var(--color-sky-default))}dd:has(.belongs-to){transform:translateX(-0.375rem)}dt{order:1;transition:color 0.2s ease;font-size:0.65rem;color:rgb(var(--contrast-800))}:host(:hover) dt,:host(:focus-within) dt{color:rgb(var(--contrast-900))}.primary+.secondary{padding-top:0.5rem;border-top:1px dashed rgb(var(--contrast-500))}.secondary dd{font-size:0.75rem;font-weight:400;line-height:1rem;height:1rem}div.image-cell{flex-shrink:0}div.image-cell img{display:block;width:2.5rem;height:2.5rem;border-radius:var(--data-cells-image-border-radius, 50%);object-fit:var(--data-cells-image-object-fit, cover);background-color:rgb(var(--color-white));box-shadow:0 0 0 1px rgb(var(--contrast-800), 0.25)}';export{n as limebb_data_cells}
|