hi-tm 0.0.2-beta-0.0.21 → 0.0.2-beta-0.0.22

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.
@@ -211,8 +211,9 @@ mobileViewGridClassName, }) => {
211
211
  let icon = '';
212
212
  let status = '';
213
213
  let statusClass = '';
214
+ let price = '';
214
215
  if (!row.data)
215
- return { title, subtitle, icon, status, statusClass };
216
+ return { title, subtitle, icon, status, statusClass, price };
216
217
  // Find title (usually first text item)
217
218
  const titleItem = row.data.find((item) => item.type === 'text' && item.value);
218
219
  if (titleItem) {
@@ -237,12 +238,17 @@ mobileViewGridClassName, }) => {
237
238
  status = String(statusItem.value || '');
238
239
  statusClass = statusItem.statusClass || '';
239
240
  }
241
+ // Find price (look for item with isPrice flag)
242
+ const priceItem = row.data.find((item) => item.isPrice);
243
+ if (priceItem) {
244
+ price = String(priceItem.value || '');
245
+ }
240
246
  // Find icon (usually avatar or image)
241
247
  const iconItem = row.data.find((item) => item.hasImage);
242
248
  if (iconItem && iconItem.value) {
243
249
  icon = String(iconItem.imageUrl || '');
244
250
  }
245
- return { title, subtitle, icon, status, statusClass };
251
+ return { title, subtitle, icon, status, statusClass, price };
246
252
  };
247
253
  // Find avatar items in row data
248
254
  const findAvatarItems = (row) => {
@@ -277,7 +283,7 @@ mobileViewGridClassName, }) => {
277
283
  const renderMobileCard = (row) => {
278
284
  if (!row || !row.data)
279
285
  return null;
280
- const { title, subtitle, icon, status, statusClass } = extractCardData(row);
286
+ const { title, subtitle, icon, status, statusClass, price } = extractCardData(row);
281
287
  const avatarItems = findAvatarItems(row);
282
288
  const isFavorited = row.data.some((item) => item.isFavorite);
283
289
  const hasChildren = row.hasChildren && row.childRows && row?.childRows?.length > 0;
@@ -307,6 +313,7 @@ mobileViewGridClassName, }) => {
307
313
  row.isChild && (react_1.default.createElement("div", { className: "h-2 w-2 rounded-full bg-blue-400 mr-2 flex-shrink-0" })),
308
314
  react_1.default.createElement("h3", { className: "text-sm font-medium truncate" }, title)),
309
315
  react_1.default.createElement("p", { className: "text-xs text-gray-500 mt-1 truncate" }, subtitle),
316
+ price && react_1.default.createElement("p", { className: "text-sm font-semibold text-blue-600 mt-1" }, price),
310
317
  status && (react_1.default.createElement("div", { className: "mt-2" },
311
318
  react_1.default.createElement("span", { className: `text-xs font-medium px-2 py-1 rounded-full ${getStatusClass(statusClass)} bg-opacity-10` }, status)))),
312
319
  react_1.default.createElement("div", { className: "flex items-center flex-shrink-0 ml-2" },
@@ -16,6 +16,7 @@ export interface DataItem {
16
16
  imageWidth?: number;
17
17
  imageHeight?: number;
18
18
  imageClass?: string;
19
+ isPrice?: boolean;
19
20
  }
20
21
  export interface TableRowData {
21
22
  id: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hi-tm",
3
- "version": "0.0.2-beta-0.0.21",
3
+ "version": "0.0.2-beta-0.0.22",
4
4
  "styles": "dist/styles/globals.css",
5
5
  "main": "dist/index.js",
6
6
  "exports": {