@protobase/ui 0.63.3 → 0.63.5

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 (113) hide show
  1. package/dist/account/devices-section.js +1 -1
  2. package/dist/account/passkeys-section.js +1 -1
  3. package/dist/account/staff-sign-in-log.js +1 -1
  4. package/dist/activity-chart/activity-chart.js +2 -2
  5. package/dist/activity-chart/activity-tooltip.js +1 -1
  6. package/dist/app/app.js +1 -1
  7. package/dist/app/change-confirm/use-change-confirm.js +15 -18
  8. package/dist/app/charts/chart-view.js +1 -1
  9. package/dist/app/comments/comment-composer.js +1 -1
  10. package/dist/app/comments/comments-section.js +2 -2
  11. package/dist/app/create/create-record-form.js +1 -1
  12. package/dist/app/custom-section.js +1 -1
  13. package/dist/app/delete/use-delete-flow.js +1 -1
  14. package/dist/app/displays/board-column.js +1 -1
  15. package/dist/app/displays/calendar-display.js +1 -1
  16. package/dist/app/displays/cards-display.js +1 -1
  17. package/dist/app/displays/list-cards.js +1 -1
  18. package/dist/app/displays/timeline-display.js +1 -1
  19. package/dist/app/displays/use-board-move.js +1 -1
  20. package/dist/app/displays/use-calendar-move.js +1 -1
  21. package/dist/app/embedded-list/embedded-list.js +1 -1
  22. package/dist/app/field-editor.js +2 -2
  23. package/dist/app/gallery/gallery-section.js +1 -1
  24. package/dist/app/gallery/photo-details.js +1 -1
  25. package/dist/app/hand-order/hand-sorted-list.js +1 -1
  26. package/dist/app/hand-order/use-hand-order.js +1 -1
  27. package/dist/app/history/history-section.js +1 -1
  28. package/dist/app/incoming-card.js +1 -1
  29. package/dist/app/lines-plan.js +116 -0
  30. package/dist/app/list-edit/use-list-edits.js +1 -1
  31. package/dist/app/list-order.js +7 -1
  32. package/dist/app/new-version/new-version-toast.js +1 -1
  33. package/dist/app/pages/blocks/field.js +1 -1
  34. package/dist/app/pages/blocks/modal-form.js +2 -2
  35. package/dist/app/pages/blocks/settings.js +2 -2
  36. package/dist/app/pages/record-actions.js +1 -1
  37. package/dist/app/pages/use-run-action.js +1 -1
  38. package/dist/app/picker/picker-combobox.js +1 -1
  39. package/dist/app/record-chart/record-chart-section.js +2 -2
  40. package/dist/app/record-lines-cell.js +47 -0
  41. package/dist/app/record-lines.js +103 -26
  42. package/dist/app/record-messages.js +8 -2
  43. package/dist/app/record-page.js +18 -20
  44. package/dist/app/record-row/record-row-body.js +1 -1
  45. package/dist/app/record-row/record-row.js +1 -1
  46. package/dist/app/record-row/saved-record-row.js +1 -1
  47. package/dist/app/related-cards/related-card.js +1 -1
  48. package/dist/app/related-cards/related-cards.js +1 -1
  49. package/dist/app/related-section.js +1 -1
  50. package/dist/app/saved/saved-list.js +1 -1
  51. package/dist/app/searches/saved-search-rows.js +1 -1
  52. package/dist/app/searches/saved-search-section.js +1 -1
  53. package/dist/app/searches/saved-searches.js +1 -1
  54. package/dist/app/searches/search-controls.js +1 -1
  55. package/dist/app/searches/update-search-dialog.js +1 -1
  56. package/dist/app/searches/use-save-search.js +1 -1
  57. package/dist/app/sensitive-field.js +1 -1
  58. package/dist/app/use-lines-draft.js +94 -35
  59. package/dist/app/use-lines.js +21 -7
  60. package/dist/app/use-record-editor.js +15 -10
  61. package/dist/app/use-record-lines.js +47 -0
  62. package/dist/app-shell/profile-menu.js +2 -2
  63. package/dist/auth/forgot-password-form.js +1 -1
  64. package/dist/auth/sign-in-form.js +1 -1
  65. package/dist/calls/call-guests-panel.js +1 -1
  66. package/dist/calls/call-rings.js +1 -1
  67. package/dist/chat/chat-message.js +1 -1
  68. package/dist/data/use-list.d.ts +27 -1
  69. package/dist/data/use-list.js +10 -3
  70. package/dist/data-grid/cell-text.js +3 -3
  71. package/dist/data-grid/cells.js +3 -3
  72. package/dist/data-grid/grid-row.js +1 -1
  73. package/dist/forms/public-form-page.js +1 -1
  74. package/dist/index.js +3 -3
  75. package/dist/inline-child-table/columns.js +7 -2
  76. package/dist/inline-child-table/inline-child-table.js +29 -48
  77. package/dist/inline-child-table/line-row.js +16 -44
  78. package/dist/inline-child-table/messages.js +4 -18
  79. package/dist/notifications/bell/notification-item.js +1 -1
  80. package/dist/organizations/invitation-page.js +1 -1
  81. package/dist/package.js +1 -1
  82. package/dist/primitives/dialog.d.ts +7 -2
  83. package/dist/primitives/dialog.js +9 -4
  84. package/dist/record-view/field.js +1 -1
  85. package/dist/record-view/messages.js +0 -4
  86. package/dist/record-view/record-header.js +2 -2
  87. package/dist/shell/assets/app-BPv_SjnU.js +9 -0
  88. package/dist/shell/assets/{calls-CEW8hdPi.js → calls-CPiQcC70.js} +2 -2
  89. package/dist/shell/assets/index-Or2wt-ck.css +2 -0
  90. package/dist/shell/assets/{index-D7O0sMwH.js → index-_ZpZ2ro0.js} +2 -2
  91. package/dist/shell/assets/{records-map-BIDl1ull.js → records-map-DU29d6QK.js} +2 -2
  92. package/dist/shell/assets/shared-protobase-ui-Cab5nqST.js +2 -0
  93. package/dist/shell/assets/{vendor-xNCj9Gc_.js → vendor-iwLB0x-s.js} +39 -39
  94. package/dist/shell/index.html +5 -5
  95. package/dist/shell/protobase.shell.json +2 -2
  96. package/dist/shell/protobase.sw.js +2 -2
  97. package/dist/shell-source-maps/assets/app-BPv_SjnU.js.map +1 -0
  98. package/dist/shell-source-maps/assets/{calls-CEW8hdPi.js.map → calls-CPiQcC70.js.map} +1 -1
  99. package/dist/shell-source-maps/assets/{index-D7O0sMwH.js.map → index-_ZpZ2ro0.js.map} +1 -1
  100. package/dist/shell-source-maps/assets/{records-map-BIDl1ull.js.map → records-map-DU29d6QK.js.map} +1 -1
  101. package/dist/shell-source-maps/assets/{shared-protobase-ui-F5elmh4N.js.map → shared-protobase-ui-Cab5nqST.js.map} +1 -1
  102. package/dist/shell-source-maps/assets/vendor-iwLB0x-s.js.map +1 -0
  103. package/dist/status/status-dialog.js +1 -1
  104. package/package.json +4 -4
  105. package/dist/inline-child-table/number-cell.js +0 -25
  106. package/dist/inline-child-table/totals-footer.js +0 -39
  107. package/dist/mocks/invoices.js +0 -13
  108. package/dist/mocks/products.js +0 -167
  109. package/dist/shell/assets/app-Bm6h0l5D.js +0 -9
  110. package/dist/shell/assets/index-Be8nCyRW.css +0 -2
  111. package/dist/shell/assets/shared-protobase-ui-F5elmh4N.js +0 -2
  112. package/dist/shell-source-maps/assets/app-Bm6h0l5D.js.map +0 -1
  113. package/dist/shell-source-maps/assets/vendor-xNCj9Gc_.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { Button } from "../primitives/button.js";
