@dizmo/dcs-client-library 4.2.0 → 4.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,8 +35,11 @@ class ItemElement extends HTMLElement {
35
35
  // Only resources show left image
36
36
  const showLeftImage = itemType === ItemType.Resource && (imgUrl || iconUrl);
37
37
  // Resources and needs show secondline, events show formatted date
38
+ const displaySecondLine = itemType === ItemType.Need && secondline
39
+ ? `${secondline} Need`
40
+ : secondline;
38
41
  const showSecondLine = (itemType === ItemType.Resource || itemType === ItemType.Need) &&
39
- secondline;
42
+ displaySecondLine;
40
43
  const showEventDate = itemType === ItemType.Event && secondline;
41
44
  // Format date for events
42
45
  const formattedDate = showEventDate ? formatDateToLocale(secondline) : null;
@@ -79,6 +82,9 @@ class ItemElement extends HTMLElement {
79
82
  overflow: hidden;
80
83
  text-overflow: ellipsis;
81
84
  }
85
+ .item_title.no-image {
86
+ margin-left: 6px;
87
+ }
82
88
  .item_first, .item_second {
83
89
  overflow: hidden;
84
90
  text-overflow: ellipsis;
@@ -118,9 +124,9 @@ class ItemElement extends HTMLElement {
118
124
  </div>
119
125
  `
120
126
  : ""}
121
- <div class="item_title">
127
+ <div class="item_title${showLeftImage ? "" : " no-image"}">
122
128
  <div class="item_first">${firstline}</div>
123
- ${showSecondLine ? `<div class="item_second">${secondline}</div>` : ""}
129
+ ${showSecondLine ? `<div class="item_second">${displaySecondLine}</div>` : ""}
124
130
  ${showEventDate ? `<div class="item_second">${formattedDate}</div>` : ""}
125
131
  </div>
126
132
  <button class="item_button not-invert" id="open-item-btn" itemid="${itemId}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dizmo/dcs-client-library",
3
- "version": "4.2.0",
3
+ "version": "4.2.1",
4
4
  "description": "A library that allows connection and management of dcs",
5
5
  "source": "source/index.ts",
6
6
  "main": "dist/index.js",