@almadar/ui 4.12.1 → 4.13.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.
@@ -11255,13 +11255,13 @@ var init_MapView = __esm({
11255
11255
  shadowSize: [41, 41]
11256
11256
  });
11257
11257
  L.Marker.prototype.options.icon = defaultIcon;
11258
- const { useEffect: useEffect87, useRef: useRef87, useCallback: useCallback125, useState: useState124 } = React128__namespace.default;
11258
+ const { useEffect: useEffect88, useRef: useRef87, useCallback: useCallback125, useState: useState124 } = React128__namespace.default;
11259
11259
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
11260
11260
  const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
11261
11261
  function MapUpdater({ centerLat, centerLng, zoom }) {
11262
11262
  const map = useMap();
11263
11263
  const prevRef = useRef87({ centerLat, centerLng, zoom });
11264
- useEffect87(() => {
11264
+ useEffect88(() => {
11265
11265
  const prev = prevRef.current;
11266
11266
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
11267
11267
  map.setView([centerLat, centerLng], zoom);
@@ -11272,7 +11272,7 @@ var init_MapView = __esm({
11272
11272
  }
11273
11273
  function MapClickHandler({ onMapClick }) {
11274
11274
  const map = useMap();
11275
- useEffect87(() => {
11275
+ useEffect88(() => {
11276
11276
  if (!onMapClick) return;
11277
11277
  const handler = (e) => {
11278
11278
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -22022,7 +22022,8 @@ function DataGrid({
22022
22022
  loadMoreEvent,
22023
22023
  hasMore,
22024
22024
  children,
22025
- pageSize = 0
22025
+ pageSize = 0,
22026
+ renderItem: schemaRenderItem
22026
22027
  }) {
22027
22028
  const eventBus = useEventBus();
22028
22029
  const { t } = useTranslate();
@@ -22087,6 +22088,26 @@ function DataGrid({
22087
22088
  return /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
22088
22089
  }
22089
22090
  const hasRenderProp = typeof children === "function";
22091
+ React128.useEffect(() => {
22092
+ const renderItemTypeOf = typeof schemaRenderItem;
22093
+ const childrenTypeOf = typeof children;
22094
+ if (data.length > 0 && !hasRenderProp) {
22095
+ const firstRow = data[0];
22096
+ const sampleKeys = firstRow ? Object.keys(firstRow).slice(0, 6) : [];
22097
+ const renderItemRaw = schemaRenderItem;
22098
+ const isFnLambda = Array.isArray(renderItemRaw) && renderItemRaw.length >= 3 && (renderItemRaw[0] === "fn" || renderItemRaw[0] === "lambda");
22099
+ dataGridLog.warn("renderItem-unresolved", {
22100
+ rowCount: data.length,
22101
+ fieldsCount: fields?.length ?? 0,
22102
+ renderItemTypeOf,
22103
+ renderItemIsArray: Array.isArray(renderItemRaw),
22104
+ renderItemIsFnLambda: isFnLambda,
22105
+ renderItemHead: Array.isArray(renderItemRaw) ? String(renderItemRaw[0]) : void 0,
22106
+ childrenTypeOf,
22107
+ sampleRowKeys: sampleKeys
22108
+ });
22109
+ }
22110
+ }, [data, hasRenderProp, schemaRenderItem, children, fields]);
22090
22111
  const allIds = data.map((item, i) => item.id || String(i));
22091
22112
  const allSelected = allIds.length > 0 && allIds.every((id) => selectedIds.has(id));
22092
22113
  const someSelected = selectedIds.size > 0;
@@ -22288,11 +22309,12 @@ function DataGrid({
22288
22309
  )
22289
22310
  ] });
22290
22311
  }
22291
- var BADGE_VARIANTS, gapStyles6;
22312
+ var dataGridLog, BADGE_VARIANTS, gapStyles6;
22292
22313
  var init_DataGrid = __esm({
22293
22314
  "components/molecules/DataGrid.tsx"() {
22294
22315
  "use client";
22295
22316
  init_cn();
22317
+ init_logger();
22296
22318
  init_getNestedValue();
22297
22319
  init_useEventBus();
22298
22320
  init_useTranslate();
@@ -22303,6 +22325,7 @@ var init_DataGrid = __esm({
22303
22325
  init_Button();
22304
22326
  init_Icon();
22305
22327
  init_InfiniteScrollSentinel();
22328
+ dataGridLog = createLogger("almadar:ui:data-grid");
22306
22329
  BADGE_VARIANTS = /* @__PURE__ */ new Set([
22307
22330
  "default",
22308
22331
  "primary",
@@ -22394,7 +22417,8 @@ function DataList({
22394
22417
  loadMoreEvent,
22395
22418
  hasMore,
22396
22419
  children,
22397
- pageSize = 5
22420
+ pageSize = 5,
22421
+ renderItem: schemaRenderItem
22398
22422
  }) {
22399
22423
  const eventBus = useEventBus();
22400
22424
  const { t } = useTranslate();
@@ -22485,6 +22509,26 @@ function DataList({
22485
22509
  ] }, gi)) });
22486
22510
  }
22487
22511
  const hasRenderProp = typeof children === "function";
22512
+ React128__namespace.default.useEffect(() => {
22513
+ const renderItemTypeOf = typeof schemaRenderItem;
22514
+ const childrenTypeOf = typeof children;
22515
+ if (data.length > 0 && !hasRenderProp) {
22516
+ const firstRow = data[0];
22517
+ const sampleKeys = firstRow ? Object.keys(firstRow).slice(0, 6) : [];
22518
+ const renderItemRaw = schemaRenderItem;
22519
+ const isFnLambda = Array.isArray(renderItemRaw) && renderItemRaw.length >= 3 && (renderItemRaw[0] === "fn" || renderItemRaw[0] === "lambda");
22520
+ dataListLog.warn("renderItem-unresolved", {
22521
+ rowCount: data.length,
22522
+ fieldsCount: fields?.length ?? 0,
22523
+ renderItemTypeOf,
22524
+ renderItemIsArray: Array.isArray(renderItemRaw),
22525
+ renderItemIsFnLambda: isFnLambda,
22526
+ renderItemHead: Array.isArray(renderItemRaw) ? String(renderItemRaw[0]) : void 0,
22527
+ childrenTypeOf,
22528
+ sampleRowKeys: sampleKeys
22529
+ });
22530
+ }
22531
+ }, [data, hasRenderProp, schemaRenderItem, children, fields]);
22488
22532
  const items = data.map((item) => item);
22489
22533
  const groups = groupBy ? groupData(items, groupBy) : [{ label: "", items }];
22490
22534
  const renderItem = (itemData, index, isLast) => {
@@ -22663,10 +22707,12 @@ function DataList({
22663
22707
  }
22664
22708
  );
22665
22709
  }
22710
+ var dataListLog;
22666
22711
  var init_DataList = __esm({
22667
22712
  "components/molecules/DataList.tsx"() {
22668
22713
  "use client";
22669
22714
  init_cn();
22715
+ init_logger();
22670
22716
  init_getNestedValue();
22671
22717
  init_useEventBus();
22672
22718
  init_useTranslate();
@@ -22679,6 +22725,7 @@ var init_DataList = __esm({
22679
22725
  init_ProgressBar();
22680
22726
  init_Divider();
22681
22727
  init_InfiniteScrollSentinel();
22728
+ dataListLog = createLogger("almadar:ui:data-list");
22682
22729
  DataList.displayName = "DataList";
22683
22730
  }
22684
22731
  });
@@ -52544,16 +52591,40 @@ function normalizeChild(child) {
52544
52591
  props: { ...rest, ...normalizedChildren !== void 0 ? { children: normalizedChildren } : {} }
52545
52592
  };
52546
52593
  }
52547
- function SlotBridge() {
52594
+ function SlotBridge({ embeddedTraits }) {
52548
52595
  const slots = useSlots();
52549
- const { render, clear } = useUISlots();
52596
+ const { render, clear, updateTraitContent } = useUISlots();
52550
52597
  React128.useEffect(() => {
52551
52598
  slotLog.debug("SlotBridge:effect-fired", {
52552
52599
  slotCount: Object.keys(slots).length,
52553
52600
  slots: Object.keys(slots)
52554
52601
  });
52555
52602
  for (const [slotName, slotState] of Object.entries(slots)) {
52556
- const entries = slotEntriesInOrder(slotState);
52603
+ const allEntries = slotEntriesInOrder(slotState);
52604
+ const entries = [];
52605
+ for (const e of allEntries) {
52606
+ const traitName = e.entry.source?.trait;
52607
+ if (traitName && embeddedTraits?.has(traitName)) {
52608
+ const last = e.entry.patterns[e.entry.patterns.length - 1];
52609
+ if (last?.pattern && typeof last.pattern === "object") {
52610
+ const record = last.pattern;
52611
+ const { type: patternType, children: nested, ...inlineProps } = record;
52612
+ const normalizedNested = Array.isArray(nested) ? nested.map((c) => normalizeChild(c)) : nested;
52613
+ updateTraitContent(traitName, {
52614
+ pattern: patternType,
52615
+ props: {
52616
+ ...inlineProps,
52617
+ ...last.props,
52618
+ ...normalizedNested !== void 0 ? { children: normalizedNested } : {}
52619
+ },
52620
+ priority: 0,
52621
+ animation: "fade"
52622
+ });
52623
+ }
52624
+ continue;
52625
+ }
52626
+ entries.push(e);
52627
+ }
52557
52628
  if (entries.length === 0) {
52558
52629
  clear(slotName);
52559
52630
  continue;
@@ -52602,7 +52673,7 @@ function SlotBridge() {
52602
52673
  });
52603
52674
  }
52604
52675
  }
52605
- }, [slots, render, clear]);
52676
+ }, [slots, render, clear, updateTraitContent, embeddedTraits]);
52606
52677
  return null;
52607
52678
  }
52608
52679
  function applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits) {
@@ -52837,7 +52908,7 @@ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavi
52837
52908
  persistence
52838
52909
  }
52839
52910
  ),
52840
- /* @__PURE__ */ jsxRuntime.jsx(SlotBridge, {}),
52911
+ /* @__PURE__ */ jsxRuntime.jsx(SlotBridge, { embeddedTraits }),
52841
52912
  /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "h-full p-4", children: /* @__PURE__ */ jsxRuntime.jsx(UISlotRenderer, { includeHud: true, hudMode: "inline", includeFloating: true }) })
52842
52913
  ]
52843
52914
  }
package/dist/avl/index.js CHANGED
@@ -11209,13 +11209,13 @@ var init_MapView = __esm({
11209
11209
  shadowSize: [41, 41]
11210
11210
  });
11211
11211
  L.Marker.prototype.options.icon = defaultIcon;
11212
- const { useEffect: useEffect87, useRef: useRef87, useCallback: useCallback125, useState: useState124 } = React128__default;
11212
+ const { useEffect: useEffect88, useRef: useRef87, useCallback: useCallback125, useState: useState124 } = React128__default;
11213
11213
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
11214
11214
  const { useEventBus: useEventBus3 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
11215
11215
  function MapUpdater({ centerLat, centerLng, zoom }) {
11216
11216
  const map = useMap();
11217
11217
  const prevRef = useRef87({ centerLat, centerLng, zoom });
11218
- useEffect87(() => {
11218
+ useEffect88(() => {
11219
11219
  const prev = prevRef.current;
11220
11220
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
11221
11221
  map.setView([centerLat, centerLng], zoom);
@@ -11226,7 +11226,7 @@ var init_MapView = __esm({
11226
11226
  }
11227
11227
  function MapClickHandler({ onMapClick }) {
11228
11228
  const map = useMap();
11229
- useEffect87(() => {
11229
+ useEffect88(() => {
11230
11230
  if (!onMapClick) return;
11231
11231
  const handler = (e) => {
11232
11232
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -21976,7 +21976,8 @@ function DataGrid({
21976
21976
  loadMoreEvent,
21977
21977
  hasMore,
21978
21978
  children,
21979
- pageSize = 0
21979
+ pageSize = 0,
21980
+ renderItem: schemaRenderItem
21980
21981
  }) {
21981
21982
  const eventBus = useEventBus();
21982
21983
  const { t } = useTranslate();
@@ -22041,6 +22042,26 @@ function DataGrid({
22041
22042
  return /* @__PURE__ */ jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
22042
22043
  }
22043
22044
  const hasRenderProp = typeof children === "function";
22045
+ useEffect(() => {
22046
+ const renderItemTypeOf = typeof schemaRenderItem;
22047
+ const childrenTypeOf = typeof children;
22048
+ if (data.length > 0 && !hasRenderProp) {
22049
+ const firstRow = data[0];
22050
+ const sampleKeys = firstRow ? Object.keys(firstRow).slice(0, 6) : [];
22051
+ const renderItemRaw = schemaRenderItem;
22052
+ const isFnLambda = Array.isArray(renderItemRaw) && renderItemRaw.length >= 3 && (renderItemRaw[0] === "fn" || renderItemRaw[0] === "lambda");
22053
+ dataGridLog.warn("renderItem-unresolved", {
22054
+ rowCount: data.length,
22055
+ fieldsCount: fields?.length ?? 0,
22056
+ renderItemTypeOf,
22057
+ renderItemIsArray: Array.isArray(renderItemRaw),
22058
+ renderItemIsFnLambda: isFnLambda,
22059
+ renderItemHead: Array.isArray(renderItemRaw) ? String(renderItemRaw[0]) : void 0,
22060
+ childrenTypeOf,
22061
+ sampleRowKeys: sampleKeys
22062
+ });
22063
+ }
22064
+ }, [data, hasRenderProp, schemaRenderItem, children, fields]);
22044
22065
  const allIds = data.map((item, i) => item.id || String(i));
22045
22066
  const allSelected = allIds.length > 0 && allIds.every((id) => selectedIds.has(id));
22046
22067
  const someSelected = selectedIds.size > 0;
@@ -22242,11 +22263,12 @@ function DataGrid({
22242
22263
  )
22243
22264
  ] });
22244
22265
  }
22245
- var BADGE_VARIANTS, gapStyles6;
22266
+ var dataGridLog, BADGE_VARIANTS, gapStyles6;
22246
22267
  var init_DataGrid = __esm({
22247
22268
  "components/molecules/DataGrid.tsx"() {
22248
22269
  "use client";
22249
22270
  init_cn();
22271
+ init_logger();
22250
22272
  init_getNestedValue();
22251
22273
  init_useEventBus();
22252
22274
  init_useTranslate();
@@ -22257,6 +22279,7 @@ var init_DataGrid = __esm({
22257
22279
  init_Button();
22258
22280
  init_Icon();
22259
22281
  init_InfiniteScrollSentinel();
22282
+ dataGridLog = createLogger("almadar:ui:data-grid");
22260
22283
  BADGE_VARIANTS = /* @__PURE__ */ new Set([
22261
22284
  "default",
22262
22285
  "primary",
@@ -22348,7 +22371,8 @@ function DataList({
22348
22371
  loadMoreEvent,
22349
22372
  hasMore,
22350
22373
  children,
22351
- pageSize = 5
22374
+ pageSize = 5,
22375
+ renderItem: schemaRenderItem
22352
22376
  }) {
22353
22377
  const eventBus = useEventBus();
22354
22378
  const { t } = useTranslate();
@@ -22439,6 +22463,26 @@ function DataList({
22439
22463
  ] }, gi)) });
22440
22464
  }
22441
22465
  const hasRenderProp = typeof children === "function";
22466
+ React128__default.useEffect(() => {
22467
+ const renderItemTypeOf = typeof schemaRenderItem;
22468
+ const childrenTypeOf = typeof children;
22469
+ if (data.length > 0 && !hasRenderProp) {
22470
+ const firstRow = data[0];
22471
+ const sampleKeys = firstRow ? Object.keys(firstRow).slice(0, 6) : [];
22472
+ const renderItemRaw = schemaRenderItem;
22473
+ const isFnLambda = Array.isArray(renderItemRaw) && renderItemRaw.length >= 3 && (renderItemRaw[0] === "fn" || renderItemRaw[0] === "lambda");
22474
+ dataListLog.warn("renderItem-unresolved", {
22475
+ rowCount: data.length,
22476
+ fieldsCount: fields?.length ?? 0,
22477
+ renderItemTypeOf,
22478
+ renderItemIsArray: Array.isArray(renderItemRaw),
22479
+ renderItemIsFnLambda: isFnLambda,
22480
+ renderItemHead: Array.isArray(renderItemRaw) ? String(renderItemRaw[0]) : void 0,
22481
+ childrenTypeOf,
22482
+ sampleRowKeys: sampleKeys
22483
+ });
22484
+ }
22485
+ }, [data, hasRenderProp, schemaRenderItem, children, fields]);
22442
22486
  const items = data.map((item) => item);
22443
22487
  const groups = groupBy ? groupData(items, groupBy) : [{ label: "", items }];
22444
22488
  const renderItem = (itemData, index, isLast) => {
@@ -22617,10 +22661,12 @@ function DataList({
22617
22661
  }
22618
22662
  );
22619
22663
  }
22664
+ var dataListLog;
22620
22665
  var init_DataList = __esm({
22621
22666
  "components/molecules/DataList.tsx"() {
22622
22667
  "use client";
22623
22668
  init_cn();
22669
+ init_logger();
22624
22670
  init_getNestedValue();
22625
22671
  init_useEventBus();
22626
22672
  init_useTranslate();
@@ -22633,6 +22679,7 @@ var init_DataList = __esm({
22633
22679
  init_ProgressBar();
22634
22680
  init_Divider();
22635
22681
  init_InfiniteScrollSentinel();
22682
+ dataListLog = createLogger("almadar:ui:data-list");
22636
22683
  DataList.displayName = "DataList";
22637
22684
  }
22638
22685
  });
@@ -52498,16 +52545,40 @@ function normalizeChild(child) {
52498
52545
  props: { ...rest, ...normalizedChildren !== void 0 ? { children: normalizedChildren } : {} }
52499
52546
  };
52500
52547
  }
52501
- function SlotBridge() {
52548
+ function SlotBridge({ embeddedTraits }) {
52502
52549
  const slots = useSlots();
52503
- const { render, clear } = useUISlots();
52550
+ const { render, clear, updateTraitContent } = useUISlots();
52504
52551
  useEffect(() => {
52505
52552
  slotLog.debug("SlotBridge:effect-fired", {
52506
52553
  slotCount: Object.keys(slots).length,
52507
52554
  slots: Object.keys(slots)
52508
52555
  });
52509
52556
  for (const [slotName, slotState] of Object.entries(slots)) {
52510
- const entries = slotEntriesInOrder(slotState);
52557
+ const allEntries = slotEntriesInOrder(slotState);
52558
+ const entries = [];
52559
+ for (const e of allEntries) {
52560
+ const traitName = e.entry.source?.trait;
52561
+ if (traitName && embeddedTraits?.has(traitName)) {
52562
+ const last = e.entry.patterns[e.entry.patterns.length - 1];
52563
+ if (last?.pattern && typeof last.pattern === "object") {
52564
+ const record = last.pattern;
52565
+ const { type: patternType, children: nested, ...inlineProps } = record;
52566
+ const normalizedNested = Array.isArray(nested) ? nested.map((c) => normalizeChild(c)) : nested;
52567
+ updateTraitContent(traitName, {
52568
+ pattern: patternType,
52569
+ props: {
52570
+ ...inlineProps,
52571
+ ...last.props,
52572
+ ...normalizedNested !== void 0 ? { children: normalizedNested } : {}
52573
+ },
52574
+ priority: 0,
52575
+ animation: "fade"
52576
+ });
52577
+ }
52578
+ continue;
52579
+ }
52580
+ entries.push(e);
52581
+ }
52511
52582
  if (entries.length === 0) {
52512
52583
  clear(slotName);
52513
52584
  continue;
@@ -52556,7 +52627,7 @@ function SlotBridge() {
52556
52627
  });
52557
52628
  }
52558
52629
  }
52559
- }, [slots, render, clear]);
52630
+ }, [slots, render, clear, updateTraitContent, embeddedTraits]);
52560
52631
  return null;
52561
52632
  }
52562
52633
  function applyServerEffects(effects, uiSlots, onNavigate, embeddedTraits) {
@@ -52791,7 +52862,7 @@ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavi
52791
52862
  persistence
52792
52863
  }
52793
52864
  ),
52794
- /* @__PURE__ */ jsx(SlotBridge, {}),
52865
+ /* @__PURE__ */ jsx(SlotBridge, { embeddedTraits }),
52795
52866
  /* @__PURE__ */ jsx(Box, { className: "h-full p-4", children: /* @__PURE__ */ jsx(UISlotRenderer, { includeHud: true, hudMode: "inline", includeFloating: true }) })
52796
52867
  ]
52797
52868
  }
@@ -6342,13 +6342,13 @@ var init_MapView = __esm({
6342
6342
  shadowSize: [41, 41]
6343
6343
  });
6344
6344
  L.Marker.prototype.options.icon = defaultIcon;
6345
- const { useEffect: useEffect66, useRef: useRef65, useCallback: useCallback115, useState: useState99 } = React111__namespace.default;
6345
+ const { useEffect: useEffect67, useRef: useRef65, useCallback: useCallback115, useState: useState99 } = React111__namespace.default;
6346
6346
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
6347
6347
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
6348
6348
  function MapUpdater({ centerLat, centerLng, zoom }) {
6349
6349
  const map = useMap();
6350
6350
  const prevRef = useRef65({ centerLat, centerLng, zoom });
6351
- useEffect66(() => {
6351
+ useEffect67(() => {
6352
6352
  const prev = prevRef.current;
6353
6353
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
6354
6354
  map.setView([centerLat, centerLng], zoom);
@@ -6359,7 +6359,7 @@ var init_MapView = __esm({
6359
6359
  }
6360
6360
  function MapClickHandler({ onMapClick }) {
6361
6361
  const map = useMap();
6362
- useEffect66(() => {
6362
+ useEffect67(() => {
6363
6363
  if (!onMapClick) return;
6364
6364
  const handler = (e) => {
6365
6365
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -17380,7 +17380,8 @@ function DataGrid({
17380
17380
  loadMoreEvent,
17381
17381
  hasMore,
17382
17382
  children,
17383
- pageSize = 0
17383
+ pageSize = 0,
17384
+ renderItem: schemaRenderItem
17384
17385
  }) {
17385
17386
  const eventBus = useEventBus();
17386
17387
  const { t } = useTranslate();
@@ -17445,6 +17446,26 @@ function DataGrid({
17445
17446
  return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "text-center py-12", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
17446
17447
  }
17447
17448
  const hasRenderProp = typeof children === "function";
17449
+ React111.useEffect(() => {
17450
+ const renderItemTypeOf = typeof schemaRenderItem;
17451
+ const childrenTypeOf = typeof children;
17452
+ if (data.length > 0 && !hasRenderProp) {
17453
+ const firstRow = data[0];
17454
+ const sampleKeys = firstRow ? Object.keys(firstRow).slice(0, 6) : [];
17455
+ const renderItemRaw = schemaRenderItem;
17456
+ const isFnLambda = Array.isArray(renderItemRaw) && renderItemRaw.length >= 3 && (renderItemRaw[0] === "fn" || renderItemRaw[0] === "lambda");
17457
+ dataGridLog.warn("renderItem-unresolved", {
17458
+ rowCount: data.length,
17459
+ fieldsCount: fields?.length ?? 0,
17460
+ renderItemTypeOf,
17461
+ renderItemIsArray: Array.isArray(renderItemRaw),
17462
+ renderItemIsFnLambda: isFnLambda,
17463
+ renderItemHead: Array.isArray(renderItemRaw) ? String(renderItemRaw[0]) : void 0,
17464
+ childrenTypeOf,
17465
+ sampleRowKeys: sampleKeys
17466
+ });
17467
+ }
17468
+ }, [data, hasRenderProp, schemaRenderItem, children, fields]);
17448
17469
  const allIds = data.map((item, i) => item.id || String(i));
17449
17470
  const allSelected = allIds.length > 0 && allIds.every((id) => selectedIds.has(id));
17450
17471
  const someSelected = selectedIds.size > 0;
@@ -17646,11 +17667,12 @@ function DataGrid({
17646
17667
  )
17647
17668
  ] });
17648
17669
  }
17649
- var BADGE_VARIANTS, gapStyles6;
17670
+ var dataGridLog, BADGE_VARIANTS, gapStyles6;
17650
17671
  var init_DataGrid = __esm({
17651
17672
  "components/molecules/DataGrid.tsx"() {
17652
17673
  "use client";
17653
17674
  init_cn();
17675
+ init_logger();
17654
17676
  init_getNestedValue();
17655
17677
  init_useEventBus();
17656
17678
  init_useTranslate();
@@ -17661,6 +17683,7 @@ var init_DataGrid = __esm({
17661
17683
  init_Button();
17662
17684
  init_Icon();
17663
17685
  init_InfiniteScrollSentinel();
17686
+ dataGridLog = createLogger("almadar:ui:data-grid");
17664
17687
  BADGE_VARIANTS = /* @__PURE__ */ new Set([
17665
17688
  "default",
17666
17689
  "primary",
@@ -17752,7 +17775,8 @@ function DataList({
17752
17775
  loadMoreEvent,
17753
17776
  hasMore,
17754
17777
  children,
17755
- pageSize = 5
17778
+ pageSize = 5,
17779
+ renderItem: schemaRenderItem
17756
17780
  }) {
17757
17781
  const eventBus = useEventBus();
17758
17782
  const { t } = useTranslate();
@@ -17843,6 +17867,26 @@ function DataList({
17843
17867
  ] }, gi)) });
17844
17868
  }
17845
17869
  const hasRenderProp = typeof children === "function";
17870
+ React111__namespace.default.useEffect(() => {
17871
+ const renderItemTypeOf = typeof schemaRenderItem;
17872
+ const childrenTypeOf = typeof children;
17873
+ if (data.length > 0 && !hasRenderProp) {
17874
+ const firstRow = data[0];
17875
+ const sampleKeys = firstRow ? Object.keys(firstRow).slice(0, 6) : [];
17876
+ const renderItemRaw = schemaRenderItem;
17877
+ const isFnLambda = Array.isArray(renderItemRaw) && renderItemRaw.length >= 3 && (renderItemRaw[0] === "fn" || renderItemRaw[0] === "lambda");
17878
+ dataListLog.warn("renderItem-unresolved", {
17879
+ rowCount: data.length,
17880
+ fieldsCount: fields?.length ?? 0,
17881
+ renderItemTypeOf,
17882
+ renderItemIsArray: Array.isArray(renderItemRaw),
17883
+ renderItemIsFnLambda: isFnLambda,
17884
+ renderItemHead: Array.isArray(renderItemRaw) ? String(renderItemRaw[0]) : void 0,
17885
+ childrenTypeOf,
17886
+ sampleRowKeys: sampleKeys
17887
+ });
17888
+ }
17889
+ }, [data, hasRenderProp, schemaRenderItem, children, fields]);
17846
17890
  const items = data.map((item) => item);
17847
17891
  const groups = groupBy ? groupData(items, groupBy) : [{ label: "", items }];
17848
17892
  const renderItem = (itemData, index, isLast) => {
@@ -18021,10 +18065,12 @@ function DataList({
18021
18065
  }
18022
18066
  );
18023
18067
  }
18068
+ var dataListLog;
18024
18069
  var init_DataList = __esm({
18025
18070
  "components/molecules/DataList.tsx"() {
18026
18071
  "use client";
18027
18072
  init_cn();
18073
+ init_logger();
18028
18074
  init_getNestedValue();
18029
18075
  init_useEventBus();
18030
18076
  init_useTranslate();
@@ -18037,6 +18083,7 @@ var init_DataList = __esm({
18037
18083
  init_ProgressBar();
18038
18084
  init_Divider();
18039
18085
  init_InfiniteScrollSentinel();
18086
+ dataListLog = createLogger("almadar:ui:data-list");
18040
18087
  DataList.displayName = "DataList";
18041
18088
  }
18042
18089
  });
@@ -6297,13 +6297,13 @@ var init_MapView = __esm({
6297
6297
  shadowSize: [41, 41]
6298
6298
  });
6299
6299
  L.Marker.prototype.options.icon = defaultIcon;
6300
- const { useEffect: useEffect66, useRef: useRef65, useCallback: useCallback115, useState: useState99 } = React111__default;
6300
+ const { useEffect: useEffect67, useRef: useRef65, useCallback: useCallback115, useState: useState99 } = React111__default;
6301
6301
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
6302
6302
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
6303
6303
  function MapUpdater({ centerLat, centerLng, zoom }) {
6304
6304
  const map = useMap();
6305
6305
  const prevRef = useRef65({ centerLat, centerLng, zoom });
6306
- useEffect66(() => {
6306
+ useEffect67(() => {
6307
6307
  const prev = prevRef.current;
6308
6308
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
6309
6309
  map.setView([centerLat, centerLng], zoom);
@@ -6314,7 +6314,7 @@ var init_MapView = __esm({
6314
6314
  }
6315
6315
  function MapClickHandler({ onMapClick }) {
6316
6316
  const map = useMap();
6317
- useEffect66(() => {
6317
+ useEffect67(() => {
6318
6318
  if (!onMapClick) return;
6319
6319
  const handler = (e) => {
6320
6320
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -17335,7 +17335,8 @@ function DataGrid({
17335
17335
  loadMoreEvent,
17336
17336
  hasMore,
17337
17337
  children,
17338
- pageSize = 0
17338
+ pageSize = 0,
17339
+ renderItem: schemaRenderItem
17339
17340
  }) {
17340
17341
  const eventBus = useEventBus();
17341
17342
  const { t } = useTranslate();
@@ -17400,6 +17401,26 @@ function DataGrid({
17400
17401
  return /* @__PURE__ */ jsx(Box, { className: "text-center py-12", children: /* @__PURE__ */ jsx(Typography, { variant: "body", color: "secondary", children: t("empty.noItems") || "No items found" }) });
17401
17402
  }
17402
17403
  const hasRenderProp = typeof children === "function";
17404
+ useEffect(() => {
17405
+ const renderItemTypeOf = typeof schemaRenderItem;
17406
+ const childrenTypeOf = typeof children;
17407
+ if (data.length > 0 && !hasRenderProp) {
17408
+ const firstRow = data[0];
17409
+ const sampleKeys = firstRow ? Object.keys(firstRow).slice(0, 6) : [];
17410
+ const renderItemRaw = schemaRenderItem;
17411
+ const isFnLambda = Array.isArray(renderItemRaw) && renderItemRaw.length >= 3 && (renderItemRaw[0] === "fn" || renderItemRaw[0] === "lambda");
17412
+ dataGridLog.warn("renderItem-unresolved", {
17413
+ rowCount: data.length,
17414
+ fieldsCount: fields?.length ?? 0,
17415
+ renderItemTypeOf,
17416
+ renderItemIsArray: Array.isArray(renderItemRaw),
17417
+ renderItemIsFnLambda: isFnLambda,
17418
+ renderItemHead: Array.isArray(renderItemRaw) ? String(renderItemRaw[0]) : void 0,
17419
+ childrenTypeOf,
17420
+ sampleRowKeys: sampleKeys
17421
+ });
17422
+ }
17423
+ }, [data, hasRenderProp, schemaRenderItem, children, fields]);
17403
17424
  const allIds = data.map((item, i) => item.id || String(i));
17404
17425
  const allSelected = allIds.length > 0 && allIds.every((id) => selectedIds.has(id));
17405
17426
  const someSelected = selectedIds.size > 0;
@@ -17601,11 +17622,12 @@ function DataGrid({
17601
17622
  )
17602
17623
  ] });
17603
17624
  }
17604
- var BADGE_VARIANTS, gapStyles6;
17625
+ var dataGridLog, BADGE_VARIANTS, gapStyles6;
17605
17626
  var init_DataGrid = __esm({
17606
17627
  "components/molecules/DataGrid.tsx"() {
17607
17628
  "use client";
17608
17629
  init_cn();
17630
+ init_logger();
17609
17631
  init_getNestedValue();
17610
17632
  init_useEventBus();
17611
17633
  init_useTranslate();
@@ -17616,6 +17638,7 @@ var init_DataGrid = __esm({
17616
17638
  init_Button();
17617
17639
  init_Icon();
17618
17640
  init_InfiniteScrollSentinel();
17641
+ dataGridLog = createLogger("almadar:ui:data-grid");
17619
17642
  BADGE_VARIANTS = /* @__PURE__ */ new Set([
17620
17643
  "default",
17621
17644
  "primary",
@@ -17707,7 +17730,8 @@ function DataList({
17707
17730
  loadMoreEvent,
17708
17731
  hasMore,
17709
17732
  children,
17710
- pageSize = 5
17733
+ pageSize = 5,
17734
+ renderItem: schemaRenderItem
17711
17735
  }) {
17712
17736
  const eventBus = useEventBus();
17713
17737
  const { t } = useTranslate();
@@ -17798,6 +17822,26 @@ function DataList({
17798
17822
  ] }, gi)) });
17799
17823
  }
17800
17824
  const hasRenderProp = typeof children === "function";
17825
+ React111__default.useEffect(() => {
17826
+ const renderItemTypeOf = typeof schemaRenderItem;
17827
+ const childrenTypeOf = typeof children;
17828
+ if (data.length > 0 && !hasRenderProp) {
17829
+ const firstRow = data[0];
17830
+ const sampleKeys = firstRow ? Object.keys(firstRow).slice(0, 6) : [];
17831
+ const renderItemRaw = schemaRenderItem;
17832
+ const isFnLambda = Array.isArray(renderItemRaw) && renderItemRaw.length >= 3 && (renderItemRaw[0] === "fn" || renderItemRaw[0] === "lambda");
17833
+ dataListLog.warn("renderItem-unresolved", {
17834
+ rowCount: data.length,
17835
+ fieldsCount: fields?.length ?? 0,
17836
+ renderItemTypeOf,
17837
+ renderItemIsArray: Array.isArray(renderItemRaw),
17838
+ renderItemIsFnLambda: isFnLambda,
17839
+ renderItemHead: Array.isArray(renderItemRaw) ? String(renderItemRaw[0]) : void 0,
17840
+ childrenTypeOf,
17841
+ sampleRowKeys: sampleKeys
17842
+ });
17843
+ }
17844
+ }, [data, hasRenderProp, schemaRenderItem, children, fields]);
17801
17845
  const items = data.map((item) => item);
17802
17846
  const groups = groupBy ? groupData(items, groupBy) : [{ label: "", items }];
17803
17847
  const renderItem = (itemData, index, isLast) => {
@@ -17976,10 +18020,12 @@ function DataList({
17976
18020
  }
17977
18021
  );
17978
18022
  }
18023
+ var dataListLog;
17979
18024
  var init_DataList = __esm({
17980
18025
  "components/molecules/DataList.tsx"() {
17981
18026
  "use client";
17982
18027
  init_cn();
18028
+ init_logger();
17983
18029
  init_getNestedValue();
17984
18030
  init_useEventBus();
17985
18031
  init_useTranslate();
@@ -17992,6 +18038,7 @@ var init_DataList = __esm({
17992
18038
  init_ProgressBar();
17993
18039
  init_Divider();
17994
18040
  init_InfiniteScrollSentinel();
18041
+ dataListLog = createLogger("almadar:ui:data-list");
17995
18042
  DataList.displayName = "DataList";
17996
18043
  }
17997
18044
  });