@scalio-cloud/ui 0.110.0 → 0.111.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 (55) hide show
  1. package/dist/app-kit/ScalioAppProviders.d.ts +20 -0
  2. package/dist/app-kit/ScalioAppProviders.d.ts.map +1 -0
  3. package/dist/app-kit/ScalioDrawer.d.ts +28 -0
  4. package/dist/app-kit/ScalioDrawer.d.ts.map +1 -0
  5. package/dist/app-kit/ScalioEmptyState.d.ts +14 -0
  6. package/dist/app-kit/ScalioEmptyState.d.ts.map +1 -0
  7. package/dist/app-kit/ScalioErrorBoundary.d.ts +27 -0
  8. package/dist/app-kit/ScalioErrorBoundary.d.ts.map +1 -0
  9. package/dist/app-kit/ScalioFormDialog.d.ts +33 -0
  10. package/dist/app-kit/ScalioFormDialog.d.ts.map +1 -0
  11. package/dist/app-kit/ScalioFormField.d.ts +36 -0
  12. package/dist/app-kit/ScalioFormField.d.ts.map +1 -0
  13. package/dist/app-kit/ScalioInputs.d.ts +80 -0
  14. package/dist/app-kit/ScalioInputs.d.ts.map +1 -0
  15. package/dist/app-kit/ScalioLayout.d.ts +27 -0
  16. package/dist/app-kit/ScalioLayout.d.ts.map +1 -0
  17. package/dist/app-kit/ScalioResultBadge.d.ts +19 -0
  18. package/dist/app-kit/ScalioResultBadge.d.ts.map +1 -0
  19. package/dist/app-kit/ScalioTenantSettings.d.ts +24 -0
  20. package/dist/app-kit/ScalioTenantSettings.d.ts.map +1 -0
  21. package/dist/app-kit/ScalioUtilities.d.ts +33 -0
  22. package/dist/app-kit/ScalioUtilities.d.ts.map +1 -0
  23. package/dist/app-kit/_uiReact.d.ts +64 -3
  24. package/dist/app-kit/_uiReact.d.ts.map +1 -1
  25. package/dist/app-kit/index.d.ts +11 -0
  26. package/dist/app-kit/index.d.ts.map +1 -1
  27. package/dist/app-kit/index.js +1164 -2
  28. package/dist/app-kit/index.js.map +1 -1
  29. package/dist/app-kit/index.mjs +1144 -2
  30. package/dist/app-kit/index.mjs.map +1 -1
  31. package/dist/{chunk-A7O3P4YV.mjs → chunk-WBI44QWN.mjs} +92 -1
  32. package/dist/chunk-WBI44QWN.mjs.map +1 -0
  33. package/dist/core/format.d.ts +36 -0
  34. package/dist/core/format.d.ts.map +1 -0
  35. package/dist/core/index.d.ts +1 -0
  36. package/dist/core/index.d.ts.map +1 -1
  37. package/dist/core/index.js +97 -0
  38. package/dist/core/index.js.map +1 -1
  39. package/dist/core/index.mjs +13 -1
  40. package/dist/data-table/ScalioDataTable.d.ts +12 -0
  41. package/dist/data-table/ScalioDataTable.d.ts.map +1 -0
  42. package/dist/data-table/helpers.d.ts +40 -0
  43. package/dist/data-table/helpers.d.ts.map +1 -0
  44. package/dist/data-table/index.d.ts +8 -0
  45. package/dist/data-table/index.d.ts.map +1 -0
  46. package/dist/data-table/index.js +1040 -0
  47. package/dist/data-table/index.js.map +1 -0
  48. package/dist/data-table/index.mjs +1008 -0
  49. package/dist/data-table/index.mjs.map +1 -0
  50. package/dist/data-table/labels.d.ts +5 -0
  51. package/dist/data-table/labels.d.ts.map +1 -0
  52. package/dist/data-table/types.d.ts +178 -0
  53. package/dist/data-table/types.d.ts.map +1 -0
  54. package/package.json +7 -1
  55. package/dist/chunk-A7O3P4YV.mjs.map +0 -1
