@almadar/std 16.148.0 → 16.150.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 (45) hide show
  1. package/behaviors/lolo/ui/core/atoms/std-app-search.lolo +3 -3
  2. package/behaviors/lolo/ui/core/atoms/std-billable-hour.lolo +86 -41
  3. package/behaviors/lolo/ui/core/atoms/std-board.lolo +29 -16
  4. package/behaviors/lolo/ui/core/atoms/std-browse.lolo +190 -86
  5. package/behaviors/lolo/ui/core/atoms/std-dashboard-grid-embedded.lolo +8 -0
  6. package/behaviors/lolo/ui/core/atoms/std-file-store.lolo +1 -1
  7. package/behaviors/lolo/ui/core/atoms/std-stats.lolo +14 -10
  8. package/behaviors/lolo/ui/core/atoms/std-version-history.lolo +1 -29
  9. package/behaviors/lolo/ui/core/organisms/ui-entity-table.lolo +1 -0
  10. package/behaviors/registry/factory-signatures.json +9 -13
  11. package/behaviors/registry/ui/core/atoms/std-app-search.orb +39 -4
  12. package/behaviors/registry/ui/core/atoms/std-billable-hour.orb +242 -50
  13. package/behaviors/registry/ui/core/atoms/std-board.orb +86 -20
  14. package/behaviors/registry/ui/core/atoms/std-browse.orb +423 -125
  15. package/behaviors/registry/ui/core/atoms/std-dashboard-grid-embedded.orb +41 -29
  16. package/behaviors/registry/ui/core/atoms/std-file-store.orb +0 -3
  17. package/behaviors/registry/ui/core/atoms/std-stats.orb +267 -238
  18. package/behaviors/registry/ui/core/atoms/std-version-history.orb +1 -38
  19. package/behaviors/registry/ui/core/organisms/ui-entity-table.orb +5 -0
  20. package/dist/behaviors/behaviors-embeddings.json +200 -200
  21. package/dist/behaviors/behaviors-registry.json +34 -18
  22. package/dist/behaviors/exports-reader.js +33 -3
  23. package/dist/behaviors/functions/index.d.ts +41 -54
  24. package/dist/behaviors/functions/index.js +31 -3
  25. package/dist/behaviors/index.d.ts +1 -1
  26. package/dist/behaviors/index.js +34 -4
  27. package/dist/behaviors/knob-embeddings.json +1 -1
  28. package/dist/behaviors/query.js +33 -3
  29. package/dist/behaviors/registry/factory-signatures.json +9 -13
  30. package/dist/behaviors/registry/ui/core/atoms/std-app-search.orb +39 -4
  31. package/dist/behaviors/registry/ui/core/atoms/std-billable-hour.orb +242 -50
  32. package/dist/behaviors/registry/ui/core/atoms/std-board.orb +86 -20
  33. package/dist/behaviors/registry/ui/core/atoms/std-browse.orb +423 -125
  34. package/dist/behaviors/registry/ui/core/atoms/std-dashboard-grid-embedded.orb +41 -29
  35. package/dist/behaviors/registry/ui/core/atoms/std-file-store.orb +0 -3
  36. package/dist/behaviors/registry/ui/core/atoms/std-stats.orb +267 -238
  37. package/dist/behaviors/registry/ui/core/atoms/std-version-history.orb +1 -38
  38. package/dist/behaviors/registry/ui/core/organisms/ui-entity-table.orb +5 -0
  39. package/dist/behaviors-embeddings.json +200 -200
  40. package/dist/behaviors-registry.json +34 -18
  41. package/dist/index.d.ts +1 -1
  42. package/dist/index.js +34 -4
  43. package/dist/knob-embeddings.json +1 -1
  44. package/dist/registry/factory-signatures.json +9 -13
  45. package/package.json +9 -2
@@ -1,7 +1,7 @@
1
1
  app std-app-search "1.0.0"
