@limetech/lime-crm-building-blocks 1.60.0 → 1.61.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 +7 -0
- package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
- package/dist/cjs/limebb-kanban-group.cjs.entry.js +59 -0
- package/dist/cjs/limebb-kanban-item.cjs.entry.js +2 -2
- package/dist/cjs/limebb-kanban.cjs.entry.js +14 -43
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/kanban/{kanban-column/kanban-column.css → kanban-group/kanban-group.css} +16 -11
- package/dist/collection/components/kanban/{kanban-column/kanban-column.js → kanban-group/kanban-group.js} +52 -46
- package/dist/collection/components/kanban/kanban-item/kanban-item.js +12 -6
- package/dist/collection/components/kanban/kanban.js +60 -104
- package/dist/components/kanban-group.js +84 -0
- package/dist/components/kanban-item.js +2 -2
- package/dist/components/{limebb-kanban-column.d.ts → limebb-kanban-group.d.ts} +4 -4
- package/dist/components/limebb-kanban-group.js +6 -0
- package/dist/components/limebb-kanban.js +18 -50
- package/dist/esm/lime-crm-building-blocks.js +1 -1
- package/dist/esm/limebb-kanban-group.entry.js +55 -0
- package/dist/esm/limebb-kanban-item.entry.js +2 -2
- package/dist/esm/limebb-kanban.entry.js +15 -44
- package/dist/esm/loader.js +1 -1
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/p-257ff1e7.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-283a19a3.entry.js +1 -0
- package/dist/lime-crm-building-blocks/p-564c74c9.entry.js +1 -0
- package/dist/types/components/kanban/index.d.ts +1 -1
- package/dist/types/components/kanban/{kanban-column/kanban-column.d.ts → kanban-group/kanban-group.d.ts} +15 -12
- package/dist/types/components/kanban/kanban-group/kanban-group.types.d.ts +35 -0
- package/dist/types/components/kanban/kanban-item/kanban-item.d.ts +2 -2
- package/dist/types/components/kanban/kanban-item/kanban-item.types.d.ts +0 -5
- package/dist/types/components/kanban/kanban.d.ts +15 -22
- package/dist/types/components.d.ts +88 -78
- package/package.json +1 -1
- package/dist/cjs/limebb-kanban-column.cjs.entry.js +0 -71
- package/dist/components/kanban-column.js +0 -96
- package/dist/components/limebb-kanban-column.js +0 -6
- package/dist/esm/limebb-kanban-column.entry.js +0 -67
- package/dist/lime-crm-building-blocks/p-13e46b27.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-7efbc4dd.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-ee32100b.entry.js +0 -1
- package/dist/types/components/kanban/kanban.types.d.ts +0 -4
- /package/dist/collection/components/kanban/{kanban.types.js → kanban-group/kanban-group.types.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.61.0](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.60.0...v1.61.0) (2025-01-16)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
* **kanban:** refactor to new group interface ([0d70354](https://github.com/Lundalogik/lime-crm-building-blocks/commit/0d703547c05a361dfc900319421fe3d87a81bcd7))
|
|
7
|
+
|
|
1
8
|
## [1.60.0](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.59.0...v1.60.0) (2025-01-15)
|
|
2
9
|
|
|
3
10
|
### 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"],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-kanban.cjs",[[1,"limebb-kanban",{"platform":[16],"context":[16],"
|
|
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"],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-kanban.cjs",[[1,"limebb-kanban",{"platform":[16],"context":[16],"groups":[16]}]]],["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],"items":[32],"highlightedItemIndex":[32],"customElements":[32],"registeredTriggers":[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-navigation-button.cjs",[[17,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["limebb-summary-popover.cjs",[[1,"limebb-summary-popover",{"heading":[513],"subheading":[513],"image":[16],"icon":[513],"value":[1],"openDirection":[513,"open-direction"],"actions":[16],"isPopoverOpen":[32]}]]],["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-kanban-group.cjs",[[1,"limebb-kanban-group",{"platform":[16],"context":[16],"identifier":[1],"heading":[513],"items":[16],"loading":[516],"totalCount":[514,"total-count"]}]]],["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-empty-state.cjs",[[1,"limebb-empty-state",{"heading":[513],"value":[513],"icon":[16]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-f1d0f3b9.js');
|
|
6
|
+
const types = require('./types-d3b90b2e.js');
|
|
7
|
+
|
|
8
|
+
const kanbanGroupCss = "@charset \"UTF-8\";:host(limebb-kanban-group){background-color:rgb(var(--limebb-kanban-group-primary-background));--header-top-right-left-border-radius:0.5rem;--limebb-kanban-group-secondary-background:var(--contrast-300);--limebb-kanban-group-primary-background:var(--contrast-500);scroll-snap-align:start;box-sizing:border-box;display:flex;flex-direction:column;border-radius:0.5rem;min-width:20rem}:host(limebb-kanban-group.secondary){border:1px dashed rgb(var(--contrast-700));background-color:rgb(var(--limebb-kanban-group-secondary-background))}:host(limebb-kanban-group.secondary) limebb-kanban-item{border:1px dashed rgb(var(--contrast-700))}:host(limebb-kanban-group.secondary) limel-header{background-color:rgb(var(--limebb-kanban-group-secondary-background))}limel-header{flex-shrink:0;width:auto;background-color:rgb(var(--limebb-kanban-group-primary-background))}limel-badge{--badge-background-color:rgb(var(--contrast-200))}.group-heading{display:flex}.load-more-button,limel-spinner{align-self:center}.items{flex-grow:1;display:flex;flex-direction:column;gap:0.5rem;padding:0.5rem;overflow-y:auto;-webkit-overflow-scrolling:touch}limebb-kanban-item{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);cursor:pointer;color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color)}limebb-kanban-item:hover,limebb-kanban-item:focus,limebb-kanban-item:focus-visible{will-change:color, background-color, box-shadow, transform}limebb-kanban-item:hover{transform:translate3d(0, 0.01rem, 0);color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}limebb-kanban-item:active{--limel-clickable-transform-timing-function:cubic-bezier(\n 0.83,\n -0.15,\n 0.49,\n 1.16\n );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}limebb-kanban-item:hover,limebb-kanban-item:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}limebb-kanban-item:focus{outline:none}limebb-kanban-item:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}";
|
|
9
|
+
const LimebbKanbanGroupStyle0 = kanbanGroupCss;
|
|
10
|
+
|
|
11
|
+
const KanbanGroup = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
this.loadMore = index.createEvent(this, "loadMore", 7);
|
|
15
|
+
/**
|
|
16
|
+
* List of items to display in the group.
|
|
17
|
+
*/
|
|
18
|
+
this.items = [];
|
|
19
|
+
this.handleLoadMore = (event) => {
|
|
20
|
+
event.stopPropagation();
|
|
21
|
+
this.loadMore.emit(this.identifier);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
render() {
|
|
25
|
+
return [
|
|
26
|
+
this.renderGroupHeading(),
|
|
27
|
+
index.h("div", { key: '1e1eaca2ecba25502dd11f8ee677f29878de7f44', class: "items" }, this.renderKanbanItems(), this.renderSpinner(), this.renderLoadMore()),
|
|
28
|
+
];
|
|
29
|
+
}
|
|
30
|
+
renderGroupHeading() {
|
|
31
|
+
return (index.h("div", { class: "group-heading" }, index.h("limel-header", { heading: this.heading }), this.renderItemNumber()));
|
|
32
|
+
}
|
|
33
|
+
renderItemNumber() {
|
|
34
|
+
var _a;
|
|
35
|
+
return index.h("limel-badge", { label: (_a = this.totalCount) !== null && _a !== void 0 ? _a : 0 });
|
|
36
|
+
}
|
|
37
|
+
renderSpinner() {
|
|
38
|
+
if (this.loading) {
|
|
39
|
+
return index.h("limel-spinner", { size: "small" });
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
renderKanbanItems() {
|
|
43
|
+
return this.items.map((item) => {
|
|
44
|
+
return (index.h("limebb-kanban-item", { tabindex: 0, platform: this.platform, context: this.context, item: item, key: item.id }));
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
renderLoadMore() {
|
|
48
|
+
if (this.loading || this.items.length >= this.totalCount) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
return (index.h("limel-icon-button", { class: "load-more-button", icon: "more", onClick: this.handleLoadMore, elevated: true, label: this.translator.get('webclient.load-more') }));
|
|
52
|
+
}
|
|
53
|
+
get translator() {
|
|
54
|
+
return this.platform.get(types.PlatformServiceName.Translate);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
KanbanGroup.style = LimebbKanbanGroupStyle0;
|
|
58
|
+
|
|
59
|
+
exports.limebb_kanban_group = KanbanGroup;
|
|
@@ -50,12 +50,12 @@ const KanbanItemComponent = class {
|
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
this.handleKanbanItemClick = () => {
|
|
53
|
-
this.interact.emit();
|
|
53
|
+
this.interact.emit(this.item);
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
render() {
|
|
57
57
|
var _a, _b;
|
|
58
|
-
return (index.h(index.Host, { key: '
|
|
58
|
+
return (index.h(index.Host, { key: 'c074d460169b860be8ebdf5d14db2fddd99114f7', id: this.item.id.toString(), class: {
|
|
59
59
|
'has-unpromoted-actions': !!((_a = this.item.unpromotedActions) === null || _a === void 0 ? void 0 : _a.length),
|
|
60
60
|
'has-author-picture': !!((_b = this.item.author) === null || _b === void 0 ? void 0 : _b.picture),
|
|
61
61
|
}, style: {
|
|
@@ -10,55 +10,26 @@ const LimebbKanbanStyle0 = kanbanCss;
|
|
|
10
10
|
const Kanban = class {
|
|
11
11
|
constructor(hostRef) {
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
|
+
this.loadMore = index.createEvent(this, "loadMore", 7);
|
|
14
|
+
this.interact = index.createEvent(this, "interact", 7);
|
|
13
15
|
/**
|
|
14
|
-
* List of
|
|
15
|
-
|
|
16
|
-
this.items = [];
|
|
17
|
-
/**
|
|
18
|
-
* The number of items rendered in each column,
|
|
19
|
-
* before pressing the "Load more" button.
|
|
20
|
-
*/
|
|
21
|
-
this.paginationSize = 0;
|
|
22
|
-
/**
|
|
23
|
-
* List of possible groups to display in the kanban board.
|
|
24
|
-
* These need to be the values which are potentially
|
|
25
|
-
* found in the `groupBy` property. This will ensure that
|
|
26
|
-
* empty groups are rendered, if provided kanban items
|
|
27
|
-
* do not hold data all possible groups.
|
|
16
|
+
* List of groups to display in the kanban board.
|
|
17
|
+
* Each group contains a list of items belonging to that group.
|
|
28
18
|
*/
|
|
29
19
|
this.groups = [];
|
|
20
|
+
this.handleLoadMore = (group) => (event) => {
|
|
21
|
+
event.stopPropagation();
|
|
22
|
+
if (group.identifier !== event.detail) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
this.loadMore.emit(group);
|
|
26
|
+
};
|
|
30
27
|
}
|
|
31
28
|
render() {
|
|
32
|
-
return this.
|
|
33
|
-
}
|
|
34
|
-
renderColumns() {
|
|
35
|
-
const groupedItems = this.groupItems();
|
|
36
|
-
return groupedItems.map((group) => (index.h("limebb-kanban-column", { platform: this.platform, context: this.context, paginationSize: this.paginationSize, items: group.items, columnHeading: group.key, class: group.key === 'Ungrouped' ? 'ungrouped-column' : '' })));
|
|
29
|
+
return this.renderGroups();
|
|
37
30
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const key = item[this.groupBy] || 'Ungrouped';
|
|
41
|
-
if (!acc[key]) {
|
|
42
|
-
acc[key] = [];
|
|
43
|
-
}
|
|
44
|
-
acc[key].push(item);
|
|
45
|
-
return acc;
|
|
46
|
-
}, {});
|
|
47
|
-
this.groups.forEach((group) => {
|
|
48
|
-
if (!groups[group]) {
|
|
49
|
-
groups[group] = [];
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
const groupedItems = Object.entries(groups).map(([key, items]) => ({
|
|
53
|
-
key: key,
|
|
54
|
-
items: items,
|
|
55
|
-
}));
|
|
56
|
-
const ungroupedIndex = groupedItems.findIndex((group) => group.key === 'Ungrouped');
|
|
57
|
-
if (ungroupedIndex !== -1) {
|
|
58
|
-
const [ungrouped] = groupedItems.splice(ungroupedIndex, 1);
|
|
59
|
-
groupedItems.push(ungrouped);
|
|
60
|
-
}
|
|
61
|
-
return groupedItems;
|
|
31
|
+
renderGroups() {
|
|
32
|
+
return this.groups.map((group) => (index.h("limebb-kanban-group", { platform: this.platform, context: this.context, identifier: group.identifier, heading: group.heading, totalCount: group.totalCount, loading: group.loading, items: group.items, class: group.type, onLoadMore: this.handleLoadMore(group) })));
|
|
62
33
|
}
|
|
63
34
|
};
|
|
64
35
|
Kanban.style = LimebbKanbanStyle0;
|
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"],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-kanban.cjs",[[1,"limebb-kanban",{"platform":[16],"context":[16],"
|
|
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"],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-kanban.cjs",[[1,"limebb-kanban",{"platform":[16],"context":[16],"groups":[16]}]]],["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],"items":[32],"highlightedItemIndex":[32],"customElements":[32],"registeredTriggers":[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-navigation-button.cjs",[[17,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["limebb-summary-popover.cjs",[[1,"limebb-summary-popover",{"heading":[513],"subheading":[513],"image":[16],"icon":[513],"value":[1],"openDirection":[513,"open-direction"],"actions":[16],"isPopoverOpen":[32]}]]],["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-kanban-group.cjs",[[1,"limebb-kanban-group",{"platform":[16],"context":[16],"identifier":[1],"heading":[513],"items":[16],"loading":[516],"totalCount":[514,"total-count"]}]]],["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-empty-state.cjs",[[1,"limebb-empty-state",{"heading":[513],"value":[513],"icon":[16]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"components/info-tile/format/config/info-tile-relative-date-format.js",
|
|
20
20
|
"components/info-tile/format/config/info-tile-unit-format.js",
|
|
21
21
|
"components/kanban/kanban.js",
|
|
22
|
-
"components/kanban/kanban-
|
|
22
|
+
"components/kanban/kanban-group/kanban-group.js",
|
|
23
23
|
"components/kanban/kanban-item/kanban-item.js",
|
|
24
24
|
"components/limeobject/file-viewer/file-viewer.js",
|
|
25
25
|
"components/locale-picker/locale-picker.js",
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
* to enable you to truncate a piece of text,
|
|
58
58
|
* after a certain number of lines.
|
|
59
59
|
*/
|
|
60
|
-
:host(limebb-kanban-
|
|
61
|
-
background-color: rgb(var(--limebb-kanban-
|
|
60
|
+
:host(limebb-kanban-group) {
|
|
61
|
+
background-color: rgb(var(--limebb-kanban-group-primary-background));
|
|
62
62
|
--header-top-right-left-border-radius: 0.5rem;
|
|
63
|
-
--limebb-kanban-
|
|
64
|
-
--limebb-kanban-
|
|
63
|
+
--limebb-kanban-group-secondary-background: var(--contrast-300);
|
|
64
|
+
--limebb-kanban-group-primary-background: var(--contrast-500);
|
|
65
65
|
scroll-snap-align: start;
|
|
66
66
|
box-sizing: border-box;
|
|
67
67
|
display: flex;
|
|
@@ -70,31 +70,36 @@
|
|
|
70
70
|
min-width: 20rem;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
:host(limebb-kanban-
|
|
73
|
+
:host(limebb-kanban-group.secondary) {
|
|
74
74
|
border: 1px dashed rgb(var(--contrast-700));
|
|
75
|
-
background-color: rgb(var(--limebb-kanban-
|
|
75
|
+
background-color: rgb(var(--limebb-kanban-group-secondary-background));
|
|
76
76
|
}
|
|
77
|
-
:host(limebb-kanban-
|
|
77
|
+
:host(limebb-kanban-group.secondary) limebb-kanban-item {
|
|
78
78
|
border: 1px dashed rgb(var(--contrast-700));
|
|
79
79
|
}
|
|
80
|
-
:host(limebb-kanban-
|
|
81
|
-
background-color: rgb(var(--limebb-kanban-
|
|
80
|
+
:host(limebb-kanban-group.secondary) limel-header {
|
|
81
|
+
background-color: rgb(var(--limebb-kanban-group-secondary-background));
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
limel-header {
|
|
85
85
|
flex-shrink: 0;
|
|
86
86
|
width: auto;
|
|
87
|
-
background-color: rgb(var(--limebb-kanban-
|
|
87
|
+
background-color: rgb(var(--limebb-kanban-group-primary-background));
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
limel-badge {
|
|
91
91
|
--badge-background-color: rgb(var(--contrast-200));
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
.
|
|
94
|
+
.group-heading {
|
|
95
95
|
display: flex;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
.load-more-button,
|
|
99
|
+
limel-spinner {
|
|
100
|
+
align-self: center;
|
|
101
|
+
}
|
|
102
|
+
|
|
98
103
|
.items {
|
|
99
104
|
flex-grow: 1;
|
|
100
105
|
display: flex;
|
|
@@ -1,44 +1,33 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { PlatformServiceName, } from "@limetech/lime-web-components";
|
|
3
3
|
/**
|
|
4
|
-
* This component generates the
|
|
4
|
+
* This component generates the groups for `limebb-kanban`.
|
|
5
5
|
*
|
|
6
6
|
* @private
|
|
7
7
|
*/
|
|
8
|
-
export class
|
|
8
|
+
export class KanbanGroup {
|
|
9
9
|
constructor() {
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
* `groupBy` property of the `limebb-kanban` component.
|
|
13
|
-
*/
|
|
14
|
-
this.columnHeading = 'Ungrouped';
|
|
15
|
-
/**
|
|
16
|
-
* List of items to display in the column.
|
|
11
|
+
* List of items to display in the group.
|
|
17
12
|
*/
|
|
18
13
|
this.items = [];
|
|
19
|
-
this.displayedItemCount = 0;
|
|
20
14
|
this.handleLoadMore = (event) => {
|
|
21
15
|
event.stopPropagation();
|
|
22
|
-
this.
|
|
23
|
-
this.loadMore.emit();
|
|
16
|
+
this.loadMore.emit(this.identifier);
|
|
24
17
|
};
|
|
25
18
|
}
|
|
26
|
-
componentWillLoad() {
|
|
27
|
-
this.displayedItemCount = this.paginationSize;
|
|
28
|
-
}
|
|
29
19
|
render() {
|
|
30
20
|
return [
|
|
31
|
-
this.
|
|
32
|
-
h("div", { key: '
|
|
21
|
+
this.renderGroupHeading(),
|
|
22
|
+
h("div", { key: '1e1eaca2ecba25502dd11f8ee677f29878de7f44', class: "items" }, this.renderKanbanItems(), this.renderSpinner(), this.renderLoadMore()),
|
|
33
23
|
];
|
|
34
24
|
}
|
|
35
|
-
|
|
36
|
-
return (h("div", { class: "
|
|
25
|
+
renderGroupHeading() {
|
|
26
|
+
return (h("div", { class: "group-heading" }, h("limel-header", { heading: this.heading }), this.renderItemNumber()));
|
|
37
27
|
}
|
|
38
28
|
renderItemNumber() {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
29
|
+
var _a;
|
|
30
|
+
return h("limel-badge", { label: (_a = this.totalCount) !== null && _a !== void 0 ? _a : 0 });
|
|
42
31
|
}
|
|
43
32
|
renderSpinner() {
|
|
44
33
|
if (this.loading) {
|
|
@@ -46,13 +35,12 @@ export class KanbanColumn {
|
|
|
46
35
|
}
|
|
47
36
|
}
|
|
48
37
|
renderKanbanItems() {
|
|
49
|
-
return this.items.
|
|
38
|
+
return this.items.map((item) => {
|
|
50
39
|
return (h("limebb-kanban-item", { tabindex: 0, platform: this.platform, context: this.context, item: item, key: item.id }));
|
|
51
40
|
});
|
|
52
41
|
}
|
|
53
42
|
renderLoadMore() {
|
|
54
|
-
if (
|
|
55
|
-
this.displayedItemCount >= this.items.length) {
|
|
43
|
+
if (this.loading || this.items.length >= this.totalCount) {
|
|
56
44
|
return;
|
|
57
45
|
}
|
|
58
46
|
return (h("limel-icon-button", { class: "load-more-button", icon: "more", onClick: this.handleLoadMore, elevated: true, label: this.translator.get('webclient.load-more') }));
|
|
@@ -60,16 +48,16 @@ export class KanbanColumn {
|
|
|
60
48
|
get translator() {
|
|
61
49
|
return this.platform.get(PlatformServiceName.Translate);
|
|
62
50
|
}
|
|
63
|
-
static get is() { return "limebb-kanban-
|
|
51
|
+
static get is() { return "limebb-kanban-group"; }
|
|
64
52
|
static get encapsulation() { return "shadow"; }
|
|
65
53
|
static get originalStyleUrls() {
|
|
66
54
|
return {
|
|
67
|
-
"$": ["kanban-
|
|
55
|
+
"$": ["kanban-group.scss"]
|
|
68
56
|
};
|
|
69
57
|
}
|
|
70
58
|
static get styleUrls() {
|
|
71
59
|
return {
|
|
72
|
-
"$": ["kanban-
|
|
60
|
+
"$": ["kanban-group.css"]
|
|
73
61
|
};
|
|
74
62
|
}
|
|
75
63
|
static get properties() {
|
|
@@ -126,7 +114,26 @@ export class KanbanColumn {
|
|
|
126
114
|
"getter": false,
|
|
127
115
|
"setter": false
|
|
128
116
|
},
|
|
129
|
-
"
|
|
117
|
+
"identifier": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"mutable": false,
|
|
120
|
+
"complexType": {
|
|
121
|
+
"original": "string",
|
|
122
|
+
"resolved": "string",
|
|
123
|
+
"references": {}
|
|
124
|
+
},
|
|
125
|
+
"required": false,
|
|
126
|
+
"optional": false,
|
|
127
|
+
"docs": {
|
|
128
|
+
"tags": [],
|
|
129
|
+
"text": "A unique identifier for the group."
|
|
130
|
+
},
|
|
131
|
+
"getter": false,
|
|
132
|
+
"setter": false,
|
|
133
|
+
"attribute": "identifier",
|
|
134
|
+
"reflect": false
|
|
135
|
+
},
|
|
136
|
+
"heading": {
|
|
130
137
|
"type": "string",
|
|
131
138
|
"mutable": false,
|
|
132
139
|
"complexType": {
|
|
@@ -138,13 +145,12 @@ export class KanbanColumn {
|
|
|
138
145
|
"optional": false,
|
|
139
146
|
"docs": {
|
|
140
147
|
"tags": [],
|
|
141
|
-
"text": "The title of the
|
|
148
|
+
"text": "The title of the group, which is taken from the\n`groupBy` property of the `limebb-kanban` component."
|
|
142
149
|
},
|
|
143
150
|
"getter": false,
|
|
144
151
|
"setter": false,
|
|
145
|
-
"attribute": "
|
|
146
|
-
"reflect":
|
|
147
|
-
"defaultValue": "'Ungrouped'"
|
|
152
|
+
"attribute": "heading",
|
|
153
|
+
"reflect": true
|
|
148
154
|
},
|
|
149
155
|
"items": {
|
|
150
156
|
"type": "unknown",
|
|
@@ -164,7 +170,7 @@ export class KanbanColumn {
|
|
|
164
170
|
"optional": false,
|
|
165
171
|
"docs": {
|
|
166
172
|
"tags": [],
|
|
167
|
-
"text": "List of items to display in the
|
|
173
|
+
"text": "List of items to display in the group."
|
|
168
174
|
},
|
|
169
175
|
"getter": false,
|
|
170
176
|
"setter": false,
|
|
@@ -187,9 +193,9 @@ export class KanbanColumn {
|
|
|
187
193
|
"getter": false,
|
|
188
194
|
"setter": false,
|
|
189
195
|
"attribute": "loading",
|
|
190
|
-
"reflect":
|
|
196
|
+
"reflect": true
|
|
191
197
|
},
|
|
192
|
-
"
|
|
198
|
+
"totalCount": {
|
|
193
199
|
"type": "number",
|
|
194
200
|
"mutable": false,
|
|
195
201
|
"complexType": {
|
|
@@ -201,20 +207,15 @@ export class KanbanColumn {
|
|
|
201
207
|
"optional": false,
|
|
202
208
|
"docs": {
|
|
203
209
|
"tags": [],
|
|
204
|
-
"text": "
|
|
210
|
+
"text": "Total number of items available for the group.\nThis is used to determine if the \"load more\"\nbutton should be displayed."
|
|
205
211
|
},
|
|
206
212
|
"getter": false,
|
|
207
213
|
"setter": false,
|
|
208
|
-
"attribute": "
|
|
209
|
-
"reflect":
|
|
214
|
+
"attribute": "total-count",
|
|
215
|
+
"reflect": true
|
|
210
216
|
}
|
|
211
217
|
};
|
|
212
218
|
}
|
|
213
|
-
static get states() {
|
|
214
|
-
return {
|
|
215
|
-
"displayedItemCount": {}
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
219
|
static get events() {
|
|
219
220
|
return [{
|
|
220
221
|
"method": "loadMore",
|
|
@@ -227,9 +228,14 @@ export class KanbanColumn {
|
|
|
227
228
|
"text": "Emitted when the load more button is clicked"
|
|
228
229
|
},
|
|
229
230
|
"complexType": {
|
|
230
|
-
"original": "
|
|
231
|
-
"resolved": "
|
|
232
|
-
"references": {
|
|
231
|
+
"original": "KanbanGroup['identifier']",
|
|
232
|
+
"resolved": "string",
|
|
233
|
+
"references": {
|
|
234
|
+
"KanbanGroup": {
|
|
235
|
+
"location": "global",
|
|
236
|
+
"id": "global::KanbanGroup"
|
|
237
|
+
}
|
|
238
|
+
}
|
|
233
239
|
}
|
|
234
240
|
}];
|
|
235
241
|
}
|
|
@@ -45,12 +45,12 @@ export class KanbanItemComponent {
|
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
this.handleKanbanItemClick = () => {
|
|
48
|
-
this.interact.emit();
|
|
48
|
+
this.interact.emit(this.item);
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
render() {
|
|
52
52
|
var _a, _b;
|
|
53
|
-
return (h(Host, { key: '
|
|
53
|
+
return (h(Host, { key: 'c074d460169b860be8ebdf5d14db2fddd99114f7', id: this.item.id.toString(), class: {
|
|
54
54
|
'has-unpromoted-actions': !!((_a = this.item.unpromotedActions) === null || _a === void 0 ? void 0 : _a.length),
|
|
55
55
|
'has-author-picture': !!((_b = this.item.author) === null || _b === void 0 ? void 0 : _b.picture),
|
|
56
56
|
}, style: {
|
|
@@ -232,7 +232,7 @@ export class KanbanItemComponent {
|
|
|
232
232
|
"optional": false,
|
|
233
233
|
"docs": {
|
|
234
234
|
"tags": [],
|
|
235
|
-
"text": "The item to display in the Kanban
|
|
235
|
+
"text": "The item to display in the Kanban group."
|
|
236
236
|
},
|
|
237
237
|
"getter": false,
|
|
238
238
|
"setter": false
|
|
@@ -251,9 +251,15 @@ export class KanbanItemComponent {
|
|
|
251
251
|
"text": "Fired when clicking on the Kanban item."
|
|
252
252
|
},
|
|
253
253
|
"complexType": {
|
|
254
|
-
"original": "
|
|
255
|
-
"resolved": "
|
|
256
|
-
"references": {
|
|
254
|
+
"original": "KanbanItem",
|
|
255
|
+
"resolved": "KanbanItem",
|
|
256
|
+
"references": {
|
|
257
|
+
"KanbanItem": {
|
|
258
|
+
"location": "import",
|
|
259
|
+
"path": "./kanban-item.types",
|
|
260
|
+
"id": "src/components/kanban/kanban-item/kanban-item.types.ts::KanbanItem"
|
|
261
|
+
}
|
|
262
|
+
}
|
|
257
263
|
}
|
|
258
264
|
}];
|
|
259
265
|
}
|