2
2
  import { Dialog } from "../primitives/dialog.js";
3
- import { Input } from "../primitives/input.js";
4
3
  import { Segmented } from "../primitives/segmented.js";
4
+ import { Input } from "../primitives/input.js";
5
5
  import { text } from "./messages.js";
6
6
  import { clearChoices } from "./clear-time.js";
7
7
  import { draftOf, pickedStatus } from "./status-draft.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/ui",
3
- "version": "0.63.3",
3
+ "version": "0.63.5",
4
4
  "description": "The Protobase admin app and the React hooks and components for custom UI.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -39,9 +39,9 @@
39
39
  "dependencies": {
40
40
  "@dnd-kit/core": "^6.3.1",
41
41
  "@dnd-kit/sortable": "^10.0.0",
42
- "@protobase/client": "0.63.3",
43
- "@protobase/layout": "0.63.3",
44
- "@protobase/schema": "0.63.3",
42
+ "@protobase/client": "0.63.5",
43
+ "@protobase/layout": "0.63.5",
44
+ "@protobase/schema": "0.63.5",
45
45
  "@sentry/browser": "^11.7.0",
46
46
  "@tanstack/react-query": "^5.104.1",
47
47
  "@tanstack/react-table": "^9.2.6",
@@ -1,25 +0,0 @@
1
- import { cn } from "../lib/cn.js";
2
- import { useState } from "react";
3
- import { jsx } from "react/jsx-runtime";
4
- //#region src/inline-child-table/number-cell.tsx
5
- const NumberCell = ({ value, onCommit, format, parse, label, width = "w-full" }) => {
6
- const [draft, setDraft] = useState(null);
7
- const commit = () => {
8
- if (draft === null) return;
9
- const parsed = parse(draft);
10
- setDraft(null);
11
- if (Number.isFinite(parsed) && parsed >= 0) onCommit(parsed);
12
- };
13
- return /* @__PURE__ */ jsx("input", {
14
- "aria-label": label,
15
- inputMode: "decimal",
16
- value: draft ?? format(value),
17
- onFocus: (event) => event.currentTarget.select(),
18
- onChange: (event) => setDraft(event.target.value),
19
- onBlur: commit,
20
- onKeyDown: (event) => event.key === "Enter" && event.currentTarget.blur(),
21
- className: cn("h-7 rounded-md border border-transparent bg-transparent px-2 text-right tabular-nums text-foreground outline-none hover:border-border-strong focus:border-primary focus:bg-background focus:ring-2 focus:ring-primary/20", width)
22
- });
23
- };
24
- //#endregion
25
- export { NumberCell };
@@ -1,39 +0,0 @@
1
- import { invoiceTotals } from "../mocks/invoices.js";
2
- import { formatMoney } from "../format/money.js";
3
- import { text } from "./messages.js";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
- //#region src/inline-child-table/totals-footer.tsx
6
- const TotalsFooter = ({ lines, vatRate }) => {
7
- const totals = invoiceTotals(lines, vatRate);
8
- return /* @__PURE__ */ jsxs("dl", {
9
- className: "ml-auto grid w-64 grid-cols-[1fr_auto] gap-x-6 gap-y-1 px-2 pt-3 tabular-nums",
10
- children: [
11
- /* @__PURE__ */ jsx("dt", {
12
- className: "text-muted-foreground",
13
- children: text("subtotal")
14
- }),
15
- /* @__PURE__ */ jsx("dd", {
16
- className: "text-right text-foreground",
17
- children: formatMoney(totals.subtotalCents)
18
- }),
19
- /* @__PURE__ */ jsx("dt", {
20
- className: "text-muted-foreground",
21
- children: text("vat", Math.round(vatRate * 100))
22
- }),
23
- /* @__PURE__ */ jsx("dd", {
24
- className: "text-right text-foreground",
25
- children: formatMoney(totals.vatCents)
26
- }),
27
- /* @__PURE__ */ jsx("dt", {
28
- className: "mt-1 border-t border-border pt-2 font-semibold text-foreground",
29
- children: text("total")
30
- }),
31
- /* @__PURE__ */ jsx("dd", {
32
- className: "mt-1 border-t border-border pt-2 text-right text-[16px] font-semibold text-foreground",
33
- children: formatMoney(totals.totalCents)
34
- })
35
- ]
36
- });
37
- };
38
- //#endregion
39
- export { TotalsFooter };
@@ -1,13 +0,0 @@
1
- //#region src/mocks/invoices.ts
2
- const lineTotalCents = (line) => line.quantity * line.unitPriceCents;
3
- const invoiceTotals = (lines, vatRate = .21) => {
4
- const subtotalCents = lines.reduce((sum, line) => sum + lineTotalCents(line), 0);
5
- const vatCents = Math.round(subtotalCents * vatRate);
6
- return {
7
- subtotalCents,
8
- vatCents,
9
- totalCents: subtotalCents + vatCents
10
- };
11
- };
12
- //#endregion
13
- export { invoiceTotals, lineTotalCents };
@@ -1,167 +0,0 @@
1
- //#region src/mocks/products.ts
2
- const catalog = [
3
- [
4
- "M8 hex bolt A2, 100 pcs",
5
- "FST",
6
- 1890
7
- ],
8
- [
9
- "M10 hex nut A2, 100 pcs",
10
- "FST",
11
- 1240
12
- ],
13
- [
14
- "Stainless washer 8 mm, 250 pcs",
15
- "FST",
16
- 990
17
- ],
18
- [
19
- "Cable tie 300 mm, 100 pcs",
20
- "ELC",
21
- 650
22
- ],
23
- [
24
- "Cable gland M20, 25 pcs",
25
- "ELC",
26
- 2340
27
- ],
28
- [
29
- "Junction box IP65",
30
- "ELC",
31
- 1480
32
- ],
33
- [
34
- "Hydraulic hose 1/2 in, 5 m",
35
- "HYD",
36
- 8650
37
- ],
38
- [
39
- "Hydraulic coupling 3/8 in",
40
- "HYD",
41
- 1895
42
- ],
43
- [
44
- "Pallet wrap 500 mm",
45
- "PKG",
46
- 740
47
- ],
48
- [
49
- "Corrugated box 400 x 300",
50
- "PKG",
51
- 215
52
- ],
53
- [
54
- "Bubble wrap roll 50 m",
55
- "PKG",
56
- 1990
57
- ],
58
- [
59
- "Safety gloves, size L",
60
- "PPE",
61
- 395
62
- ],
63
- [
64
- "Safety glasses, clear",
65
- "PPE",
66
- 450
67
- ],
68
- [
69
- "Ear defenders SNR 31",
70
- "PPE",
71
- 1295
72
- ],
73
- [
74
- "Ball bearing 6204-2RS",
75
- "BRG",
76
- 685
77
- ],
78
- [
79
- "Taper roller bearing 30205",
80
- "BRG",
81
- 1420
82
- ],
83
- [
84
- "Timing belt HTD 5M, 600 mm",
85
- "BLT",
86
- 2780
87
- ],
88
- [
89
- "V-belt SPA 1250",
90
- "BLT",
91
- 1360
92
- ],
93
- [
94
- "Grease cartridge, 400 g",
95
- "LUB",
96
- 920
97
- ],
98
- [
99
- "Machine oil ISO 68, 5 l",
100
- "LUB",
101
- 3950
102
- ],
103
- [
104
- "Angle grinder disc 125 mm, 10 pcs",
105
- "ABR",
106
- 1880
107
- ],
108
- [
109
- "Drill bit set HSS, 19 pcs",
110
- "TLS",
111
- 3490
112
- ],
113
- [
114
- "Torque wrench 20-100 Nm",
115
- "TLS",
116
- 14900
117
- ],
118
- [
119
- "Pneumatic cylinder 40 x 100",
120
- "PNE",
121
- 6120
122
- ],
123
- [
124
- "Air hose PU 8 mm, 20 m",
125
- "PNE",
126
- 2475
127
- ],
128
- [
129
- "LED panel 600 x 600, 40 W",
130
- "LGT",
131
- 3290
132
- ],
133
- [
134
- "Pallet label roll 100 x 150",
135
- "LBL",
136
- 1175
137
- ],
138
- [
139
- "Thermal printer ribbon",
140
- "LBL",
141
- 890
142
- ],
143
- [
144
- "Euro pallet EPAL, used",
145
- "PLT",
146
- 1150
147
- ],
148
- [
149
- "Roll container, galvanised",
150
- "PLT",
151
- 9800
152
- ]
153
- ];
154
- catalog.length;
155
- const productAt = (index) => {
156
- const [name, category, priceCents] = catalog[index % catalog.length];
157
- const slot = index % catalog.length;
158
- return {
159
- id: `P-${200 + slot}`,
160
- sku: `${category}-${String(1e3 + slot * 7).padStart(4, "0")}`,
161
- name,
162
- category,
163
- priceCents
164
- };
165
- };
166
- //#endregion
167
- export { productAt };