@limetech/lime-crm-building-blocks 1.37.0 → 1.38.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
  3. package/dist/cjs/limebb-kanban-column.cjs.entry.js +46 -0
  4. package/dist/cjs/limebb-kanban-item.cjs.entry.js +19 -0
  5. package/dist/cjs/limebb-kanban.cjs.entry.js +60 -0
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/collection/collection-manifest.json +3 -0
  8. package/dist/collection/components/kanban/index.js +1 -0
  9. package/dist/collection/components/kanban/kanban-column/kanban-column.css +30 -0
  10. package/dist/collection/components/kanban/kanban-column/kanban-column.js +158 -0
  11. package/dist/collection/components/kanban/kanban-item/kanban-item.css +11 -0
  12. package/dist/collection/components/kanban/kanban-item/kanban-item.js +95 -0
  13. package/dist/collection/components/kanban/kanban-item/kanban-item.types.js +1 -0
  14. package/dist/collection/components/kanban/kanban.css +18 -0
  15. package/dist/collection/components/kanban/kanban.js +179 -0
  16. package/dist/collection/components/kanban/kanban.types.js +1 -0
  17. package/dist/components/index.d.ts +3 -0
  18. package/dist/components/index.js +3 -0
  19. package/dist/components/kanban-column.js +69 -0
  20. package/dist/components/kanban-item.js +34 -0
  21. package/dist/components/limebb-kanban-column.d.ts +11 -0
  22. package/dist/components/limebb-kanban-column.js +6 -0
  23. package/dist/components/limebb-kanban-item.d.ts +11 -0
  24. package/dist/components/limebb-kanban-item.js +6 -0
  25. package/dist/components/limebb-kanban.d.ts +11 -0
  26. package/dist/components/limebb-kanban.js +92 -0
  27. package/dist/esm/lime-crm-building-blocks.js +1 -1
  28. package/dist/esm/limebb-kanban-column.entry.js +42 -0
  29. package/dist/esm/limebb-kanban-item.entry.js +15 -0
  30. package/dist/esm/limebb-kanban.entry.js +56 -0
  31. package/dist/esm/loader.js +1 -1
  32. package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
  33. package/dist/lime-crm-building-blocks/p-44d3abc4.entry.js +1 -0
  34. package/dist/lime-crm-building-blocks/p-a5d6af9a.entry.js +1 -0
  35. package/dist/lime-crm-building-blocks/p-c443726a.entry.js +1 -0
  36. package/dist/types/components/kanban/index.d.ts +2 -0
  37. package/dist/types/components/kanban/kanban-column/kanban-column.d.ts +34 -0
  38. package/dist/types/components/kanban/kanban-item/kanban-item.d.ts +24 -0
  39. package/dist/types/components/kanban/kanban-item/kanban-item.types.d.ts +7 -0
  40. package/dist/types/components/kanban/kanban.d.ts +46 -0
  41. package/dist/types/components/kanban/kanban.types.d.ts +4 -0
  42. package/dist/types/components.d.ts +156 -0
  43. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [1.38.0](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.37.0...v1.38.0) (2024-08-09)
