@nice2dev/ui-erp 1.1.10 → 1.2.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/README.md CHANGED
@@ -72,12 +72,12 @@ function ProjectTimeline() {
72
72
  }
73
73
  ```
74
74
 
75
- ### NiceResourceAllocation
75
+ ### NiceCapacityPlanner
76
76
 
77
77
  Resource capacity planning grid with utilization tracking and conflict detection.
78
78
 
79
79
  ```tsx
80
- import { NiceResourceAllocation } from '@nice2dev/ui-erp';
80
+ import { NiceCapacityPlanner } from '@nice2dev/ui-erp';
81
81
  import '@nice2dev/ui-erp/style.css';
82
82
 
83
83
  const resources = [
@@ -118,7 +118,7 @@ const allocations = [
118
118
 
119
119
  function ResourcePlanning() {
120
120
  return (
121
- <NiceResourceAllocation
121
+ <NiceCapacityPlanner
122
122
  resources={resources}
123
123
  allocations={allocations}
124
124
  dateRange={{
package/dist/index.cjs CHANGED
@@ -777,7 +777,8 @@ j(
777
777
  info: "#22d3ee"
778
778
  },
779
779
  { primary: "#030712", secondary: "#111827", tertiary: "#1f2937", hover: "#1f2937" },
780
- { primary: "#e5e7eb", secondary: "#9ca3af", muted: "#4b5563" },
780
+ // indigo-500 is a dark fill: white on it reads better than the dark default of dark themes
781
+ { primary: "#e5e7eb", secondary: "#9ca3af", muted: "#4b5563", onPrimary: "#ffffff" },
781
782
  "#374151"
782
783
  );
783
784
  j(
@@ -1253,7 +1254,8 @@ j(
1253
1254
  info: "#2aa198"
1254
1255
  },
1255
1256
  { primary: "#002b36", secondary: "#073642", tertiary: "#0a4858", hover: "#073642" },
1256
- { primary: "#eee8d5", secondary: "#93a1a1", muted: "#586e75" },
1257
+ // Solarized red is a dark fill: white on it is 4.63 : 1, the dark default 3.86
1258
+ { primary: "#eee8d5", secondary: "#93a1a1", muted: "#586e75", onError: "#ffffff" },
1257
1259
  "#073642"
1258
1260
  );
1259
1261
  j(
@@ -1365,7 +1367,8 @@ j(
1365
1367
  info: "#bf00ff"
1366
1368
  },
1367
1369
  { primary: "#0a0e17", secondary: "#131824", tertiary: "#1c2333", hover: "#1c2333" },
1368
- { primary: "#e0fbfc", secondary: "#80d4dd", muted: "#3a6b72" },
1370
+ // the purple info fill is dark: white on it is 4.51 : 1, the dark default 3.96
1371
+ { primary: "#e0fbfc", secondary: "#80d4dd", muted: "#3a6b72", onInfo: "#ffffff" },
1369
1372
  "#1c3a44"
1370
1373
  );
1371
1374
  j(
@@ -1421,7 +1424,8 @@ j(
1421
1424
  info: "#9333ea"
1422
1425
  },
1423
1426
  { primary: "#1a0a00", secondary: "#2d1500", tertiary: "#402000", hover: "#402000" },
1424
- { primary: "#ffedd5", secondary: "#fdba74", muted: "#9a5c28" },
1427
+ // purple-600 info is a dark fill: white on it is 5.38 : 1, the dark default 3.32
1428
+ { primary: "#ffedd5", secondary: "#fdba74", muted: "#9a5c28", onInfo: "#ffffff" },
1425
1429
  "#5c3400"
1426
1430
  );
1427
1431
  $(
@@ -1810,7 +1814,7 @@ const ai = be.memo(
1810
1814
  style: {
1811
1815
  ...c,
1812
1816
  background: "var(--nice-overlay-85, rgba(0, 0, 0, 0.85))",
1813
- color: "var(--nice-text-on-primary, #fff)",
1817
+ color: "var(--nice-color-white, #fff)",
1814
1818
  borderRadius: 8,
1815
1819
  fontSize: 11,
1816
1820
  fontFamily: "Monaco, Consolas, monospace",
@@ -1994,7 +1998,7 @@ const TIME_INCREMENTS = {
1994
1998
  quarter: 90 * 24 * 60 * 60 * 1e3,
1995
1999
  year: 365 * 24 * 60 * 60 * 1e3
1996
2000
  };
1997
- const NiceResourceAllocation = ({
2001
+ const NiceCapacityPlanner = ({
1998
2002
  resources,
1999
2003
  allocations,
2000
2004
  dateRange,
@@ -4265,12 +4269,12 @@ const NiceJpkExporter = be.forwardRef(
4265
4269
  }
4266
4270
  );
4267
4271
  exports.NICE_VAT_PRESETS = NICE_VAT_PRESETS;
4272
+ exports.NiceCapacityPlanner = NiceCapacityPlanner;
4268
4273
  exports.NiceHRDashboard = NiceHRDashboard;
4269
4274
  exports.NiceInventoryManager = NiceInventoryManager;
4270
4275
  exports.NiceInvoiceView = NiceInvoiceView;
4271
4276
  exports.NiceJpkExporter = NiceJpkExporter;
4272
4277
  exports.NicePurchaseOrder = NicePurchaseOrder;
4273
- exports.NiceResourceAllocation = NiceResourceAllocation;
4274
4278
  exports.NiceVatTable = NiceVatTable;
4275
4279
  exports.NiceWarehouseView = NiceWarehouseView;
4276
4280
  exports.buildJpkXml = defaultBuildXml;
package/dist/index.d.ts CHANGED
@@ -230,6 +230,21 @@ export declare interface Money {
230
230
 
231
231
  export declare const NICE_VAT_PRESETS: Record<'PL' | 'EU' | 'UK', VatRate[]>;
232
232
 
233
+ export declare const NiceCapacityPlanner: default_2.FC<NiceCapacityPlannerProps>;
234
+
235
+ export declare interface NiceCapacityPlannerProps {
236
+ resources: Resource[];
237
+ allocations: Allocation[];
238
+ dateRange: DateRange;
239
+ viewConfig?: Partial<AllocationViewConfig>;
240
+ onAllocationCreate?: (allocation: Omit<Allocation, 'id'>) => void;
241
+ onAllocationUpdate?: (allocation: Allocation) => void;
242
+ onAllocationDelete?: (allocationId: string) => void;
243
+ onResourceClick?: (resource: Resource) => void;
244
+ readOnly?: boolean;
245
+ className?: string;
246
+ }
247
+
233
248
  export declare const NiceHRDashboard: default_2.ForwardRefExoticComponent<NiceHRDashboardProps & default_2.RefAttributes<HTMLDivElement>>;
234
249
 
235
250
  export declare interface NiceHRDashboardProps extends NiceStandardProps {
@@ -399,21 +414,6 @@ export declare interface NicePurchaseOrderViewProps extends NicePurchaseOrderPro
399
414
  }>;
400
415
  }
401
416
 
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
417
  export declare const NiceVatTable: ForwardRefExoticComponent<NiceVatTableProps & RefAttributes<HTMLDivElement>>;
418
418
 
419
419
  export declare interface NiceVatTableProps extends NiceStandardProps {
package/dist/index.mjs CHANGED
@@ -775,7 +775,8 @@ j(
775
775
  info: "#22d3ee"
776
776
  },
777
777
  { primary: "#030712", secondary: "#111827", tertiary: "#1f2937", hover: "#1f2937" },
778
- { primary: "#e5e7eb", secondary: "#9ca3af", muted: "#4b5563" },
778
+ // indigo-500 is a dark fill: white on it reads better than the dark default of dark themes
779
+ { primary: "#e5e7eb", secondary: "#9ca3af", muted: "#4b5563", onPrimary: "#ffffff" },
779
780
  "#374151"
780
781
  );
781
782
  j(
@@ -1251,7 +1252,8 @@ j(
1251
1252
  info: "#2aa198"
1252
1253
  },
1253
1254
  { primary: "#002b36", secondary: "#073642", tertiary: "#0a4858", hover: "#073642" },
1254
- { primary: "#eee8d5", secondary: "#93a1a1", muted: "#586e75" },
1255
+ // Solarized red is a dark fill: white on it is 4.63 : 1, the dark default 3.86
1256
+ { primary: "#eee8d5", secondary: "#93a1a1", muted: "#586e75", onError: "#ffffff" },
1255
1257
  "#073642"
1256
1258
  );
1257
1259
  j(
@@ -1363,7 +1365,8 @@ j(
1363
1365
  info: "#bf00ff"
1364
1366
  },
1365
1367
  { primary: "#0a0e17", secondary: "#131824", tertiary: "#1c2333", hover: "#1c2333" },
1366
- { primary: "#e0fbfc", secondary: "#80d4dd", muted: "#3a6b72" },
1368
+ // the purple info fill is dark: white on it is 4.51 : 1, the dark default 3.96
1369
+ { primary: "#e0fbfc", secondary: "#80d4dd", muted: "#3a6b72", onInfo: "#ffffff" },
1367
1370
  "#1c3a44"
1368
1371
  );
1369
1372
  j(
@@ -1419,7 +1422,8 @@ j(
1419
1422
  info: "#9333ea"
1420
1423
  },
1421
1424
  { primary: "#1a0a00", secondary: "#2d1500", tertiary: "#402000", hover: "#402000" },
1422
- { primary: "#ffedd5", secondary: "#fdba74", muted: "#9a5c28" },
1425
+ // purple-600 info is a dark fill: white on it is 5.38 : 1, the dark default 3.32
1426
+ { primary: "#ffedd5", secondary: "#fdba74", muted: "#9a5c28", onInfo: "#ffffff" },
1423
1427
  "#5c3400"
1424
1428
  );
1425
1429
  $(
@@ -1808,7 +1812,7 @@ const ai = memo(
1808
1812
  style: {
1809
1813
  ...c,
1810
1814
  background: "var(--nice-overlay-85, rgba(0, 0, 0, 0.85))",
1811
- color: "var(--nice-text-on-primary, #fff)",
1815
+ color: "var(--nice-color-white, #fff)",
1812
1816
  borderRadius: 8,
1813
1817
  fontSize: 11,
1814
1818
  fontFamily: "Monaco, Consolas, monospace",
@@ -1992,7 +1996,7 @@ const TIME_INCREMENTS = {
1992
1996
  quarter: 90 * 24 * 60 * 60 * 1e3,
1993
1997
  year: 365 * 24 * 60 * 60 * 1e3
1994
1998
  };
1995
- const NiceResourceAllocation = ({
1999
+ const NiceCapacityPlanner = ({
1996
2000
  resources,
1997
2001
  allocations,
1998
2002
  dateRange,
@@ -4264,12 +4268,12 @@ const NiceJpkExporter = forwardRef(
4264
4268
  );
4265
4269
  export {
4266
4270
  NICE_VAT_PRESETS,
4271
+ NiceCapacityPlanner,
4267
4272
  NiceHRDashboard,
4268
4273
  NiceInventoryManager,
4269
4274
  NiceInvoiceView,
4270
4275
  NiceJpkExporter,
4271
4276
  NicePurchaseOrder,
4272
- NiceResourceAllocation,
4273
4277
  NiceVatTable,
4274
4278
  NiceWarehouseView,
4275
4279
  defaultBuildXml as buildJpkXml,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice2dev/ui-erp",
3
- "version": "1.1.10",
3
+ "version": "1.2.0",
4
4
  "description": "Enterprise Resource Planning components for Nice2Dev",
5
5
  "author": "Nice2Dev Team",
6
6
  "license": "MIT",
@@ -50,7 +50,7 @@
50
50
  "react-dom": ">=17.0.0"
51
51
  },
52
52
  "devDependencies": {
53
- "@nice2dev/ui-core": "^1.1.10",
53
+ "@nice2dev/ui-core": "^1.2.0",
54
54
  "@testing-library/react": "^16.3.3",
55
55
  "@types/react": "^19.2.18",
56
56
  "@types/react-dom": "^19.2.7",