@kahitsan/ksui 0.43.0 → 0.44.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kahitsan/ksui",
3
- "version": "0.43.0",
3
+ "version": "0.44.0",
4
4
  "description": "ksui is a standalone set of SolidJS UI components for KahitSan/Hilinga and any SolidJS app. Published to the public npm registry and consumed as a normal dependency. Ships source under a `solid` export condition so the consumer's vite-plugin-solid compiles it with only solid-js externalized; it depends on nothing but solid-js + lucide-solid and injects its own CSS.",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -264,6 +264,9 @@ export interface TransactionFormProps {
264
264
  transferFeeAmount: string;
265
265
  setTransferFeeAmount: (v: string) => void;
266
266
  allowTransferFee: boolean;
267
+ // Editing a legacy payable row keeps the payable pane; create flows opt out
268
+ // via allowPayable={false} now that payables live in the Payables module.
269
+ allowPayable?: boolean;
267
270
  pendingFiles: PendingFile[];
268
271
  setPendingFiles: (v: PendingFile[]) => void;
269
272
  existingAttachments?: TransactionAttachment[];
@@ -399,10 +402,11 @@ export default function TransactionForm(props: TransactionFormProps) {
399
402
  // SearchableSelect mount so the loading-state placeholder shows while the
400
403
  // per-tenant options are still in flight.
401
404
  const subcategoryOptionsReady = () => subcategoryOptions() !== undefined;
402
- const categoryOptions = () =>
403
- props.category === "payable"
404
- ? ["sale", "expense", "business", "payable"]
405
- : ["sale", "expense", "business"];
405
+ const categoryOptions = () => {
406
+ if (props.category === "payable") return ["sale", "expense", "business", "payable"];
407
+ const base = ["sale", "expense", "business"];
408
+ return props.allowPayable === false ? base : [...base, "payable"];
409
+ };
406
410
 
407
411
  createEffect(() => {
408
412
  if (props.category !== "business" && props.transferFeeEnabled) {