@nice2dev/ui-erp 1.1.10 → 1.2.1

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/dist/index.d.ts CHANGED
@@ -186,6 +186,7 @@ export declare interface InvoiceLine {
186
186
  quantity: number;
187
187
  unit?: string;
188
188
  unitPrice: Money;
189
+ /** VAT rate as a fraction: 0.23 for 23%. */
189
190
  vatRate: number;
190
191
  discount?: number;
191
192
  }
@@ -230,10 +231,25 @@ export declare interface Money {
230
231
 
231
232
  export declare const NICE_VAT_PRESETS: Record<'PL' | 'EU' | 'UK', VatRate[]>;
232
233
 
234
+ export declare const NiceCapacityPlanner: default_2.FC<NiceCapacityPlannerProps>;
235
+
236
+ export declare interface NiceCapacityPlannerProps {
237
+ resources?: Resource[];
238
+ allocations?: Allocation[];
239
+ dateRange: DateRange;
240
+ viewConfig?: Partial<AllocationViewConfig>;
241
+ onAllocationCreate?: (allocation: Omit<Allocation, 'id'>) => void;
242
+ onAllocationUpdate?: (allocation: Allocation) => void;
243
+ onAllocationDelete?: (allocationId: string) => void;
244
+ onResourceClick?: (resource: Resource) => void;
245
+ readOnly?: boolean;
246
+ className?: string;
247
+ }
248
+
233
249
  export declare const NiceHRDashboard: default_2.ForwardRefExoticComponent<NiceHRDashboardProps & default_2.RefAttributes<HTMLDivElement>>;
234
250
 
235
251
  export declare interface NiceHRDashboardProps extends NiceStandardProps {
236
- employees: Employee[];
252
+ employees?: Employee[];
237
253
  /** Custom widget labels. */
238
254
  labels?: Partial<{
239
255
  headcount: string;
@@ -262,7 +278,7 @@ export declare interface NiceHRDashboardProps extends NiceStandardProps {
262
278
  export declare const NiceInventoryManager: default_2.FC<NiceInventoryManagerProps>;
263
279
 
264
280
  export declare interface NiceInventoryManagerProps {
265
- items: InventoryItem[];
281
+ items?: InventoryItem[];
266
282
  transactions?: InventoryTransaction[];
267
283
  viewConfig?: Partial<InventoryViewConfig>;
268
284
  onItemCreate?: (item: Omit<InventoryItem, 'id'>) => void;
@@ -271,6 +287,8 @@ export declare interface NiceInventoryManagerProps {
271
287
  onTransactionCreate?: (transaction: Omit<InventoryTransaction, 'id'>) => void;
272
288
  onStockCount?: (stockCount: StockCount) => void;
273
289
  onItemClick?: (item: InventoryItem) => void;
290
+ /** "Create PO" on a low-stock item; without it the button is not shown. */
291
+ onCreatePurchaseOrder?: (item: InventoryItem) => void;
274
292
  readOnly?: boolean;
275
293
  className?: string;
276
294
  }
@@ -325,7 +343,7 @@ export declare interface NiceInvoiceViewProps extends NiceStandardProps {
325
343
  export declare const NiceJpkExporter: ForwardRefExoticComponent<NiceJpkExporterProps & RefAttributes<HTMLDivElement>>;
326
344
 
327
345
  export declare interface NiceJpkExporterProps extends NiceStandardProps {
328
- invoices: Invoice[];
346
+ invoices?: Invoice[];
329
347
  taxpayer: JpkExportOptions['taxpayer'];
330
348
  /** Default export format. */
331
349
  defaultFormat?: JpkExportOptions['format'];
@@ -354,9 +372,9 @@ export declare interface NiceJpkExporterProps extends NiceStandardProps {
354
372
  export declare const NicePurchaseOrder: ForwardRefExoticComponent<NicePurchaseOrderViewProps & RefAttributes<HTMLDivElement>>;
355
373
 
356
374
  export declare interface NicePurchaseOrderProps {
357
- orders: PurchaseOrder[];
358
- suppliers: Supplier[];
359
- items: Pick<InventoryItem, 'id' | 'sku' | 'name' | 'cost'>[];
375
+ orders?: PurchaseOrder[];
376
+ suppliers?: Supplier[];
377
+ items?: Pick<InventoryItem, 'id' | 'sku' | 'name' | 'cost'>[];
360
378
  onOrderCreate?: (order: Omit<PurchaseOrder, 'id'>) => void;
361
379
  onOrderUpdate?: (order: PurchaseOrder) => void;
362
380
  onOrderDelete?: (orderId: string) => void;
@@ -399,21 +417,6 @@ export declare interface NicePurchaseOrderViewProps extends NicePurchaseOrderPro
399
417
  }>;
400
418
  }
401
419
 
402
- export declare const NiceResourceAllocation: default_2.FC<NiceResourceAllocationProps>;
403
-
404
- export declare interface NiceResourceAllocationProps {
405
- resources: Resource[];
406
- allocations: Allocation[];
407
- dateRange: DateRange;
408
- viewConfig?: Partial<AllocationViewConfig>;
409
- onAllocationCreate?: (allocation: Omit<Allocation, 'id'>) => void;
410
- onAllocationUpdate?: (allocation: Allocation) => void;
411
- onAllocationDelete?: (allocationId: string) => void;
412
- onResourceClick?: (resource: Resource) => void;
413
- readOnly?: boolean;
414
- className?: string;
415
- }
416
-
417
420
  export declare const NiceVatTable: ForwardRefExoticComponent<NiceVatTableProps & RefAttributes<HTMLDivElement>>;
418
421
 
419
422
  export declare interface NiceVatTableProps extends NiceStandardProps {
@@ -448,7 +451,7 @@ export declare interface NiceWarehouseViewProps extends NiceStandardProps {
448
451
  /** Warehouse identifier (used in the title). */
449
452
  warehouseName: string;
450
453
  /** Cells to render. */
451
- cells: WarehouseCell[];
454
+ cells?: WarehouseCell[];
452
455
  /** Heat-map color stops (low → high). */
453
456
  colors?: {
454
457
  low: string;
@@ -584,6 +587,7 @@ export declare interface UseMockErpApiOptions {
584
587
 
585
588
  export declare interface VatRate {
586
589
  code: string;
590
+ /** Rate as a fraction: 0.23 for 23%. */
587
591
  rate: number;
588
592
  label?: string;
589
593
  description?: string;