@@ -10,13 +10,19 @@ import {
10
10
  createPasskeyClient,
11
11
  createScalioApi,
12
12
  createScalioI18n,
13
+ fmtBytes,
13
14
  fmtDate,
14
15
  fmtDateTime,
16
+ fmtDuration,
17
+ fmtMoney,
18
+ fmtNumber,
19
+ fmtPercent,
15
20
  mailReady,
21
+ parseValidationErrors,
16
22
  passkeyCancelled,
17
23
  resolveAfterLogin,
18
24
  toUtcDate
19
- } from "../chunk-A7O3P4YV.mjs";
25
+ } from "../chunk-WBI44QWN.mjs";
20
26
  export {
21
27
  BASE_AUDIT_ACTIONS,
22
28
  BASE_DE,
@@ -29,9 +35,15 @@ export {
29
35
  createPasskeyClient,
30
36
  createScalioApi,
31
37
  createScalioI18n,
38
+ fmtBytes,
32
39
  fmtDate,
33
40
  fmtDateTime,
41
+ fmtDuration,
42
+ fmtMoney,
43
+ fmtNumber,
44
+ fmtPercent,
34
45
  mailReady,
46
+ parseValidationErrors,
35
47
  passkeyCancelled,
36
48
  resolveAfterLogin,
37
49
  toUtcDate
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import type { ScalioDataTableProps } from "./types.js";
3
+ /**
4
+ * Full-featured, accessible, TypeScript-first DataTable shared across all Scalio core apps.
5
+ *
6
+ * Supports client-side and server-side (`manual`) sorting, global search, multi-select facet
7
+ * filters, pagination, column visibility chooser, density toggle, sticky header, pinned columns,
8
+ * row selection with contextual bulk-action bar, expandable detail rows, CSV export (with
9
+ * formula-injection protection), `localStorage` preference persistence, and WCAG 2.2 AA semantics.
10
+ */
11
+ export declare function ScalioDataTable<T>({ data, columns, getRowId, manual, totalCount, sort: controlledSort, defaultSort, onSortChange, page: controlledPage, defaultPage, onPageChange, pageSize: controlledPageSize, defaultPageSize, pageSizeOptions, onPageSizeChange, paginate, searchable, search: controlledSearch, onSearchChange, searchPlaceholder, filters, filterValues: controlledFilterValues, onFilterChange, selectable, selectedIds: controlledSelectedIds, onSelectionChange, bulkActions, renderExpandedRow, onRowClick, rowClassName, exportCsv, columnChooser, densityToggle, defaultDensity, stickyHeader, storageKey, onRefresh, refreshing, toolbarActions, loading, loadingRows, error, onRetry, emptyTitle, emptyDescription, emptyAction, lang, labels: labelOverrides, testId, className, }: ScalioDataTableProps<T>): React.ReactElement;
12
+ //# sourceMappingURL=ScalioDataTable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScalioDataTable.d.ts","sourceRoot":"","sources":["../../src/data-table/ScalioDataTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AA6BpE,OAAO,KAAK,EAGV,oBAAoB,EAGrB,MAAM,YAAY,CAAC;AA2BpB;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,EACjC,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,MAAc,EACd,UAAU,EACV,IAAI,EAAE,cAAc,EACpB,WAAkB,EAClB,YAAY,EACZ,IAAI,EAAE,cAAc,EACpB,WAAe,EACf,YAAY,EACZ,QAAQ,EAAE,kBAAkB,EAC5B,eAAoB,EACpB,eAAmC,EACnC,gBAAgB,EAChB,QAAe,EACf,UAAiB,EACjB,MAAM,EAAE,gBAAgB,EACxB,cAAc,EACd,iBAAiB,EACjB,OAAY,EACZ,YAAY,EAAE,sBAAsB,EACpC,cAAc,EACd,UAAkB,EAClB,WAAW,EAAE,qBAAqB,EAClC,iBAAiB,EACjB,WAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,SAAiB,EACjB,aAAoB,EACpB,aAAoB,EACpB,cAA8B,EAC9B,YAAmB,EACnB,UAAU,EACV,SAAS,EACT,UAAkB,EAClB,cAAc,EACd,OAAe,EACf,WAAe,EACf,KAAY,EACZ,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,IAAW,EACX,MAAM,EAAE,cAAc,EACtB,MAA4B,EAC5B,SAAc,GACf,EAAE,oBAAoB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,YAAY,CAkzB9C"}
@@ -0,0 +1,40 @@
1
+ import type { ScalioColumn, ScalioFacetFilter, ScalioSortState, ScalioTablePrefs } from "./types.js";
2
+ /**
3
+ * Resolves the raw value of a column for a given row.
4
+ */
5
+ export declare function resolveCellValue<T>(row: T, column: ScalioColumn<T>): unknown;
6
+ /**
7
+ * Resolves the plain-text label of a column (for column chooser & CSV export).
8
+ */
9
+ export declare function resolveColumnLabel<T>(column: ScalioColumn<T>): string;
10
+ /**
11
+ * Client-side filtering by global search query and multi-select facet filters.
12
+ */
13
+ export declare function filterRows<T>(rows: readonly T[], columns: readonly ScalioColumn<T>[], search: string, filterValues: Readonly<Record<string, readonly string[]>>, filters?: readonly ScalioFacetFilter<T>[]): readonly T[];
14
+ /**
15
+ * Client-side stable sorting supporting numbers, booleans, Dates, strings (numeric-aware),
16
+ * custom `sortFn`, and null-last ordering.
17
+ */
18
+ export declare function sortRows<T>(rows: readonly T[], columns: readonly ScalioColumn<T>[], sort: ScalioSortState | null): readonly T[];
19
+ /**
20
+ * Slices a page (1-based) from a row list.
21
+ */
22
+ export declare function paginateRows<T>(rows: readonly T[], page: number, pageSize: number): readonly T[];
23
+ /**
24
+ * Escapes a single CSV cell per RFC-4180 and neutralizes spreadsheet formula injection
25
+ * (`=`, `+`, `-`, `@`, `\t`, `\r`) by prefixing a single quote.
26
+ */
27
+ export declare function escapeCsvCell(value: unknown): string;
28
+ /**
29
+ * Builds a UTF-8 BOM CSV string for the given rows and visible columns.
30
+ */
31
+ export declare function buildCsv<T>(rows: readonly T[], columns: readonly ScalioColumn<T>[]): string;
32
+ /**
33
+ * Safely reads persisted table preferences from `localStorage`.
34
+ */
35
+ export declare function loadTablePrefs(storageKey?: string): ScalioTablePrefs;
36
+ /**
37
+ * Safely writes table preferences to `localStorage`.
38
+ */
39
+ export declare function saveTablePrefs(storageKey: string | undefined, prefs: ScalioTablePrefs): void;
40
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/data-table/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,OAAO,CAI5E;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,MAAM,CAIrE;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAC1B,IAAI,EAAE,SAAS,CAAC,EAAE,EAClB,OAAO,EAAE,SAAS,YAAY,CAAC,CAAC,CAAC,EAAE,EACnC,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,EACzD,OAAO,GAAE,SAAS,iBAAiB,CAAC,CAAC,CAAC,EAAO,GAC5C,SAAS,CAAC,EAAE,CAmCd;AAgBD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EACxB,IAAI,EAAE,SAAS,CAAC,EAAE,EAClB,OAAO,EAAE,SAAS,YAAY,CAAC,CAAC,CAAC,EAAE,EACnC,IAAI,EAAE,eAAe,GAAG,IAAI,GAC3B,SAAS,CAAC,EAAE,CAYd;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,IAAI,EAAE,SAAS,CAAC,EAAE,EAClB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACf,SAAS,CAAC,EAAE,CAKd;AAID;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAOpD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EACxB,IAAI,EAAE,SAAS,CAAC,EAAE,EAClB,OAAO,EAAE,SAAS,YAAY,CAAC,CAAC,CAAC,EAAE,GAClC,MAAM,CAYR;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,gBAAgB,CAUpE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,gBAAgB,GAAG,IAAI,CAO5F"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @scalio-cloud/ui/data-table — Enterprise-grade, accessible, TypeScript-first DataTable.
3
+ */
4
+ export { ScalioDataTable } from "./ScalioDataTable.js";
5
+ export { DEFAULT_DATA_TABLE_LABELS, interpolateLabel } from "./labels.js";
6
+ export { buildCsv, escapeCsvCell, filterRows, loadTablePrefs, paginateRows, resolveCellValue, resolveColumnLabel, saveTablePrefs, sortRows, } from "./helpers.js";
7
+ export type { ScalioBulkAction, ScalioColumn, ScalioColumnAlign, ScalioColumnPin, ScalioDataTableLabels, ScalioDataTableProps, ScalioDensity, ScalioFacetFilter, ScalioFacetOption, ScalioSortState, ScalioTablePrefs, } from "./types.js";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/data-table/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EACL,QAAQ,EACR,aAAa,EACb,UAAU,EACV,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,QAAQ,GACT,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,GACjB,MAAM,YAAY,CAAC"}