@limetech/lime-crm-building-blocks 1.79.0 → 1.81.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 +19 -0
- package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
- package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +2 -2
- package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +3 -3
- package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +194 -0
- package/dist/cjs/limebb-text-editor.cjs.entry.js +1 -1
- package/dist/cjs/limebb-trend-indicator.cjs.entry.js +5 -31
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/percentage-class-9decca4f.js +66 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/percentage-visualizer/percentage-visualizer.css +298 -0
- package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +470 -0
- package/dist/collection/components/summary-popover/summary-popover.js +3 -3
- package/dist/collection/components/text-editor/mention-group-counter.js +2 -2
- package/dist/collection/components/text-editor/text-editor.js +1 -1
- package/dist/collection/components/trend-indicator/trend-indicator.css +89 -29
- package/dist/collection/components/trend-indicator/trend-indicator.js +1 -1
- package/dist/collection/util/percentage-class.js +53 -17
- package/dist/components/limebb-mention-group-counter.js +2 -2
- package/dist/components/limebb-percentage-visualizer.d.ts +11 -0
- package/dist/components/limebb-percentage-visualizer.js +223 -0
- package/dist/components/limebb-text-editor.js +1 -1
- package/dist/components/limebb-trend-indicator.js +3 -29
- package/dist/components/percentage-class.js +64 -0
- package/dist/components/summary-popover.js +3 -3
- package/dist/esm/lime-crm-building-blocks.js +1 -1
- package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
- package/dist/esm/limebb-navigation-button_2.entry.js +3 -3
- package/dist/esm/limebb-percentage-visualizer.entry.js +190 -0
- package/dist/esm/limebb-text-editor.entry.js +1 -1
- package/dist/esm/limebb-trend-indicator.entry.js +3 -29
- package/dist/esm/loader.js +1 -1
- package/dist/esm/percentage-class-78377c1e.js +64 -0
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/p-1127abb7.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-2b0ec58c.js +1 -0
- package/dist/lime-crm-building-blocks/p-462724ad.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-e758610c.entry.js → p-7e2c3261.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-bd2f82da.entry.js → p-866d7e3d.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-fa38a7f1.entry.js → p-93d1c26b.entry.js} +1 -1
- package/dist/types/components/card/card.types.d.ts +19 -7
- package/dist/types/components/percentage-visualizer/percentage-visualizer.d.ts +114 -0
- package/dist/types/components.d.ts +185 -0
- package/dist/types/util/percentage-class.d.ts +23 -0
- package/package.json +2 -2
- package/dist/lime-crm-building-blocks/p-07c80857.entry.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## [1.81.0](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.80.0...v1.81.0) (2025-05-27)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
* **percentage-visualizer:** add new component ([9745010](https://github.com/Lundalogik/lime-crm-building-blocks/commit/97450108db1c4d05442d9713f45c215abb3cb761))
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
* **trend-indicator:** better visualize values above 200% and below -200% ([5690e87](https://github.com/Lundalogik/lime-crm-building-blocks/commit/5690e87021711618e6f0115b69ac332795f8c758))
|
|
11
|
+
* **trend-indicator:** handle styles when label is lacking, more precisely ([54e7185](https://github.com/Lundalogik/lime-crm-building-blocks/commit/54e7185ede498a890d73cad2f67540ae50fe5998))
|
|
12
|
+
|
|
13
|
+
## [1.80.0](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.79.0...v1.80.0) (2025-05-27)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
* **card:** add limeobject property to card component interface ([ed97c52](https://github.com/Lundalogik/lime-crm-building-blocks/commit/ed97c52ff6d42117657fe525dd3abb9713f03959))
|
|
19
|
+
|
|
1
20
|
## [1.79.0](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.78.1...v1.79.0) (2025-05-21)
|
|
2
21
|
|
|
3
22
|
### Features
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["limebb-feed.cjs",[[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":[1],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-kanban.cjs",[[1,"limebb-kanban",{"platform":[16],"context":[16],"groups":[16]}]]],["limebb-chat-list.cjs",[[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"]}]]],["limebb-text-editor.cjs",[[1,"limebb-text-editor",{"platform":[16],"context":[16],"allowMentioning":[4,"allow-mentioning"],"contentType":[1,"content-type"],"language":[513],"disabled":[516],"readonly":[516],"helperText":[513,"helper-text"],"placeholder":[513],"label":[513],"invalid":[516],"required":[516],"selectedContext":[16],"ui":[513],"allowResize":[4,"allow-resize"],"value":[1],"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"],"editorPickerQuery":["watchQuery"]}]]],["limebb-date-range.cjs",[[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]}]]],["limebb-info-tile-currency-format.cjs",[[1,"limebb-info-tile-currency-format",{"platform":[16],"context":[16],"value":[16]}]]],["limebb-notification-list.cjs",[[1,"limebb-notification-list",{"platform":[16],"context":[16],"items":[16],"loading":[4],"lastVisitedTimestamp":[1,"last-visited-timestamp"]},null,{"items":["handleItemsChange"]}]]],["limebb-browser.cjs",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["limebb-component-config.cjs",[[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"],"configComponent":["watchconfigComponent"]}]]],["limebb-component-picker.cjs",[[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"]}]]],["limebb-dashboard-widget.cjs",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["limebb-icon-picker.cjs",[[1,"limebb-icon-picker",{"value":[1],"required":[4],"readonly":[4],"invalid":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-info-tile.cjs",[[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]},null,{"filterId":["watchFilterId"],"propertyName":["watchPropertyName"],"aggregateOperator":["watchAggregateOperator"]}]]],["limebb-info-tile-date-format.cjs",[[1,"limebb-info-tile-date-format",{"value":[16]}]]],["limebb-info-tile-decimal-format.cjs",[[1,"limebb-info-tile-decimal-format",{"value":[16]}]]],["limebb-info-tile-format.cjs",[[1,"limebb-info-tile-format",{"platform":[16],"context":[16],"type":[1],"value":[16]}]]],["limebb-info-tile-relative-date-format.cjs",[[1,"limebb-info-tile-relative-date-format",{"value":[16]}]]],["limebb-info-tile-unit-format.cjs",[[1,"limebb-info-tile-unit-format",{"value":[16]}]]],["limebb-limeobject-file-viewer.cjs",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["limebb-locale-picker.cjs",[[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]}]]],["limebb-mention.cjs",[[1,"limebb-mention",{"limetype":[1],"objectid":[2],"limeobject":[32]}]]],["limebb-mention-group-counter.cjs",[[1,"limebb-mention-group-counter",{"count":[2],"limetype":[16],"helperLabel":[1,"helper-label"]}]]],["limebb-trend-indicator.cjs",[[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"]}]]],["limebb-navigation-button_2.cjs",[[1,"limebb-summary-popover",{"triggerDelay":[514,"trigger-delay"],"heading":[513],"subheading":[513],"image":[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]}]]],["limebb-kanban-
|
|
22
|
+
return index.bootstrapLazy([["limebb-feed.cjs",[[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":[1],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-kanban.cjs",[[1,"limebb-kanban",{"platform":[16],"context":[16],"groups":[16]}]]],["limebb-chat-list.cjs",[[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"]}]]],["limebb-text-editor.cjs",[[1,"limebb-text-editor",{"platform":[16],"context":[16],"allowMentioning":[4,"allow-mentioning"],"contentType":[1,"content-type"],"language":[513],"disabled":[516],"readonly":[516],"helperText":[513,"helper-text"],"placeholder":[513],"label":[513],"invalid":[516],"required":[516],"selectedContext":[16],"ui":[513],"allowResize":[4,"allow-resize"],"value":[1],"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"],"editorPickerQuery":["watchQuery"]}]]],["limebb-date-range.cjs",[[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]}]]],["limebb-info-tile-currency-format.cjs",[[1,"limebb-info-tile-currency-format",{"platform":[16],"context":[16],"value":[16]}]]],["limebb-notification-list.cjs",[[1,"limebb-notification-list",{"platform":[16],"context":[16],"items":[16],"loading":[4],"lastVisitedTimestamp":[1,"last-visited-timestamp"]},null,{"items":["handleItemsChange"]}]]],["limebb-browser.cjs",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["limebb-component-config.cjs",[[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"],"configComponent":["watchconfigComponent"]}]]],["limebb-component-picker.cjs",[[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"]}]]],["limebb-dashboard-widget.cjs",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["limebb-icon-picker.cjs",[[1,"limebb-icon-picker",{"value":[1],"required":[4],"readonly":[4],"invalid":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-info-tile.cjs",[[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]},null,{"filterId":["watchFilterId"],"propertyName":["watchPropertyName"],"aggregateOperator":["watchAggregateOperator"]}]]],["limebb-info-tile-date-format.cjs",[[1,"limebb-info-tile-date-format",{"value":[16]}]]],["limebb-info-tile-decimal-format.cjs",[[1,"limebb-info-tile-decimal-format",{"value":[16]}]]],["limebb-info-tile-format.cjs",[[1,"limebb-info-tile-format",{"platform":[16],"context":[16],"type":[1],"value":[16]}]]],["limebb-info-tile-relative-date-format.cjs",[[1,"limebb-info-tile-relative-date-format",{"value":[16]}]]],["limebb-info-tile-unit-format.cjs",[[1,"limebb-info-tile-unit-format",{"value":[16]}]]],["limebb-limeobject-file-viewer.cjs",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["limebb-locale-picker.cjs",[[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]}]]],["limebb-mention.cjs",[[1,"limebb-mention",{"limetype":[1],"objectid":[2],"limeobject":[32]}]]],["limebb-mention-group-counter.cjs",[[1,"limebb-mention-group-counter",{"count":[2],"limetype":[16],"helperLabel":[1,"helper-label"]}]]],["limebb-percentage-visualizer.cjs",[[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"]}]]],["limebb-trend-indicator.cjs",[[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"]}]]],["limebb-navigation-button_2.cjs",[[1,"limebb-summary-popover",{"triggerDelay":[514,"trigger-delay"],"heading":[513],"subheading":[513],"image":[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]}]]],["limebb-kanban-group.cjs",[[1,"limebb-kanban-group",{"platform":[16],"context":[16],"identifier":[1],"heading":[513],"help":[1],"items":[16],"summary":[1],"loading":[516],"totalCount":[514,"total-count"]}]]],["limebb-feed-timeline-item.cjs",[[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"ui":[513],"isBundled":[516,"is-bundled"],"headingCanExpand":[32],"isHeadingExpanded":[32],"showMore":[32],"isTall":[32]}]]],["limebb-text-editor-picker.cjs",[[1,"limebb-text-editor-picker",{"items":[16],"open":[516],"isSearching":[4,"is-searching"],"emptyMessage":[1,"empty-message"]},null,{"open":["watchOpen"]}]]],["limebb-currency-picker.cjs",[[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]}]]],["limebb-date-picker.cjs",[[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]}]]],["limebb-notification-item.cjs",[[1,"limebb-notification-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-kanban-item.cjs",[[1,"limebb-kanban-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-chat-item_2.cjs",[[1,"limebb-chat-item",{"platform":[16],"context":[16],"item":[16],"helperText":[1,"helper-text"],"hasError":[516,"has-error"]}],[1,"limebb-typing-indicator"]]],["limebb-empty-state.cjs",[[1,"limebb-empty-state",{"heading":[513],"value":[513],"icon":[16]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -15,8 +15,8 @@ const MentionGroupCounter = class {
|
|
|
15
15
|
render() {
|
|
16
16
|
const label = this.getLabel();
|
|
17
17
|
return [
|
|
18
|
-
index.h("span", { key: '
|
|
19
|
-
index.h("limel-tooltip", { key: '
|
|
18
|
+
index.h("span", { key: 'c0ac7333660f75ade59c06724cd9dbd810e13c1a', id: this.tooltipId }, label),
|
|
19
|
+
index.h("limel-tooltip", { key: '5dd8e4b8f58b170742584993d28f6db3c04fd619', elementId: this.tooltipId, label: label, helperLabel: this.helperLabel }),
|
|
20
20
|
];
|
|
21
21
|
}
|
|
22
22
|
getLabel() {
|
|
@@ -124,14 +124,14 @@ const SummaryPopover = class {
|
|
|
124
124
|
top: '0.125rem',
|
|
125
125
|
right: '0.125rem',
|
|
126
126
|
};
|
|
127
|
-
return (index.h("limel-popover", { key: '
|
|
127
|
+
return (index.h("limel-popover", { key: '7625dfa1a7a8b7205f1a581df2191a7e26ef64d3', style: {
|
|
128
128
|
'--limebb-summary-popover-timeout': `${this.triggerDelay}ms`,
|
|
129
|
-
}, open: this.isPopoverOpen, onClose: this.onPopoverClose, openDirection: this.openDirection }, index.h("div", { key: '
|
|
129
|
+
}, open: this.isPopoverOpen, onClose: this.onPopoverClose, openDirection: this.openDirection }, index.h("div", { key: '14810a7c8bc98db2234def273783527e76264a79', slot: "trigger", tabIndex: 0, onMouseEnter: this.openPopoverWithDelay, onMouseLeave: this.resetTimeout, onFocus: this.openPopoverWithDelay }, index.h("slot", { key: 'e31fa33fde94ee1431c8238bbdb8fad0c7825082', name: "trigger" }), index.h("div", { key: '44842e110d896a81e2241e9bb7ca73d8018880d9', class: "opening-countdown-indicator" })), index.h("limel-card", { key: 'fd0ddbdc7f0cb8ee1b31f2f5e0fec50556d7c51f', style: {
|
|
130
130
|
'max-width': this.popoverMaxWidth,
|
|
131
131
|
'max-height': this.popoverMaxHeight,
|
|
132
132
|
'min-width': '7rem',
|
|
133
133
|
'min-height': '3rem',
|
|
134
|
-
}, orientation: "landscape", heading: this.heading, subheading: this.subheading, icon: this.icon, value: this.value, image: this.image, actions: this.actions, onActionSelected: this.handleSelected }, index.h("limebb-navigation-button", { key: '
|
|
134
|
+
}, orientation: "landscape", heading: this.heading, subheading: this.subheading, icon: this.icon, value: this.value, image: this.image, actions: this.actions, onActionSelected: this.handleSelected }, index.h("limebb-navigation-button", { key: '1ffdcf8dff18620f1551442a65f47a17af256965', slot: "component", type: "close", style: closeButtonStyle, tooltipLabel: "Close", tooltipHelperLabel: "Esc", onClick: this.handleCloseClick }))));
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
137
|
SummaryPopover.currentOpenPopover = null;
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-d3b7747e.js');
|
|
6
|
+
const percentageClass = require('./percentage-class-9decca4f.js');
|
|
7
|
+
|
|
8
|
+
const percentageVisualizerCss = "@charset \"UTF-8\";*,::before,::after{box-sizing:border-box}:host(limebb-percentage-visualizer){width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}:host(limebb-percentage-visualizer[invalid]:not([invalid=false])) div[slot=content]{border-color:rgb(var(--color-red-default))}:host(limebb-percentage-visualizer):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}.percentage-text{flex-shrink:0;min-width:2.5rem}:host([range-min^=\"-\"]) .percentage-text{min-width:3.75rem}.percent-sign{opacity:0.4}.zero-point{content:\"\";position:absolute;transform:translateX(-50%);left:var(--limebb-percentage-visualizer-zero-point-position);height:0.25rem;width:0.25rem;border-radius:50%;box-shadow:0 0 0 0.125rem var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-1200), 0.3));background-color:var(--limebb-percentage-visualizer-zero-point-color, rgb(var(--contrast-200), 0.9))}.percentage-bar{overflow:hidden;flex-grow:1;position:relative;display:flex;align-items:center;height:0.5rem;min-width:2rem;border-radius:0.5rem;background-color:rgb(var(--contrast-800), 0.6)}.percentage-fill{transition:width 0.2s ease;position:absolute;margin:auto;left:var(--limebb-percentage-visualizer-zero-point-position, 0);rotate:var(--limebb-percentage-visualizer-rotate, 0deg);transform-origin:left center;width:var(--limebb-percentage-visualizer-width);height:100%;border-radius:0.5rem}:host(limebb-percentage-visualizer:focus),:host(limebb-percentage-visualizer:focus-visible),:host(limebb-percentage-visualizer:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-percentage-visualizer){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-percentage-visualizer:focus) limel-helper-line,:host(limebb-percentage-visualizer:focus-visible) limel-helper-line,:host(limebb-percentage-visualizer:focus-within) limel-helper-line,:host(limebb-percentage-visualizer:hover) limel-helper-line{will-change:grid-template-rows}.percentage-fill{background-color:var(--percentage-visualizer-color, var(--limebb-percentage-visualizer-color, var(--mdc-theme-primary)))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-darker))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200to100-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to90-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to80-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-dark))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to70-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to60-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-red-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to50-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to40-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-coral-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to30-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to20-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-orange-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to10-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to0-negative) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-amber-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-yellow-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-grass-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-lime-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-default))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([range-min^=\"-\"][display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--contrast-800))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-0to10-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--0to10)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-10to20-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--10to20)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-20to30-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--20to30)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-30to40-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--30to40)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-40to50-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--40to50)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-50to60-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--50to60)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-60to70-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--60to70)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-70to80-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--70to80)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-80to90-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--80to90)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-90to100-positive) .percentage-fill{--limebb-percentage-visualizer-color:var(--color-percent--90to100)}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-100to200-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-dark))}:host([display-percentage-colors]:not([display-percentage-colors=false]).has-value-200or-larger-positive) .percentage-fill{--limebb-percentage-visualizer-color:rgb(var(--color-teal-darker))}";
|
|
9
|
+
const LimebbPercentageVisualizerStyle0 = percentageVisualizerCss;
|
|
10
|
+
|
|
11
|
+
const DEFAULT_MULTIPLIER_FACTOR = 1;
|
|
12
|
+
const DEFAULT_RANGE_MAX = 100;
|
|
13
|
+
const DEFAULT_RANGE_MIN = 0;
|
|
14
|
+
const PERCENTAGE = 100;
|
|
15
|
+
const DECIMALS = 10;
|
|
16
|
+
const EPSILON = 0.0001;
|
|
17
|
+
const PercentageVisualizer = class {
|
|
18
|
+
valueChanged(newValue) {
|
|
19
|
+
this.numValue = this.parseValue(newValue);
|
|
20
|
+
}
|
|
21
|
+
constructor(hostRef) {
|
|
22
|
+
index.registerInstance(this, hostRef);
|
|
23
|
+
/**
|
|
24
|
+
* The maximum value of the visualization range.
|
|
25
|
+
* This defines the upper bound of the scale used for visualization.
|
|
26
|
+
* Must be greater than rangeMin.
|
|
27
|
+
*/
|
|
28
|
+
this.rangeMax = DEFAULT_RANGE_MAX;
|
|
29
|
+
/**
|
|
30
|
+
* The minimum value of the visualization range.
|
|
31
|
+
* This defines the lower bound of the scale used for visualization.
|
|
32
|
+
* Must be less than rangeMax.
|
|
33
|
+
*/
|
|
34
|
+
this.rangeMin = DEFAULT_RANGE_MIN;
|
|
35
|
+
/**
|
|
36
|
+
* A multiplier factor to convert input values to percentages.
|
|
37
|
+
* For example, if your input is 0.75 and you want to display it as 75%, use a multiplier of 100.
|
|
38
|
+
*/
|
|
39
|
+
this.multiplier = DEFAULT_MULTIPLIER_FACTOR;
|
|
40
|
+
/**
|
|
41
|
+
* When set to `false`, if the `value` equals `0` or there is no value
|
|
42
|
+
* (_undefined_, _null_ or empty string), the component will
|
|
43
|
+
* render the visualization. See the examples for more details.
|
|
44
|
+
*/
|
|
45
|
+
this.reducePresence = true;
|
|
46
|
+
/**
|
|
47
|
+
* When set to `true`, makes the filled section showing the percentage colorful.
|
|
48
|
+
* Colors change follow Lime CRM's conventions:
|
|
49
|
+
* - with intervals of 10%, from 0% to 100% (when the range doesn't start with a negative value).
|
|
50
|
+
* - with intervals of 20%, from -200% to +200% (when the range starts with a negative value).
|
|
51
|
+
*/
|
|
52
|
+
this.displayPercentageColors = false;
|
|
53
|
+
this.labelId = 'label-' + crypto.randomUUID();
|
|
54
|
+
this.helperTextId = 'helper-text-' + crypto.randomUUID();
|
|
55
|
+
this.zeroPointId = 'zero-point-' + crypto.randomUUID();
|
|
56
|
+
this.renderHelperLine = () => {
|
|
57
|
+
if (!this.hasHelperText()) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
return (index.h("limel-helper-line", { helperTextId: this.helperTextId, helperText: this.helperText, invalid: this.invalid }));
|
|
61
|
+
};
|
|
62
|
+
this.hasHelperText = () => {
|
|
63
|
+
return this.helperText !== null && this.helperText !== undefined;
|
|
64
|
+
};
|
|
65
|
+
this.numValue = this.parseValue(this.value);
|
|
66
|
+
}
|
|
67
|
+
componentDidLoad() {
|
|
68
|
+
this.triggerRangeWarning();
|
|
69
|
+
}
|
|
70
|
+
componentWillUpdate() {
|
|
71
|
+
this.triggerRangeWarning();
|
|
72
|
+
}
|
|
73
|
+
triggerRangeWarning() {
|
|
74
|
+
if (this.rangeMin >= this.rangeMax) {
|
|
75
|
+
// eslint-disable-next-line no-console
|
|
76
|
+
console.warn(`[limebb-percentage-visualizer] Invalid range: rangeMin (${this.rangeMin}) must be less than rangeMax (${this.rangeMax}). Visualization may not appear as expected.`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
render() {
|
|
80
|
+
const normalizedValue = this.getNormalizedValue();
|
|
81
|
+
const zeroPoint = this.getZeroPointPosition();
|
|
82
|
+
return (index.h(index.Host, { key: 'aedb5c0cf33dc42eb7a2e82341a03150f98a5f42', class: this.getContainerClassList(), style: {
|
|
83
|
+
'--limebb-percentage-visualizer-zero-point-position': `${zeroPoint}%`,
|
|
84
|
+
'--limebb-percentage-visualizer-width': `${Math.abs(normalizedValue)}%`,
|
|
85
|
+
'--limebb-percentage-visualizer-rotate': `${normalizedValue >= 0 ? '0deg' : '180deg'}`,
|
|
86
|
+
} }, index.h("limel-notched-outline", { key: '60ae7eee8743ec329a5854a2aabd8a50822ad77f', tabIndex: 0, role: "meter", "aria-valuemin": this.rangeMin, "aria-valuemax": this.rangeMax, "aria-valuenow": this.numValue, "aria-labelledby": this.labelId, "aria-describedby": this.helperTextId, label: this.label, labelId: this.labelId, invalid: this.invalid, required: this.required, hasValue: true, hasFloatingLabel: true, "aria-controls": this.helperTextId }, index.h("div", { key: '0413b1e81000993fe8edf55fbed8275e423bb050', slot: "content" }, this.renderVisualization())), this.renderHelperLine()));
|
|
87
|
+
}
|
|
88
|
+
renderVisualization() {
|
|
89
|
+
if (this.reducePresence && (this.numValue === 0 || !this.hasValue())) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (!this.hasValue()) {
|
|
93
|
+
return index.h("span", { class: "no-value" }, "\u2013");
|
|
94
|
+
}
|
|
95
|
+
return [
|
|
96
|
+
index.h("div", { class: "percentage-bar" }, index.h("div", { class: "percentage-fill" }), this.renderZeroPoint()),
|
|
97
|
+
index.h("span", { class: "percentage-text" }, this.formatValue(this.numValue), index.h("span", { class: "percent-sign" }, "%")),
|
|
98
|
+
];
|
|
99
|
+
}
|
|
100
|
+
renderZeroPoint() {
|
|
101
|
+
if (this.rangeMin >= 0 || this.rangeMax <= 0) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
return [
|
|
105
|
+
index.h("div", { id: this.zeroPointId, class: "zero-point" }),
|
|
106
|
+
index.h("limel-tooltip", { elementId: this.zeroPointId, openDirection: "top", label: "0" }),
|
|
107
|
+
];
|
|
108
|
+
}
|
|
109
|
+
hasValue() {
|
|
110
|
+
return (this.value !== undefined && this.value !== null && this.value !== '');
|
|
111
|
+
}
|
|
112
|
+
getContainerClassList() {
|
|
113
|
+
if (!this.hasValue()) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
const percentage = this.numValue;
|
|
117
|
+
const percentageClass$1 = percentageClass.getPercentageClass(percentage);
|
|
118
|
+
return Object.assign({}, (percentageClass$1 && { [percentageClass$1]: true }));
|
|
119
|
+
}
|
|
120
|
+
getZeroPointPosition() {
|
|
121
|
+
const totalRange = this.rangeMax - this.rangeMin;
|
|
122
|
+
if (totalRange <= 0) {
|
|
123
|
+
// Handle invalid range by providing a safe default
|
|
124
|
+
return 0; // Align zero point at the start as a consistent fallback
|
|
125
|
+
}
|
|
126
|
+
return ((0 - this.rangeMin) / totalRange) * PERCENTAGE;
|
|
127
|
+
}
|
|
128
|
+
getNormalizedValue() {
|
|
129
|
+
const processedValue = this.roundValue(this.multiplyByMultiplier(this.numValue));
|
|
130
|
+
const totalRange = this.rangeMax - this.rangeMin;
|
|
131
|
+
if (totalRange <= 0) {
|
|
132
|
+
return 0;
|
|
133
|
+
}
|
|
134
|
+
const zeroRelativePosition = ((0 - this.rangeMin) / totalRange) * PERCENTAGE;
|
|
135
|
+
// Calculate the position relative to the zero point
|
|
136
|
+
// Using the EPSILON value serves several purposes:
|
|
137
|
+
// 1. Prevents Division by Zero:
|
|
138
|
+
// If this.maxValue or this.minValue is exactly 0,
|
|
139
|
+
// we'd get an infinity or NaN result without this protection.
|
|
140
|
+
// 2. Handles Edge Cases:
|
|
141
|
+
// Even though we validate that minValue < maxValue,
|
|
142
|
+
// there could still be cases where one of them is very close to zero,
|
|
143
|
+
// which could cause unstable calculations.
|
|
144
|
+
// 3. Defensive Programming:
|
|
145
|
+
// It ensures that the component degrades gracefully
|
|
146
|
+
// even in unexpected scenarios (like when a consumer sets maxValue to 0).
|
|
147
|
+
// .4 Numerical Stability:
|
|
148
|
+
// In floating-point math, using a small epsilon value
|
|
149
|
+
// is a best practice to avoid precision issues.
|
|
150
|
+
if (processedValue >= 0) {
|
|
151
|
+
return ((processedValue / Math.max(this.rangeMax, EPSILON)) *
|
|
152
|
+
(PERCENTAGE - zeroRelativePosition));
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
return ((processedValue / Math.max(Math.abs(this.rangeMin), EPSILON)) *
|
|
156
|
+
zeroRelativePosition);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
multiplyByMultiplier(value) {
|
|
160
|
+
return value * this.multiplier;
|
|
161
|
+
}
|
|
162
|
+
roundValue(value) {
|
|
163
|
+
// Round to 1 decimal place
|
|
164
|
+
return Math.round(value * DECIMALS) / DECIMALS;
|
|
165
|
+
}
|
|
166
|
+
unifyMinusSign(input) {
|
|
167
|
+
// Replace Unicode minus sign (−) with ASCII hyphen-minus (-)
|
|
168
|
+
return input.replace(/−/g, '-');
|
|
169
|
+
}
|
|
170
|
+
convertToUnicodeMinus(input) {
|
|
171
|
+
// Replace ASCII hyphen-minus (-) with Unicode minus sign (−)
|
|
172
|
+
return input.replace(/-/g, '−');
|
|
173
|
+
}
|
|
174
|
+
parseValue(value) {
|
|
175
|
+
if (typeof value === 'string') {
|
|
176
|
+
return parseFloat(this.unifyMinusSign(value));
|
|
177
|
+
}
|
|
178
|
+
return value;
|
|
179
|
+
}
|
|
180
|
+
formatValue(value) {
|
|
181
|
+
const processedValue = this.roundValue(this.multiplyByMultiplier(value));
|
|
182
|
+
const constructedValue = `${processedValue}`;
|
|
183
|
+
if (processedValue < 0) {
|
|
184
|
+
return this.convertToUnicodeMinus(constructedValue);
|
|
185
|
+
}
|
|
186
|
+
return constructedValue;
|
|
187
|
+
}
|
|
188
|
+
static get watchers() { return {
|
|
189
|
+
"value": ["valueChanged"]
|
|
190
|
+
}; }
|
|
191
|
+
};
|
|
192
|
+
PercentageVisualizer.style = LimebbPercentageVisualizerStyle0;
|
|
193
|
+
|
|
194
|
+
exports.limebb_percentage_visualizer = PercentageVisualizer;
|
|
@@ -1832,7 +1832,7 @@ const LimeBBTextEditor = class {
|
|
|
1832
1832
|
}
|
|
1833
1833
|
render() {
|
|
1834
1834
|
return [
|
|
1835
|
-
index.h("limel-text-editor", { key: '
|
|
1835
|
+
index.h("limel-text-editor", { key: 'ba1927534a30fe32b4e7bf1e6d2119d3ce316a08', ref: (el) => (this.textEditor = el), tabindex: this.disabled ? -1 : 0, value: this.value, contentType: this.contentType, customElements: this.registeredCustomElements, "aria-disabled": this.disabled, language: this.language, triggers: this.registeredTriggers, onTriggerStart: this.handleTriggerStart, onTriggerStop: this.handleTriggerStop, onTriggerChange: this.handleTriggerChange, onImagePasted: this.handleImagePasted, onMetadataChange: this.handleMetadataChange, ui: this.ui, allowResize: this.allowResize, required: this.required, disabled: this.disabled, readonly: this.readonly, helperText: this.helperText, placeholder: this.placeholder, label: this.label, invalid: this.invalid }),
|
|
1836
1836
|
this.renderPicker(),
|
|
1837
1837
|
];
|
|
1838
1838
|
}
|
|
@@ -3,35 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-d3b7747e.js');
|
|
6
|
+
const percentageClass = require('./percentage-class-9decca4f.js');
|
|
6
7
|
|
|
7
|
-
function
|
|
8
|
-
const ranges = [
|
|
9
|
-
{ min: 200, max: Infinity, class: '--200or-larger' },
|
|
10
|
-
{ min: 100, max: 200, class: '--100to200' },
|
|
11
|
-
{ min: 80, max: 100, class: '--80to100' },
|
|
12
|
-
{ min: 60, max: 80, class: '--60to80' },
|
|
13
|
-
{ min: 40, max: 60, class: '--40to60' },
|
|
14
|
-
{ min: 20, max: 40, class: '--20to40' },
|
|
15
|
-
{ min: 0, max: 20, class: '--0to20' },
|
|
16
|
-
{ min: -20, max: 0, class: '--20to0' },
|
|
17
|
-
{ min: -40, max: -20, class: '--40to20' },
|
|
18
|
-
{ min: -60, max: -40, class: '--60to40' },
|
|
19
|
-
{ min: -80, max: -60, class: '--80to60' },
|
|
20
|
-
{ min: -100, max: -80, class: '--100to80' },
|
|
21
|
-
{ min: -200, max: -100, class: '--200to100' },
|
|
22
|
-
{ min: -Infinity, max: -200, class: '--200or-larger' },
|
|
23
|
-
];
|
|
24
|
-
if (value === 0 || value === null) {
|
|
25
|
-
return '--0';
|
|
26
|
-
}
|
|
27
|
-
const range = ranges.find((r) => value > r.min && value <= r.max);
|
|
28
|
-
if (!range) {
|
|
29
|
-
return '';
|
|
30
|
-
}
|
|
31
|
-
return `${range.class}-${value > 0 ? 'positive' : 'negative'}`;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const trendIndicatorCss = "@charset \"UTF-8\";*{box-sizing:border-box}:host(limebb-trend-indicator){position:relative;display:block;height:100%;width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}:host(limebb-trend-indicator[label]) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}:host(limebb-trend-indicator[former-value]) div[slot=content]{cursor:help}div[slot=content] span{flex-shrink:0}.icon{flex-shrink:0;display:flex;transition-property:color, background-color, transform;transition-duration:0.4s;transition-timing-function:ease;width:1.25rem;height:1.25rem;border-radius:50%;padding:0.12rem;color:rgb(var(--color-white));background-color:rgb(var(--color-gray-default), 0.5)}:host(.--40to20-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.--20to0-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.--0to20-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.--20to40-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.--200or-larger-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(90deg)}:host(.--200to100-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(90deg)}:host(.--100to80-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(90deg)}:host(.--80to60-negative) .icon{background-color:rgb(var(--color-red-default));transform:rotate(72deg)}:host(.--60to40-negative) .icon{background-color:rgb(var(--color-coral-default));transform:rotate(54deg)}:host(.--40to20-negative) .icon{background-color:rgb(var(--color-orange-default));transform:rotate(36deg)}:host(.--20to0-negative) .icon{background-color:rgb(var(--color-amber-default));transform:rotate(18deg)}:host(.--0to20-positive) .icon{background-color:rgb(var(--color-yellow-default));transform:rotate(-18deg)}:host(.--20to40-positive) .icon{background-color:rgb(var(--color-grass-default));transform:rotate(-36deg)}:host(.--40to60-positive) .icon{background-color:rgb(var(--color-lime-default));transform:rotate(-54deg)}:host(.--60to80-positive) .icon{background-color:rgb(var(--color-teal-default));transform:rotate(-72deg)}:host(.--80to100-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-90deg)}:host(.--100to200-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-90deg)}:host(.--200or-larger-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-90deg)}:host(.--0) .icon polyline{color:transparent}:host(.--200or-larger-negative) .icon:after,:host(.--200or-larger-negative) .icon:before,:host(.--200to100-negative) .icon:after,:host(.--200to100-negative) .icon:before,:host(.--100to200-positive) .icon:after,:host(.--100to200-positive) .icon:before,:host(.--200or-larger-positive) .icon:after,:host(.--200or-larger-positive) .icon:before{transition:border-color 0.6s ease;content:\"\";position:absolute;inset:0;margin:auto;border:1px solid transparent;border-radius:50%}:host(.--200or-larger-negative) .icon:before,:host(.--200to100-negative) .icon:before,:host(.--100to200-positive) .icon:before,:host(.--200or-larger-positive) .icon:before{transform:scale(1.2)}:host(.--200or-larger-negative) .icon:after,:host(.--200to100-negative) .icon:after,:host(.--100to200-positive) .icon:after,:host(.--200or-larger-positive) .icon:after{transform:scale(1.4);opacity:0.4}:host(.--200to100-negative) .icon:before,:host(.--200or-larger-negative) .icon:before{border-color:rgb(var(--color-red-dark))}:host(.--200or-larger-negative) .icon:after{border-color:rgb(var(--color-red-darker))}:host(.--100to200-positive) .icon:before,:host(.--200or-larger-positive) .icon:before{border-color:rgb(var(--color-teal-dark))}:host(.--200or-larger-positive) .icon:after{border-color:rgb(var(--color-teal-darker))}.no-value{transform:translateY(0.5rem)}.growth-unit{padding-left:0.5rem;opacity:0.5}:host(limebb-trend-indicator:focus),:host(limebb-trend-indicator:focus-visible),:host(limebb-trend-indicator:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-trend-indicator){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-trend-indicator:focus) limel-helper-line,:host(limebb-trend-indicator:focus-visible) limel-helper-line,:host(limebb-trend-indicator:focus-within) limel-helper-line,:host(limebb-trend-indicator:hover) limel-helper-line{will-change:grid-template-rows}";
|
|
8
|
+
const trendIndicatorCss = "@charset \"UTF-8\";*{box-sizing:border-box}:host(limebb-trend-indicator){position:relative;display:block;height:100%;width:100%}limel-notched-outline:not([invalid]:not([invalid=false])) .limel-notched-outline--outlines{--limel-notched-outline-border-color:transparent}div[slot=content]{display:flex;align-items:center;gap:0.5rem;border-radius:inherit;background-color:transparent !important}div[slot=content]:focus{outline:none}div[slot=content]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}:host(limebb-trend-indicator):has(label) div[slot=content]{min-height:2.5rem;padding:0 0.375rem 0 1rem}:host(limebb-trend-indicator[former-value]) div[slot=content]{cursor:help}div[slot=content] span{flex-shrink:0}.icon{flex-shrink:0;display:flex;transition-property:color, background-color, transform;transition-duration:0.4s;transition-timing-function:ease;width:1.25rem;height:1.25rem;border-radius:50%;padding:0.12rem;color:rgb(var(--color-white));background-color:rgb(var(--color-gray-default), 0.5)}:host(.has-value-40to30-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-30to20-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-20to10-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-10to0-negative) .icon{color:rgb(var(--color-gray-darker))}:host(.has-value-0to10-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-10to20-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-20to30-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-30to40-positive) .icon{color:rgb(var(--color-gray-dark))}:host(.has-value-200or-larger-negative) .icon{background-color:rgb(var(--color-red-darker));transform:rotate(90deg)}:host(.has-value-200to100-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(90deg)}:host(.has-value-100to90-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(90deg)}:host(.has-value-90to80-negative) .icon{background-color:rgb(var(--color-red-dark));transform:rotate(81deg)}:host(.has-value-80to70-negative) .icon{background-color:rgb(var(--color-red-default));transform:rotate(72deg)}:host(.has-value-70to60-negative) .icon{background-color:rgb(var(--color-red-default));transform:rotate(63deg)}:host(.has-value-60to50-negative) .icon{background-color:rgb(var(--color-coral-default));transform:rotate(54deg)}:host(.has-value-50to40-negative) .icon{background-color:rgb(var(--color-coral-default));transform:rotate(45deg)}:host(.has-value-40to30-negative) .icon{background-color:rgb(var(--color-orange-default));transform:rotate(36deg)}:host(.has-value-30to20-negative) .icon{background-color:rgb(var(--color-orange-default));transform:rotate(27deg)}:host(.has-value-20to10-negative) .icon{background-color:rgb(var(--color-amber-default));transform:rotate(18deg)}:host(.has-value-10to0-negative) .icon{background-color:rgb(var(--color-amber-default));transform:rotate(9deg)}:host(.has-value-0) .icon{background-color:rgb(var(--color-gray-default));transform:rotate(0deg)}:host(.has-value-0to10-positive) .icon{background-color:rgb(var(--color-yellow-default));transform:rotate(-9deg)}:host(.has-value-10to20-positive) .icon{background-color:rgb(var(--color-yellow-default));transform:rotate(-18deg)}:host(.has-value-20to30-positive) .icon{background-color:rgb(var(--color-grass-default));transform:rotate(-27deg)}:host(.has-value-30to40-positive) .icon{background-color:rgb(var(--color-grass-default));transform:rotate(-36deg)}:host(.has-value-40to50-positive) .icon{background-color:rgb(var(--color-lime-default));transform:rotate(-45deg)}:host(.has-value-50to60-positive) .icon{background-color:rgb(var(--color-lime-default));transform:rotate(-54deg)}:host(.has-value-60to70-positive) .icon{background-color:rgb(var(--color-teal-default));transform:rotate(-63deg)}:host(.has-value-70to80-positive) .icon{background-color:rgb(var(--color-teal-default));transform:rotate(-72deg)}:host(.has-value-80to90-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-81deg)}:host(.has-value-90to100-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-90deg)}:host(.has-value-100to200-positive) .icon{background-color:rgb(var(--color-teal-dark));transform:rotate(-90deg)}:host(.has-value-200or-larger-positive) .icon{background-color:rgb(var(--color-teal-darker));transform:rotate(-90deg)}:host(.has-value-0) .icon{background-color:rgb(var(--color-gray-default), 0.5);transform:rotate(0deg)}:host(.has-value-0) .icon polyline{color:transparent}:host(.has-value-200or-larger-negative) .icon:after,:host(.has-value-200or-larger-negative) .icon:before,:host(.has-value-200to100-negative) .icon:after,:host(.has-value-200to100-negative) .icon:before,:host(.has-value-100to200-positive) .icon:after,:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:after,:host(.has-value-200or-larger-positive) .icon:before{transition:border-color 0.6s ease;content:\"\";position:absolute;inset:0;margin:auto;border:1px solid transparent;border-radius:50%}:host(.has-value-200or-larger-negative) .icon:before,:host(.has-value-200to100-negative) .icon:before,:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:before{transform:scale(1.2)}:host(.has-value-200or-larger-negative) .icon:after,:host(.has-value-200to100-negative) .icon:after,:host(.has-value-100to200-positive) .icon:after,:host(.has-value-200or-larger-positive) .icon:after{transform:scale(1.4);opacity:0.4}:host(.has-value-200to100-negative) .icon:before,:host(.has-value-200or-larger-negative) .icon:before{border-color:rgb(var(--color-red-dark))}:host(.has-value-200or-larger-negative) .icon:after{border-color:rgb(var(--color-red-darker))}:host(.has-value-100to200-positive) .icon:before,:host(.has-value-200or-larger-positive) .icon:before{border-color:rgb(var(--color-teal-dark))}:host(.has-value-200or-larger-positive) .icon:after{border-color:rgb(var(--color-teal-darker))}.no-value{transform:translateY(0.5rem)}.growth-unit{padding-left:0.5rem;opacity:0.5}:host(limebb-trend-indicator:focus),:host(limebb-trend-indicator:focus-visible),:host(limebb-trend-indicator:focus-within){--limel-h-l-grid-template-rows-transition-speed:0.46s;--limel-h-l-grid-template-rows:1fr}:host(limebb-trend-indicator){--limel-h-l-grid-template-rows-transition-speed:0.3s;--limel-h-l-grid-template-rows:0fr}:host(limebb-trend-indicator:focus) limel-helper-line,:host(limebb-trend-indicator:focus-visible) limel-helper-line,:host(limebb-trend-indicator:focus-within) limel-helper-line,:host(limebb-trend-indicator:hover) limel-helper-line{will-change:grid-template-rows}";
|
|
35
9
|
const LimebbTrendIndicatorStyle0 = trendIndicatorCss;
|
|
36
10
|
|
|
37
11
|
const TrendIndicator = class {
|
|
@@ -65,7 +39,7 @@ const TrendIndicator = class {
|
|
|
65
39
|
this.numValue = this.parseValue(this.value);
|
|
66
40
|
}
|
|
67
41
|
render() {
|
|
68
|
-
return (index.h(index.Host, { key: '
|
|
42
|
+
return (index.h(index.Host, { key: '6e7bc286346ba92173d7d19d07298ba307c5b6b0', class: this.getContainerClassList() }, index.h("limel-notched-outline", { key: 'b976e5c674c33ae241314533692f59f20a7f1d8a', id: this.tooltipId, label: this.label, labelId: this.labelId, invalid: this.invalid, required: this.required, hasValue: true, hasFloatingLabel: true, "aria-labelledby": this.labelId, "aria-describedby": this.helperTextId, "aria-controls": this.helperTextId }, index.h("div", { key: '6b7da241181d8a2d52b1cca252bc086191d92526', slot: "content", tabIndex: 0 }, this.renderVisualization())), this.renderHelperLine(), this.renderTooltip()));
|
|
69
43
|
}
|
|
70
44
|
renderVisualization() {
|
|
71
45
|
if (this.reducePresence && (this.numValue === 0 || !this.hasValue())) {
|
|
@@ -118,8 +92,8 @@ const TrendIndicator = class {
|
|
|
118
92
|
return;
|
|
119
93
|
}
|
|
120
94
|
const percentage = this.getPercentage();
|
|
121
|
-
const percentageClass = getPercentageClass(percentage);
|
|
122
|
-
return Object.assign({}, (percentageClass && { [percentageClass]: true }));
|
|
95
|
+
const percentageClass$1 = percentageClass.getPercentageClass(percentage);
|
|
96
|
+
return Object.assign({}, (percentageClass$1 && { [percentageClass$1]: true }));
|
|
123
97
|
}
|
|
124
98
|
getPercentage() {
|
|
125
99
|
if (this.formerValue === undefined) {
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["limebb-feed.cjs",[[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":[1],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-kanban.cjs",[[1,"limebb-kanban",{"platform":[16],"context":[16],"groups":[16]}]]],["limebb-chat-list.cjs",[[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"]}]]],["limebb-text-editor.cjs",[[1,"limebb-text-editor",{"platform":[16],"context":[16],"allowMentioning":[4,"allow-mentioning"],"contentType":[1,"content-type"],"language":[513],"disabled":[516],"readonly":[516],"helperText":[513,"helper-text"],"placeholder":[513],"label":[513],"invalid":[516],"required":[516],"selectedContext":[16],"ui":[513],"allowResize":[4,"allow-resize"],"value":[1],"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"],"editorPickerQuery":["watchQuery"]}]]],["limebb-date-range.cjs",[[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]}]]],["limebb-info-tile-currency-format.cjs",[[1,"limebb-info-tile-currency-format",{"platform":[16],"context":[16],"value":[16]}]]],["limebb-notification-list.cjs",[[1,"limebb-notification-list",{"platform":[16],"context":[16],"items":[16],"loading":[4],"lastVisitedTimestamp":[1,"last-visited-timestamp"]},null,{"items":["handleItemsChange"]}]]],["limebb-browser.cjs",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["limebb-component-config.cjs",[[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"],"configComponent":["watchconfigComponent"]}]]],["limebb-component-picker.cjs",[[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"]}]]],["limebb-dashboard-widget.cjs",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["limebb-icon-picker.cjs",[[1,"limebb-icon-picker",{"value":[1],"required":[4],"readonly":[4],"invalid":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-info-tile.cjs",[[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]},null,{"filterId":["watchFilterId"],"propertyName":["watchPropertyName"],"aggregateOperator":["watchAggregateOperator"]}]]],["limebb-info-tile-date-format.cjs",[[1,"limebb-info-tile-date-format",{"value":[16]}]]],["limebb-info-tile-decimal-format.cjs",[[1,"limebb-info-tile-decimal-format",{"value":[16]}]]],["limebb-info-tile-format.cjs",[[1,"limebb-info-tile-format",{"platform":[16],"context":[16],"type":[1],"value":[16]}]]],["limebb-info-tile-relative-date-format.cjs",[[1,"limebb-info-tile-relative-date-format",{"value":[16]}]]],["limebb-info-tile-unit-format.cjs",[[1,"limebb-info-tile-unit-format",{"value":[16]}]]],["limebb-limeobject-file-viewer.cjs",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["limebb-locale-picker.cjs",[[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]}]]],["limebb-mention.cjs",[[1,"limebb-mention",{"limetype":[1],"objectid":[2],"limeobject":[32]}]]],["limebb-mention-group-counter.cjs",[[1,"limebb-mention-group-counter",{"count":[2],"limetype":[16],"helperLabel":[1,"helper-label"]}]]],["limebb-trend-indicator.cjs",[[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"]}]]],["limebb-navigation-button_2.cjs",[[1,"limebb-summary-popover",{"triggerDelay":[514,"trigger-delay"],"heading":[513],"subheading":[513],"image":[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]}]]],["limebb-kanban-
|
|
11
|
+
return index.bootstrapLazy([["limebb-feed.cjs",[[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":[1],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-kanban.cjs",[[1,"limebb-kanban",{"platform":[16],"context":[16],"groups":[16]}]]],["limebb-chat-list.cjs",[[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"]}]]],["limebb-text-editor.cjs",[[1,"limebb-text-editor",{"platform":[16],"context":[16],"allowMentioning":[4,"allow-mentioning"],"contentType":[1,"content-type"],"language":[513],"disabled":[516],"readonly":[516],"helperText":[513,"helper-text"],"placeholder":[513],"label":[513],"invalid":[516],"required":[516],"selectedContext":[16],"ui":[513],"allowResize":[4,"allow-resize"],"value":[1],"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"],"editorPickerQuery":["watchQuery"]}]]],["limebb-date-range.cjs",[[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]}]]],["limebb-info-tile-currency-format.cjs",[[1,"limebb-info-tile-currency-format",{"platform":[16],"context":[16],"value":[16]}]]],["limebb-notification-list.cjs",[[1,"limebb-notification-list",{"platform":[16],"context":[16],"items":[16],"loading":[4],"lastVisitedTimestamp":[1,"last-visited-timestamp"]},null,{"items":["handleItemsChange"]}]]],["limebb-browser.cjs",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["limebb-component-config.cjs",[[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"],"configComponent":["watchconfigComponent"]}]]],["limebb-component-picker.cjs",[[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"]}]]],["limebb-dashboard-widget.cjs",[[1,"limebb-dashboard-widget",{"heading":[513],"subheading":[513],"supportingText":[513,"supporting-text"],"icon":[513]}]]],["limebb-icon-picker.cjs",[[1,"limebb-icon-picker",{"value":[1],"required":[4],"readonly":[4],"invalid":[4],"disabled":[4],"label":[1],"helperText":[1,"helper-text"]}]]],["limebb-info-tile.cjs",[[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]},null,{"filterId":["watchFilterId"],"propertyName":["watchPropertyName"],"aggregateOperator":["watchAggregateOperator"]}]]],["limebb-info-tile-date-format.cjs",[[1,"limebb-info-tile-date-format",{"value":[16]}]]],["limebb-info-tile-decimal-format.cjs",[[1,"limebb-info-tile-decimal-format",{"value":[16]}]]],["limebb-info-tile-format.cjs",[[1,"limebb-info-tile-format",{"platform":[16],"context":[16],"type":[1],"value":[16]}]]],["limebb-info-tile-relative-date-format.cjs",[[1,"limebb-info-tile-relative-date-format",{"value":[16]}]]],["limebb-info-tile-unit-format.cjs",[[1,"limebb-info-tile-unit-format",{"value":[16]}]]],["limebb-limeobject-file-viewer.cjs",[[1,"limebb-limeobject-file-viewer",{"platform":[16],"context":[16],"property":[1],"fileTypes":[16],"limeobject":[32],"limetype":[32]}]]],["limebb-locale-picker.cjs",[[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]}]]],["limebb-mention.cjs",[[1,"limebb-mention",{"limetype":[1],"objectid":[2],"limeobject":[32]}]]],["limebb-mention-group-counter.cjs",[[1,"limebb-mention-group-counter",{"count":[2],"limetype":[16],"helperLabel":[1,"helper-label"]}]]],["limebb-percentage-visualizer.cjs",[[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"]}]]],["limebb-trend-indicator.cjs",[[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"]}]]],["limebb-navigation-button_2.cjs",[[1,"limebb-summary-popover",{"triggerDelay":[514,"trigger-delay"],"heading":[513],"subheading":[513],"image":[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]}]]],["limebb-kanban-group.cjs",[[1,"limebb-kanban-group",{"platform":[16],"context":[16],"identifier":[1],"heading":[513],"help":[1],"items":[16],"summary":[1],"loading":[516],"totalCount":[514,"total-count"]}]]],["limebb-feed-timeline-item.cjs",[[1,"limebb-feed-timeline-item",{"platform":[16],"context":[16],"item":[16],"ui":[513],"isBundled":[516,"is-bundled"],"headingCanExpand":[32],"isHeadingExpanded":[32],"showMore":[32],"isTall":[32]}]]],["limebb-text-editor-picker.cjs",[[1,"limebb-text-editor-picker",{"items":[16],"open":[516],"isSearching":[4,"is-searching"],"emptyMessage":[1,"empty-message"]},null,{"open":["watchOpen"]}]]],["limebb-currency-picker.cjs",[[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]}]]],["limebb-date-picker.cjs",[[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]}]]],["limebb-notification-item.cjs",[[1,"limebb-notification-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-kanban-item.cjs",[[1,"limebb-kanban-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-chat-item_2.cjs",[[1,"limebb-chat-item",{"platform":[16],"context":[16],"item":[16],"helperText":[1,"helper-text"],"hasError":[516,"has-error"]}],[1,"limebb-typing-indicator"]]],["limebb-empty-state.cjs",[[1,"limebb-empty-state",{"heading":[513],"value":[513],"icon":[16]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Determines the appropriate CSS class name based on a percentage value.
|
|
5
|
+
*
|
|
6
|
+
* This function categorizes percentage values into discrete ranges with
|
|
7
|
+
* increments of 10%.
|
|
8
|
+
* It returns a class name string that can be used to apply styling based
|
|
9
|
+
* on the value.
|
|
10
|
+
*
|
|
11
|
+
* For example:
|
|
12
|
+
* - A value of 35 will return "has-value-30to40-positive"
|
|
13
|
+
* - A value of -75 will return "has-value-80to70-negative"
|
|
14
|
+
* - A value of 0 will return "has-value-0"
|
|
15
|
+
* - Values over 200 or under -200 will return "has-value-200or-larger-positive"
|
|
16
|
+
* or "has-value-200or-larger-negative"
|
|
17
|
+
*
|
|
18
|
+
* The returned class names can be used in CSS to apply different colors,
|
|
19
|
+
* transformations, or other visual treatments based on the percentage range.
|
|
20
|
+
*
|
|
21
|
+
* @param {number|null} value - The percentage value to classify,
|
|
22
|
+
* can be positive, negative, or zero
|
|
23
|
+
* @returns {string} A class name string representing the percentage range,
|
|
24
|
+
* or an empty string if value is null
|
|
25
|
+
*/
|
|
26
|
+
function getPercentageClass(value) {
|
|
27
|
+
if (value === 0) {
|
|
28
|
+
return 'has-value-0';
|
|
29
|
+
}
|
|
30
|
+
if (value === null) {
|
|
31
|
+
return '';
|
|
32
|
+
}
|
|
33
|
+
const ranges = [
|
|
34
|
+
{ min: 200, max: Infinity, class: 'has-value-200or-larger' },
|
|
35
|
+
{ min: 100, max: 200, class: 'has-value-100to200' },
|
|
36
|
+
{ min: 90, max: 100, class: 'has-value-90to100' },
|
|
37
|
+
{ min: 80, max: 90, class: 'has-value-80to90' },
|
|
38
|
+
{ min: 70, max: 80, class: 'has-value-70to80' },
|
|
39
|
+
{ min: 60, max: 70, class: 'has-value-60to70' },
|
|
40
|
+
{ min: 50, max: 60, class: 'has-value-50to60' },
|
|
41
|
+
{ min: 40, max: 50, class: 'has-value-40to50' },
|
|
42
|
+
{ min: 30, max: 40, class: 'has-value-30to40' },
|
|
43
|
+
{ min: 20, max: 30, class: 'has-value-20to30' },
|
|
44
|
+
{ min: 10, max: 20, class: 'has-value-10to20' },
|
|
45
|
+
{ min: 0, max: 10, class: 'has-value-0to10' },
|
|
46
|
+
{ min: -10, max: 0, class: 'has-value-10to0' },
|
|
47
|
+
{ min: -20, max: -10, class: 'has-value-20to10' },
|
|
48
|
+
{ min: -30, max: -20, class: 'has-value-30to20' },
|
|
49
|
+
{ min: -40, max: -30, class: 'has-value-40to30' },
|
|
50
|
+
{ min: -50, max: -40, class: 'has-value-50to40' },
|
|
51
|
+
{ min: -60, max: -50, class: 'has-value-60to50' },
|
|
52
|
+
{ min: -70, max: -60, class: 'has-value-70to60' },
|
|
53
|
+
{ min: -80, max: -70, class: 'has-value-80to70' },
|
|
54
|
+
{ min: -90, max: -80, class: 'has-value-90to80' },
|
|
55
|
+
{ min: -100, max: -90, class: 'has-value-100to90' },
|
|
56
|
+
{ min: -200, max: -100, class: 'has-value-200to100' },
|
|
57
|
+
{ min: -Infinity, max: -200, class: 'has-value-200or-larger' },
|
|
58
|
+
];
|
|
59
|
+
const range = ranges.find((r) => value > r.min && value <= r.max);
|
|
60
|
+
if (!range) {
|
|
61
|
+
return '';
|
|
62
|
+
}
|
|
63
|
+
return `${range.class}-${value > 0 ? 'positive' : 'negative'}`;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
exports.getPercentageClass = getPercentageClass;
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"components/navigation-button/navigation-button.js",
|
|
31
31
|
"components/notification-list/notification-list.js",
|
|
32
32
|
"components/notification-list/notification-item/notification-item.js",
|
|
33
|
+
"components/percentage-visualizer/percentage-visualizer.js",
|
|
33
34
|
"components/summary-popover/summary-popover.js",
|
|
34
35
|
"components/text-editor/mention-group-counter.js",
|
|
35
36
|
"components/text-editor/text-editor-picker.js",
|