2
+
3
+
4
+ ### Features
5
+
6
+
7
+ * **kanban:** add new private component ([d876fd9](https://github.com/Lundalogik/lime-crm-building-blocks/commit/d876fd97d395658c07373e00fdf6909ff901a23c))
8
+
1
9
  ## [1.37.0](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.36.3...v1.37.0) (2024-08-07)
2
10
 
3
11
 
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["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-feed.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-browser.cjs",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["limebb-currency-picker.cjs",[[1,"limebb-currency-picker",{"label":[513],"platform":[16],"currencies":[16],"helperText":[513,"helper-text"],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"value":[16]}]]],["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":[1,"filter-id"],"disabled":[4],"icon":[1],"label":[1],"prefix":[1],"suffix":[1],"propertyName":[1,"property-name"],"aggregateOperator":[1,"aggregate-operator"],"filters":[32],"value":[32],"loading":[32],"error":[32]}]]],["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-navigation-button.cjs",[[17,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["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-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]}]]]], options);
18
+ return index.bootstrapLazy([["limebb-kanban.cjs",[[1,"limebb-kanban",{"platform":[16],"context":[16],"items":[16],"groupBy":[513,"group-by"],"groups":[16]}]]],["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-feed.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-browser.cjs",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["limebb-currency-picker.cjs",[[1,"limebb-currency-picker",{"label":[513],"platform":[16],"currencies":[16],"helperText":[513,"helper-text"],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"value":[16]}]]],["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":[1,"filter-id"],"disabled":[4],"icon":[1],"label":[1],"prefix":[1],"suffix":[1],"propertyName":[1,"property-name"],"aggregateOperator":[1,"aggregate-operator"],"filters":[32],"value":[32],"loading":[32],"error":[32]}]]],["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-navigation-button.cjs",[[17,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["limebb-kanban-item.cjs",[[1,"limebb-kanban-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-kanban-column.cjs",[[1,"limebb-kanban-column",{"platform":[16],"context":[16],"columnHeading":[1,"column-heading"],"items":[16],"loading":[4]}]]],["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-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]}]]]], options);
19
19
  });
@@ -0,0 +1,46 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-7008b946.js');
6
+
7
+ const kanbanColumnCss = ":host(limebb-kanban-column){--header-top-right-left-border-radius:0.5rem;scroll-snap-align:start;box-sizing:border-box;display:flex;flex-direction:column;border-radius:0.5rem;min-width:20rem;height:100%;background-color:rgb(var(--contrast-500))}:host(limebb-kanban-column.ungrouped-column){border:1px dashed rgb(var(--contrast-500));background-color:rgb(var(--contrast-200))}limel-header{flex-shrink:0}.items{flex-grow:1;display:flex;flex-direction:column;gap:0.5rem;padding:0.5rem;overflow-y:auto;-webkit-overflow-scrolling:touch}";
8
+
9
+ const KanbanColumn = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ /**
13
+ * The title of the column, which is taken from the
14
+ * `groupBy` property of the `limebb-kanban` component.
15
+ */
16
+ this.columnHeading = 'Ungrouped';
17
+ /**
18
+ * List of items to display in the column.
19
+ */
20
+ this.items = [];
21
+ }
22
+ render() {
23
+ return [
24
+ this.renderColumnHeading(),
25
+ index.h("div", { class: "items" }, this.renderSpinner(), this.renderKanbanItems()),
26
+ ];
27
+ }
28
+ renderColumnHeading() {
29
+ return index.h("limel-header", { heading: this.columnHeading });
30
+ }
31
+ renderSpinner() {
32
+ if (this.loading) {
33
+ return index.h("limel-spinner", { size: "small" });
34
+ }
35
+ }
36
+ renderKanbanItems() {
37
+ return this.items.map((item) => {
38
+ return [
39
+ index.h("limebb-kanban-item", { platform: this.platform, context: this.context, item: item, key: item.id }),
40
+ ];
41
+ });
42
+ }
43
+ };
44
+ KanbanColumn.style = kanbanColumnCss;
45
+
46
+ exports.limebb_kanban_column = KanbanColumn;
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-7008b946.js');
6
+
7
+ const kanbanItemCss = ":host(limebb-kanban-item){box-sizing:border-box;display:flex;padding:0.5rem;border-radius:0.5rem;background-color:var(--lime-elevated-surface-background-color)}.icon{width:1.25rem}";
8
+
9
+ const KanbanItemComponent = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ }
13
+ render() {
14
+ return (index.h(index.Host, null, index.h("span", null, "item")));
15
+ }
16
+ };
17
+ KanbanItemComponent.style = kanbanItemCss;
18
+
19
+ exports.limebb_kanban_item = KanbanItemComponent;
@@ -0,0 +1,60 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-7008b946.js');
6
+
7
+ const kanbanCss = ":host(limebb-kanban){--limebb-kanban-col-gap:1rem;box-sizing:border-box;display:flex;align-items:stretch;column-gap:var(--limebb-kanban-col-gap);width:100%;height:100%;padding:0.5rem;padding-right:calc(var(--kanban-padding-right, 0rem) + 5rem);overflow-x:auto;-webkit-overflow-scrolling:touch;scroll-snap-type:x mandatory;scroll-padding:calc(var(--limebb-kanban-col-gap) + 0.5rem)}";
8
+
9
+ const Kanban = class {
10
+ constructor(hostRef) {
11
+ index.registerInstance(this, hostRef);
12
+ /**
13
+ * List of items to display in the kanban board.
14
+ */
15
+ this.items = [];
16
+ /**
17
+ * List of possible groups to display in the kanban board.
18
+ * These need to be the values which are potentially
19
+ * found in the `groupBy` property. This will ensure that
20
+ * empty groups are rendered, if provided kanban items
21
+ * do not hold data all possible groups.
22
+ */
23
+ this.groups = [];
24
+ }
25
+ render() {
26
+ return this.renderColumns();
27
+ }
28
+ renderColumns() {
29
+ const groupedItems = this.groupItems();
30
+ return groupedItems.map((group) => (index.h("limebb-kanban-column", { platform: this.platform, context: this.context, items: group.items, columnHeading: group.key, class: group.key === 'Ungrouped' ? 'ungrouped-column' : '' })));
31
+ }
32
+ groupItems() {
33
+ const groups = this.items.reduce((acc, item) => {
34
+ const key = item[this.groupBy] || 'Ungrouped';
35
+ if (!acc[key]) {
36
+ acc[key] = [];
37
+ }
38
+ acc[key].push(item);
39
+ return acc;
40
+ }, {});
41
+ this.groups.forEach((group) => {
42
+ if (!groups[group]) {
43
+ groups[group] = [];
44
+ }
45
+ });
46
+ const groupedItems = Object.entries(groups).map(([key, items]) => ({
47
+ key: key,
48
+ items: items,
49
+ }));
50
+ const ungroupedIndex = groupedItems.findIndex((group) => group.key === 'Ungrouped');
51
+ if (ungroupedIndex !== -1) {
52
+ const [ungrouped] = groupedItems.splice(ungroupedIndex, 1);
53
+ groupedItems.push(ungrouped);
54
+ }
55
+ return groupedItems;
56
+ }
57
+ };
58
+ Kanban.style = kanbanCss;
59
+
60
+ exports.limebb_kanban = Kanban;
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["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-feed.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-browser.cjs",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["limebb-currency-picker.cjs",[[1,"limebb-currency-picker",{"label":[513],"platform":[16],"currencies":[16],"helperText":[513,"helper-text"],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"value":[16]}]]],["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":[1,"filter-id"],"disabled":[4],"icon":[1],"label":[1],"prefix":[1],"suffix":[1],"propertyName":[1,"property-name"],"aggregateOperator":[1,"aggregate-operator"],"filters":[32],"value":[32],"loading":[32],"error":[32]}]]],["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-navigation-button.cjs",[[17,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["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-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]}]]]], options);
17
+ return index.bootstrapLazy([["limebb-kanban.cjs",[[1,"limebb-kanban",{"platform":[16],"context":[16],"items":[16],"groupBy":[513,"group-by"],"groups":[16]}]]],["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-feed.cjs",[[1,"limebb-feed",{"platform":[16],"context":[16],"items":[16],"emptyStateMessage":[1,"empty-state-message"],"loading":[4],"minutesOfProximity":[2,"minutes-of-proximity"],"totalCount":[2,"total-count"],"lastVisitedTimestamp":[1,"last-visited-timestamp"]}]]],["limebb-browser.cjs",[[17,"limebb-browser",{"platform":[16],"context":[16],"items":[16],"layout":[1],"filter":[32]}]]],["limebb-currency-picker.cjs",[[1,"limebb-currency-picker",{"label":[513],"platform":[16],"currencies":[16],"helperText":[513,"helper-text"],"required":[516],"readonly":[516],"invalid":[516],"disabled":[516],"value":[16]}]]],["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":[1,"filter-id"],"disabled":[4],"icon":[1],"label":[1],"prefix":[1],"suffix":[1],"propertyName":[1,"property-name"],"aggregateOperator":[1,"aggregate-operator"],"filters":[32],"value":[32],"loading":[32],"error":[32]}]]],["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-navigation-button.cjs",[[17,"limebb-navigation-button",{"href":[513],"tooltipLabel":[513,"tooltip-label"],"tooltipHelperLabel":[513,"tooltip-helper-label"],"type":[513]}]]],["limebb-kanban-item.cjs",[[1,"limebb-kanban-item",{"platform":[16],"context":[16],"item":[16]}]]],["limebb-kanban-column.cjs",[[1,"limebb-kanban-column",{"platform":[16],"context":[16],"columnHeading":[1,"column-heading"],"items":[16],"loading":[4]}]]],["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-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]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -9,6 +9,9 @@
9
9
  "./components/feed/feed-item/feed-timeline-item.js",
10
10
  "./components/icon-picker/icon-picker.js",
11
11
  "./components/info-tile/info-tile.js",
12
+ "./components/kanban/kanban.js",
13
+ "./components/kanban/kanban-column/kanban-column.js",
14
+ "./components/kanban/kanban-item/kanban-item.js",
12
15
  "./components/limeobject/file-viewer/file-viewer.js",
13
16
  "./components/locale-picker/locale-picker.js",
14
17
  "./components/navigation-button/navigation-button.js"
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,30 @@
1
+ :host(limebb-kanban-column) {
2
+ --header-top-right-left-border-radius: 0.5rem;
3
+ scroll-snap-align: start;
4
+ box-sizing: border-box;
5
+ display: flex;
6
+ flex-direction: column;
7
+ border-radius: 0.5rem;
8
+ min-width: 20rem;
9
+ height: 100%;
10
+ background-color: rgb(var(--contrast-500));
11
+ }
12
+
13
+ :host(limebb-kanban-column.ungrouped-column) {
14
+ border: 1px dashed rgb(var(--contrast-500));
15
+ background-color: rgb(var(--contrast-200));
16
+ }
17
+
18
+ limel-header {
19
+ flex-shrink: 0;
20
+ }
21
+
22
+ .items {
23
+ flex-grow: 1;
24
+ display: flex;
25
+ flex-direction: column;
26
+ gap: 0.5rem;
27
+ padding: 0.5rem;
28
+ overflow-y: auto;
29
+ -webkit-overflow-scrolling: touch;
30
+ }
@@ -0,0 +1,158 @@
1
+ import { h } from '@stencil/core';
2
+ /**
3
+ * This component generates the columns for `limebb-kanban`.
4
+ *
5
+ * @private
6
+ */
7
+ export class KanbanColumn {
8
+ constructor() {
9
+ /**
10
+ * The title of the column, which is taken from the
11
+ * `groupBy` property of the `limebb-kanban` component.
12
+ */
13
+ this.columnHeading = 'Ungrouped';
14
+ /**
15
+ * List of items to display in the column.
16
+ */
17
+ this.items = [];
18
+ }
19
+ render() {
20
+ return [
21
+ this.renderColumnHeading(),
22
+ h("div", { class: "items" }, this.renderSpinner(), this.renderKanbanItems()),
23
+ ];
24
+ }
25
+ renderColumnHeading() {
26
+ return h("limel-header", { heading: this.columnHeading });
27
+ }
28
+ renderSpinner() {
29
+ if (this.loading) {
30
+ return h("limel-spinner", { size: "small" });
31
+ }
32
+ }
33
+ renderKanbanItems() {
34
+ return this.items.map((item) => {
35
+ return [
36
+ h("limebb-kanban-item", { platform: this.platform, context: this.context, item: item, key: item.id }),
37
+ ];
38
+ });
39
+ }
40
+ static get is() { return "limebb-kanban-column"; }
41
+ static get encapsulation() { return "shadow"; }
42
+ static get originalStyleUrls() {
43
+ return {
44
+ "$": ["kanban-column.scss"]
45
+ };
46
+ }
47
+ static get styleUrls() {
48
+ return {
49
+ "$": ["kanban-column.css"]
50
+ };
51
+ }
52
+ static get properties() {
53
+ return {
54
+ "platform": {
55
+ "type": "unknown",
56
+ "mutable": false,
57
+ "complexType": {
58
+ "original": "LimeWebComponentPlatform",
59
+ "resolved": "LimeWebComponentPlatform",
60
+ "references": {
61
+ "LimeWebComponentPlatform": {
62
+ "location": "import",
63
+ "path": "@limetech/lime-web-components"
64
+ }
65
+ }
66
+ },
67
+ "required": true,
68
+ "optional": false,
69
+ "docs": {
70
+ "tags": [{
71
+ "name": "inheritdoc",
72
+ "text": undefined
73
+ }],
74
+ "text": "Reference to the platform"
75
+ }
76
+ },
77
+ "context": {
78
+ "type": "unknown",
79
+ "mutable": false,
80
+ "complexType": {
81
+ "original": "LimeWebComponentContext",
82
+ "resolved": "LimeWebComponentContext",
83
+ "references": {
84
+ "LimeWebComponentContext": {
85
+ "location": "import",
86
+ "path": "@limetech/lime-web-components"
87
+ }
88
+ }
89
+ },
90
+ "required": false,
91
+ "optional": false,
92
+ "docs": {
93
+ "tags": [{
94
+ "name": "inheritdoc",
95
+ "text": undefined
96
+ }],
97
+ "text": "The context this component belongs to"
98
+ }
99
+ },
100
+ "columnHeading": {
101
+ "type": "string",
102
+ "mutable": false,
103
+ "complexType": {
104
+ "original": "string",
105
+ "resolved": "string",
106
+ "references": {}
107
+ },
108
+ "required": false,
109
+ "optional": false,
110
+ "docs": {
111
+ "tags": [],
112
+ "text": "The title of the column, which is taken from the\n`groupBy` property of the `limebb-kanban` component."
113
+ },
114
+ "attribute": "column-heading",
115
+ "reflect": false,
116
+ "defaultValue": "'Ungrouped'"
117
+ },
118
+ "items": {
119
+ "type": "unknown",
120
+ "mutable": false,
121
+ "complexType": {
122
+ "original": "KanbanItem[]",
123
+ "resolved": "KanbanItem[]",
124
+ "references": {
125
+ "KanbanItem": {
126
+ "location": "import",
127
+ "path": "../kanban-item/kanban-item.types"
128
+ }
129
+ }
130
+ },
131
+ "required": false,
132
+ "optional": false,
133
+ "docs": {
134
+ "tags": [],
135
+ "text": "List of items to display in the column."
136
+ },
137
+ "defaultValue": "[]"
138
+ },
139
+ "loading": {
140
+ "type": "boolean",
141
+ "mutable": false,
142
+ "complexType": {
143
+ "original": "boolean",
144
+ "resolved": "boolean",
145
+ "references": {}
146
+ },
147
+ "required": false,
148
+ "optional": false,
149
+ "docs": {
150
+ "tags": [],
151
+ "text": "True if items have not finished loading."
152
+ },
153
+ "attribute": "loading",
154
+ "reflect": false
155
+ }
156
+ };
157
+ }
158
+ }
@@ -0,0 +1,11 @@
1
+ :host(limebb-kanban-item) {
2
+ box-sizing: border-box;
3
+ display: flex;
4
+ padding: 0.5rem;
5
+ border-radius: 0.5rem;
6
+ background-color: var(--lime-elevated-surface-background-color);
7
+ }
8
+
9
+ .icon {
10
+ width: 1.25rem;
11
+ }
@@ -0,0 +1,95 @@
1
+ import { h, Host } from '@stencil/core';
2
+ /**
3
+ * Kanban item
4
+ * Represents an item in a Kanban board. Items are always equivalent of
5
+ * an object in the CRM.
6
+ *
7
+ * @private
8
+ */
9
+ export class KanbanItemComponent {
10
+ render() {
11
+ return (h(Host, null, h("span", null, "item")));
12
+ }
13
+ static get is() { return "limebb-kanban-item"; }
14
+ static get encapsulation() { return "shadow"; }
15
+ static get originalStyleUrls() {
16
+ return {
17
+ "$": ["kanban-item.scss"]
18
+ };
19
+ }
20
+ static get styleUrls() {
21
+ return {
22
+ "$": ["kanban-item.css"]
23
+ };
24
+ }
25
+ static get properties() {
26
+ return {
27
+ "platform": {
28
+ "type": "unknown",
29
+ "mutable": false,
30
+ "complexType": {
31
+ "original": "LimeWebComponentPlatform",
32
+ "resolved": "LimeWebComponentPlatform",
33
+ "references": {
34
+ "LimeWebComponentPlatform": {
35
+ "location": "import",
36
+ "path": "@limetech/lime-web-components"
37
+ }
38
+ }
39
+ },
40
+ "required": true,
41
+ "optional": false,
42
+ "docs": {
43
+ "tags": [{
44
+ "name": "inheritdoc",
45
+ "text": undefined
46
+ }],
47
+ "text": "Reference to the platform"
48
+ }
49
+ },
50
+ "context": {
51
+ "type": "unknown",
52
+ "mutable": false,
53
+ "complexType": {
54
+ "original": "LimeWebComponentContext",
55
+ "resolved": "LimeWebComponentContext",
56
+ "references": {
57
+ "LimeWebComponentContext": {
58
+ "location": "import",
59
+ "path": "@limetech/lime-web-components"
60
+ }
61
+ }
62
+ },
63
+ "required": false,
64
+ "optional": false,
65
+ "docs": {
66
+ "tags": [{
67
+ "name": "inheritdoc",
68
+ "text": undefined
69
+ }],
70
+ "text": "The context this component belongs to"
71
+ }
72
+ },
73
+ "item": {
74
+ "type": "unknown",
75
+ "mutable": false,
76
+ "complexType": {
77
+ "original": "KanbanItem",
78
+ "resolved": "KanbanItem",
79
+ "references": {
80
+ "KanbanItem": {
81
+ "location": "import",
82
+ "path": "./kanban-item.types"
83
+ }
84
+ }
85
+ },
86
+ "required": false,
87
+ "optional": false,
88
+ "docs": {
89
+ "tags": [],
90
+ "text": "The item to display in the Kanban column."
91
+ }
92
+ }
93
+ };
94
+ }
95
+ }
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @prop --kanban-padding-right: the amount of space in the right side of the component. Could be dynamically changed to the width of the sidepanel for example, when the sidepanel is open. This will avoid the content from being covered by the floating sidepanel
3
+ */
4
+ :host(limebb-kanban) {
5
+ --limebb-kanban-col-gap: 1rem;
6
+ box-sizing: border-box;
7
+ display: flex;
8
+ align-items: stretch;
9
+ column-gap: var(--limebb-kanban-col-gap);
10
+ width: 100%;
11
+ height: 100%;
12
+ padding: 0.5rem;
13
+ padding-right: calc(var(--kanban-padding-right, 0rem) + 5rem);
14
+ overflow-x: auto;
15
+ -webkit-overflow-scrolling: touch;
16
+ scroll-snap-type: x mandatory;
17
+ scroll-padding: calc(var(--limebb-kanban-col-gap) + 0.5rem);
18
+ }