2
2
  "std-app-search — reusable global search: wraps a host content view and, on a SEARCH trigger, fetches the linked entity filtered by @config.searchField and renders the matching results, then CLEAR_SEARCH returns to the host view. Rebind to any entity; point @config.idleContent at the normal view and wire a trigger (e.g. AppLayout SEARCH) into SEARCH."
3
- type AppSearchFieldSpec = { event : string, label : string, variant : string, icon : string, href : string, payload : string, disabled : boolean, confirm : string, hidden : boolean, format : string }
4
- type AppSearchActionSpec = { label : string!, event : string!, variant : string, icon : string, href : string, payload : string, disabled : boolean, confirm : string, hidden : boolean }
3
+ type AppSearchFieldSpec = { name : string!, label : string, variant : h3 | h4 | body | caption | badge | small | progress, icon : string, format : date | currency | number | boolean | percent, event : string, href : string, payload : string, disabled : boolean, confirm : string, hidden : boolean }
4
+ type AppSearchActionSpec = { label : string!, event : string!, variant : primary | secondary | ghost | danger, icon : string, href : string, payload : string, disabled : boolean, confirm : string, hidden : boolean }
5
5
  orbital AppSearchOrbital {
6
6
  type AppSearchLoaded = Event { data : [AppSearchTarget] } "Filtered search results loaded"
7
7
  type AppSearchFailed = Event { error : string } "Search fetch failed"
@@ -113,7 +113,7 @@ orbital AppSearchOrbital {
113
113
  type: typography
114
114
  variant: caption
115
115
  color: muted
116
- content: "Matching “@entity.searchTerm”"
116
+ content: (str/concat (str/concat "Matching “" @entity.searchTerm) "”")
117
117
  }, { type: divider }, {
118
118
  type: data-grid
119
119
  entity: @payload.data
@@ -1,6 +1,10 @@
1
1
  app std-billable-hour "1.0.0"
2
2
  "std-billable-hour — generic billable-hour timesheet primitive for legal, agency, and consulting domains. Lists entries in `browsing`; opens entry detail in `viewing_single` with Invoice / Write Off actions."
3
+ type ItemAction = { label : string!, event : string, navigatesTo : string, variant : string, icon : string }
4
+ type ColumnSpec = { key : string!, field : string, header : string, width : string, align : string, className : string, weight : string, format : string, icon : string }
3
5
  orbital BillableHourOrbital {
6
+ uses TableView from "std/behaviors/ui-table-view"
7
+
4
8
  type BillableHourLoaded = Event { data : [BillableHour] } "Fired when the billable-hour collection finishes loading"
5
9
 
6
10
  type BillableHourLoadFailed = Event { error : string, code : string } "Fired when the billable-hour collection fails to load"
@@ -19,6 +23,20 @@ orbital BillableHourOrbital {
19
23
  invoiceStatus : "unbilled" | "invoiced" | "paid" | "written_off" @description "The current billing status of the hour entry." @synonyms "status, billing status, payment status" = unbilled
20
24
  }
21
25
 
26
+ trait DenseHoursTable = TableView.traits.TableViewRender -> BillableHour {
27
+ config {
28
+ columns: @config.columns
29
+ emptyMessage: "No time entries"
30
+ itemActions: @config.itemActions
31
+ look: @config.tableLook
32
+ maxInlineActions: 2
33
+ }
34
+
35
+ listens {
36
+ BillableHourTimesheet.BillableHourLoaded -> TableViewLoaded
37
+ }
38
+ }
39
+
22
40
  trait BillableHourTimesheet -> BillableHour [interaction, collection] {
23
41
  initial: loading
24
42
 
@@ -53,46 +71,11 @@ orbital BillableHourOrbital {
53
71
  gap: sm
54
72
  type: stack
55
73
  }, { type: divider }, {
56
- cols: 1
57
- entity: ?data
58
- fields: [{
59
- label: Worker
60
- name: workerName
61
- variant: caption
62
- }, {
63
- label: Matter
64
- name: matterId
65
- variant: caption
66
- }, {
67
- label: Date
68
- name: workDate
69
- variant: caption
70
- }, {
71
- label: Hours
72
- name: hours
73
- variant: caption
74
- }, {
75
- label: Rate
76
- name: rate
77
- variant: caption
78
- }, {
79
- label: Status
80
- name: invoiceStatus
81
- variant: badge
82
- }]
83
- gap: sm
84
- itemActions: [{
85
- event: OPEN_HOURS
86
- icon: arrow-right
87
- label: Open
88
- variant: primary
89
- }, {
90
- event: WRITE_OFF_HOURS
91
- label: "Write Off"
92
- variant: danger
93
- }]
94
- look: @config.tableLook
95
- type: data-grid
74
+ children: [@trait.DenseHoursTable]
75
+ className: overflow-x-auto
76
+ direction: vertical
77
+ gap: none
78
+ type: stack
96
79
  }]
97
80
  direction: vertical
98
81
  gap: md
@@ -107,6 +90,11 @@ orbital BillableHourOrbital {
107
90
  }
108
91
 
109
92
  state browsing {
93
+ INIT -> loading
94
+ (fetch BillableHour {
95
+ emit: { failure: BillableHourLoadFailed, success: BillableHourLoaded }
96
+ })
97
+ (render-ui main { rows: 4, type: skeleton })
110
98
  OPEN_HOURS -> viewing_single
111
99
  (set @entity.id ?row.id)
112
100
  (set @entity.workerId ?row.workerId)
@@ -398,10 +386,67 @@ orbital BillableHourOrbital {
398
386
  @label "Section title"
399
387
  @description "Heading shown above the time-entries list"
400
388
  @tier "presentation"
401
- tableLook : "dense" | "spacious" | "striped" | "borderless" | "card-rows" = dense
389
+ tableLook : "dense" | "spacious" | "striped" | "borderless" | "bordered" = dense
402
390
  @label "Table look"
403
391
  @description "Layer 2 visual treatment for the data table rendered by this atom."
404
392
  @tier "presentation"
393
+ columns : [ColumnSpec] = [{
394
+ align: left
395
+ field: workerName
396
+ header: Worker
397
+ key: workerName
398
+ width: "minmax(8rem, 1fr)"
399
+ }, {
400
+ align: left
401
+ field: matterId
402
+ header: Matter
403
+ key: matterId
404
+ width: "8rem"
405
+ }, {
406
+ align: left
407
+ field: workDate
408
+ format: date
409
+ header: Date
410
+ key: workDate
411
+ width: "8rem"
412
+ }, {
413
+ align: right
414
+ field: hours
415
+ format: number
416
+ header: Hours
417
+ key: hours
418
+ width: "6rem"
419
+ }, {
420
+ align: right
421
+ field: rate
422
+ format: currency
423
+ header: Rate
424
+ key: rate
425
+ width: "7rem"
426
+ }, {
427
+ align: center
428
+ field: invoiceStatus
429
+ format: badge
430
+ header: Status
431
+ key: invoiceStatus
432
+ width: "8rem"
433
+ }]
434
+ @label "Table columns"
435
+ @description "ColumnSpec list for the dense hours ledger table."
436
+ @tier "presentation"
437
+ itemActions : [ItemAction] = [{
438
+ event: OPEN_HOURS
439
+ icon: arrow-right
440
+ label: Open
441
+ variant: ghost
442
+ }, {
443
+ event: WRITE_OFF_HOURS
444
+ label: "Write Off"
445
+ variant: danger
446
+ }]
447
+ @label "Row actions"
448
+ @description "Per-row actions rendered by the hours table."
449
+ @tier "presentation"
405
450
  statLook : "elevated" | "flat" | "progress-backed" | "gauge" | "sparkline" = elevated
406
451
  @label "Stat display look"
407
452
  @description "Layer 2 visual treatment for stat / KPI cards."
@@ -28,6 +28,7 @@ orbital BoardOrbital {
28
28
  currentDescription : string @intrinsic = ""
29
29
  currentStage : string @intrinsic = ""
30
30
  currentNotes : string @intrinsic = ""
31
+ currentRow : object @intrinsic = {}
31
32
  errorMessage : string @intrinsic = ""
32
33
  }
33
34
 
@@ -97,6 +98,7 @@ orbital BoardOrbital {
97
98
  (set @entity.currentDescription ?description)
98
99
  (set @entity.currentStage ?stage)
99
100
  (set @entity.currentNotes ?row.notes)
101
+ (set @entity.currentRow ?row)
100
102
  (render-ui main {
101
103
  children: [{
102
104
  align: center
@@ -164,20 +166,7 @@ orbital BoardOrbital {
164
166
  })
165
167
  type: data-list
166
168
  variant: default
167
- }, {
168
- align: center
169
- children: [{
170
- action: DELETE_CARD
171
- actionPayload: { id: @entity.currentId }
172
- icon: trash-2
173
- label: Delete
174
- type: button
175
- variant: danger
176
- }]
177
- direction: horizontal
178
- gap: sm
179
- type: stack
180
- }]
169
+ }, @config.cardActionsContent]
181
170
  direction: vertical
182
171
  gap: md
183
172
  type: stack
@@ -341,6 +330,13 @@ orbital BoardOrbital {
341
330
  @description "Signals removal of a card from the board."
342
331
  @synonyms "remove, delete, discard"
343
332
  @tier "presentation"
333
+ EDIT_CARD -> external {
334
+ id : string!
335
+ row : object
336
+ }
337
+ @description "Signals a request to edit the currently open card. The board renders no edit form itself — consumers override cardActionsContent with an Edit button and wire this emit to their edit modal/form trait."
338
+ @synonyms "edit, modify, update, change"
339
+ @tier "domain"
344
340
  BoardItemsLoaded {
345
341
  data : [ObjectSpec]
346
342
  }
@@ -516,6 +512,23 @@ orbital BoardOrbital {
516
512
  @label "Board look"
517
513
  @description "Layer 3 body layout: default N-column data-grid ('columns'), or a Trello-style wide-column kanban with sticky column headers ('kanban-classic')."
518
514
  @tier "presentation"
515
+ cardActionsContent : render-ui = {
516
+ align: center
517
+ children: [{
518
+ action: DELETE_CARD
519
+ actionPayload: { id: @entity.currentId }
520
+ icon: trash-2
521
+ label: Delete
522
+ type: button
523
+ variant: danger
524
+ }]
525
+ direction: horizontal
526
+ gap: sm
527
+ type: stack
528
+ }
529
+ @label "Card panel actions"
530
+ @description "Actions row of the open-card panel. Default is the Delete button only. Override to add consumer-wired actions — e.g. an Edit button with action: EDIT_CARD and actionPayload: { id: @entity.currentId, row: @entity.currentRow }, listened to by the organism's edit modal. Never leave a button here without a listener."
531
+ @tier "presentation"
519
532
  bodyContent : render-ui = {
520
533
  children: [{
521
534
  align: center
@@ -702,7 +715,7 @@ orbital BoardOrbital {
702
715
  type: stack
703
716
  }]
704
717
  className: "cursor-grab hover:shadow-lg transition-shadow"
705
- look: elevated
718
+ look: @config.cardLook
706
719
  padding: sm
707
720
  type: card
708
721
  })
@@ -734,7 +747,7 @@ orbital BoardOrbital {
734
747
  type: stack
735
748
  }
736
749
  @label "Kanban classic body content tree"
737
- @description "Render-ui SExpr for boardLook='kanban-classic' — Trello-style wide elevated columns with sticky headers, dense cards with a status badge, always-elevated card look."
750
+ @description "Render-ui SExpr for boardLook='kanban-classic' — Trello-style wide elevated columns with sticky headers, dense cards with a status badge; per-item cards honor config.cardLook (the column wrapper stays elevated — it is column chrome, not a card)."
738
751
  @tier "internal"
739
752
  }
740
753
  }