@judo/components 0.1.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 (133) hide show
  1. package/LICENSE +277 -0
  2. package/README.md +200 -0
  3. package/dist/FlexRenderer-0KCxU9QU.js +1612 -0
  4. package/dist/FlexRenderer-0KCxU9QU.js.map +1 -0
  5. package/dist/FormContainerRenderer-B8H4kyz0.js +67 -0
  6. package/dist/FormContainerRenderer-B8H4kyz0.js.map +1 -0
  7. package/dist/FormContainerRenderer-CtuXP8jP.js +3 -0
  8. package/dist/TableContainerRenderer-gKBlsD4S.js +127 -0
  9. package/dist/TableContainerRenderer-gKBlsD4S.js.map +1 -0
  10. package/dist/TableContainerRenderer-qbzKI1Cd.js +2 -0
  11. package/dist/ViewContainerRenderer-7Cx4fcLp.js +3 -0
  12. package/dist/ViewContainerRenderer-DCRaE_dq.js +132 -0
  13. package/dist/ViewContainerRenderer-DCRaE_dq.js.map +1 -0
  14. package/dist/containers/FormContainerRenderer.d.ts +11 -0
  15. package/dist/containers/FormContainerRenderer.d.ts.map +1 -0
  16. package/dist/containers/PageRenderer.d.ts +9 -0
  17. package/dist/containers/PageRenderer.d.ts.map +1 -0
  18. package/dist/containers/TableContainerRenderer.d.ts +11 -0
  19. package/dist/containers/TableContainerRenderer.d.ts.map +1 -0
  20. package/dist/containers/ViewContainerRenderer.d.ts +12 -0
  21. package/dist/containers/ViewContainerRenderer.d.ts.map +1 -0
  22. package/dist/dialogs/LinkSelectorDialog.d.ts +21 -0
  23. package/dist/dialogs/LinkSelectorDialog.d.ts.map +1 -0
  24. package/dist/errors/ContainerErrorBoundary.d.ts +42 -0
  25. package/dist/errors/ContainerErrorBoundary.d.ts.map +1 -0
  26. package/dist/errors/index.d.ts +2 -0
  27. package/dist/errors/index.d.ts.map +1 -0
  28. package/dist/find-on-init-action-C5CqxQaH.js +7727 -0
  29. package/dist/find-on-init-action-C5CqxQaH.js.map +1 -0
  30. package/dist/hooks/use-file-handling.d.ts +79 -0
  31. package/dist/hooks/use-file-handling.d.ts.map +1 -0
  32. package/dist/hooks/use-page-title.d.ts +23 -0
  33. package/dist/hooks/use-page-title.d.ts.map +1 -0
  34. package/dist/hooks/use-table-data.d.ts +77 -0
  35. package/dist/hooks/use-table-data.d.ts.map +1 -0
  36. package/dist/index.css +2 -0
  37. package/dist/index.d.ts +44 -0
  38. package/dist/index.d.ts.map +1 -0
  39. package/dist/index.js +296 -0
  40. package/dist/index.js.map +1 -0
  41. package/dist/inputs/BinaryInputComponent.d.ts +15 -0
  42. package/dist/inputs/BinaryInputComponent.d.ts.map +1 -0
  43. package/dist/inputs/CheckboxComponent.d.ts +14 -0
  44. package/dist/inputs/CheckboxComponent.d.ts.map +1 -0
  45. package/dist/inputs/DateInputComponent.d.ts +14 -0
  46. package/dist/inputs/DateInputComponent.d.ts.map +1 -0
  47. package/dist/inputs/DateTimeInputComponent.d.ts +14 -0
  48. package/dist/inputs/DateTimeInputComponent.d.ts.map +1 -0
  49. package/dist/inputs/EnumerationComboComponent.d.ts +20 -0
  50. package/dist/inputs/EnumerationComboComponent.d.ts.map +1 -0
  51. package/dist/inputs/EnumerationRadioComponent.d.ts +22 -0
  52. package/dist/inputs/EnumerationRadioComponent.d.ts.map +1 -0
  53. package/dist/inputs/EnumerationToggleButtonbarComponent.d.ts +23 -0
  54. package/dist/inputs/EnumerationToggleButtonbarComponent.d.ts.map +1 -0
  55. package/dist/inputs/InputRenderer.d.ts +11 -0
  56. package/dist/inputs/InputRenderer.d.ts.map +1 -0
  57. package/dist/inputs/NumericInputComponent.d.ts +14 -0
  58. package/dist/inputs/NumericInputComponent.d.ts.map +1 -0
  59. package/dist/inputs/PasswordInputComponent.d.ts +14 -0
  60. package/dist/inputs/PasswordInputComponent.d.ts.map +1 -0
  61. package/dist/inputs/SwitchComponent.d.ts +14 -0
  62. package/dist/inputs/SwitchComponent.d.ts.map +1 -0
  63. package/dist/inputs/TextAreaComponent.d.ts +14 -0
  64. package/dist/inputs/TextAreaComponent.d.ts.map +1 -0
  65. package/dist/inputs/TextInputComponent.d.ts +19 -0
  66. package/dist/inputs/TextInputComponent.d.ts.map +1 -0
  67. package/dist/inputs/TimeInputComponent.d.ts +14 -0
  68. package/dist/inputs/TimeInputComponent.d.ts.map +1 -0
  69. package/dist/renderers/ButtonGroupRenderer.d.ts +10 -0
  70. package/dist/renderers/ButtonGroupRenderer.d.ts.map +1 -0
  71. package/dist/renderers/FlexRenderer.d.ts +13 -0
  72. package/dist/renderers/FlexRenderer.d.ts.map +1 -0
  73. package/dist/renderers/FormattedRenderer.d.ts +12 -0
  74. package/dist/renderers/FormattedRenderer.d.ts.map +1 -0
  75. package/dist/renderers/FrameRenderer.d.ts +17 -0
  76. package/dist/renderers/FrameRenderer.d.ts.map +1 -0
  77. package/dist/renderers/IconRenderer.d.ts +41 -0
  78. package/dist/renderers/IconRenderer.d.ts.map +1 -0
  79. package/dist/renderers/InlineButtonGroupRenderer.d.ts +22 -0
  80. package/dist/renderers/InlineButtonGroupRenderer.d.ts.map +1 -0
  81. package/dist/renderers/LinkRenderer.d.ts +17 -0
  82. package/dist/renderers/LinkRenderer.d.ts.map +1 -0
  83. package/dist/renderers/PageHeader.d.ts +13 -0
  84. package/dist/renderers/PageHeader.d.ts.map +1 -0
  85. package/dist/renderers/RowActionCell.d.ts +28 -0
  86. package/dist/renderers/RowActionCell.d.ts.map +1 -0
  87. package/dist/renderers/StandaloneButtonRenderer.d.ts +16 -0
  88. package/dist/renderers/StandaloneButtonRenderer.d.ts.map +1 -0
  89. package/dist/renderers/SubThemeWrapper.d.ts +22 -0
  90. package/dist/renderers/SubThemeWrapper.d.ts.map +1 -0
  91. package/dist/renderers/TabControllerRenderer.d.ts +10 -0
  92. package/dist/renderers/TabControllerRenderer.d.ts.map +1 -0
  93. package/dist/renderers/TableRenderer.d.ts +10 -0
  94. package/dist/renderers/TableRenderer.d.ts.map +1 -0
  95. package/dist/renderers/TableToolbar.d.ts +47 -0
  96. package/dist/renderers/TableToolbar.d.ts.map +1 -0
  97. package/dist/renderers/VisualElementRenderer.d.ts +17 -0
  98. package/dist/renderers/VisualElementRenderer.d.ts.map +1 -0
  99. package/dist/utils/alignment-mappers.d.ts +17 -0
  100. package/dist/utils/alignment-mappers.d.ts.map +1 -0
  101. package/dist/utils/build-mask-string.d.ts +31 -0
  102. package/dist/utils/build-mask-string.d.ts.map +1 -0
  103. package/dist/utils/build-query-customizer.d.ts +35 -0
  104. package/dist/utils/build-query-customizer.d.ts.map +1 -0
  105. package/dist/utils/destructive-action-utils.d.ts +17 -0
  106. package/dist/utils/destructive-action-utils.d.ts.map +1 -0
  107. package/dist/utils/find-action-by-definition.d.ts +26 -0
  108. package/dist/utils/find-action-by-definition.d.ts.map +1 -0
  109. package/dist/utils/find-on-init-action.d.ts +12 -0
  110. package/dist/utils/find-on-init-action.d.ts.map +1 -0
  111. package/dist/utils/find-visual-element.d.ts +18 -0
  112. package/dist/utils/find-visual-element.d.ts.map +1 -0
  113. package/dist/utils/flex-layout.d.ts +104 -0
  114. package/dist/utils/flex-layout.d.ts.map +1 -0
  115. package/dist/utils/get-visible-buttons.d.ts +33 -0
  116. package/dist/utils/get-visible-buttons.d.ts.map +1 -0
  117. package/dist/utils/icon-adornment.d.ts +13 -0
  118. package/dist/utils/icon-adornment.d.ts.map +1 -0
  119. package/dist/utils/mdi-alias-map.d.ts +44 -0
  120. package/dist/utils/mdi-alias-map.d.ts.map +1 -0
  121. package/dist/utils/mdi-alias-map.generated.d.ts +10 -0
  122. package/dist/utils/mdi-alias-map.generated.d.ts.map +1 -0
  123. package/dist/utils/resolve-container-type.d.ts +11 -0
  124. package/dist/utils/resolve-container-type.d.ts.map +1 -0
  125. package/dist/utils/singleton-access.d.ts +25 -0
  126. package/dist/utils/singleton-access.d.ts.map +1 -0
  127. package/dist/utils/table-column-utils.d.ts +75 -0
  128. package/dist/utils/table-column-utils.d.ts.map +1 -0
  129. package/dist/utils/table-filter-utils.d.ts +14 -0
  130. package/dist/utils/table-filter-utils.d.ts.map +1 -0
  131. package/dist/utils/table-sort-utils.d.ts +24 -0
  132. package/dist/utils/table-sort-utils.d.ts.map +1 -0
  133. package/package.json +84 -0
@@ -0,0 +1,47 @@
1
+ import { Action } from '@judo/actions';
2
+ import { ConfirmDialogOptions } from '@judo/feedback';
3
+ import { Button as ButtonElement, Column, PageDefinition } from '@judo/model-api';
4
+ import { GridFilterModel, GridPaginationModel, GridSortModel } from '@mui/x-data-grid';
5
+ import { Dispatch, SetStateAction } from 'react';
6
+ export interface TableToolbarProps {
7
+ buttons: ButtonElement[];
8
+ testId: string;
9
+ page?: PageDefinition;
10
+ hasSelection: boolean;
11
+ /** Whether this toolbar belongs to an eager table (aggregated element) */
12
+ isEager?: boolean;
13
+ /** Action dispatcher function (second arg = context overrides, e.g. selectedRows) */
14
+ onDispatch?: (action: Action, contextOverrides?: Record<string, unknown>) => Promise<unknown>;
15
+ /** Currently selected row transfers for bulk operations */
16
+ selectedRows?: unknown[];
17
+ /** Setter for the filter button element, used to anchor the filter panel */
18
+ setFilterButtonEl?: Dispatch<SetStateAction<HTMLButtonElement | null>>;
19
+ /** Current sort model from DataGrid */
20
+ sortModel?: GridSortModel;
21
+ /** Current filter model from DataGrid */
22
+ filterModel?: GridFilterModel;
23
+ /** Current pagination model from DataGrid */
24
+ paginationModel?: GridPaginationModel;
25
+ /** Table columns for filter conversion */
26
+ columns?: Column[];
27
+ /** Whether to count records (for pagination display) */
28
+ showTotalCount?: boolean;
29
+ /** Callback to refresh the table after a destructive bulk action (e.g., bulk delete) */
30
+ onAfterBulkDelete?: () => void;
31
+ /** Optional confirmation function for destructive actions */
32
+ confirm?: (options: ConfirmDialogOptions) => Promise<boolean>;
33
+ }
34
+ declare module "@mui/x-data-grid" {
35
+ interface ToolbarPropsOverrides extends TableToolbarProps {
36
+ }
37
+ }
38
+ /**
39
+ * Custom toolbar component for table actions.
40
+ * Filters buttons by page actions and bulk action requirements.
41
+ * Used as a DataGrid slots.toolbar component.
42
+ *
43
+ * Note: Uses Stack instead of GridToolbarContainer to avoid CSS import
44
+ * issues in test environments while maintaining proper toolbar styling.
45
+ */
46
+ export declare function TableToolbar({ buttons, testId, page, hasSelection, isEager, onDispatch, selectedRows, setFilterButtonEl, sortModel, filterModel, paginationModel, columns, showTotalCount, onAfterBulkDelete, confirm, }: TableToolbarProps): import("react/jsx-runtime").JSX.Element | null;
47
+ //# sourceMappingURL=TableToolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableToolbar.d.ts","sourceRoot":"","sources":["../../src/renderers/TableToolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,KAAK,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEvF,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAElB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAOtD,MAAM,WAAW,iBAAiB;IACjC,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,0EAA0E;IAC1E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,qFAAqF;IACrF,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9F,2DAA2D;IAC3D,YAAY,CAAC,EAAE,OAAO,EAAE,CAAC;IACzB,4EAA4E;IAC5E,iBAAiB,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC,CAAC;IACvE,uCAAuC;IACvC,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,yCAAyC;IACzC,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,6CAA6C;IAC7C,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACtC,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,wDAAwD;IACxD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,6DAA6D;IAC7D,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC9D;AAGD,OAAO,QAAQ,kBAAkB,CAAC;IACjC,UAAU,qBAAsB,SAAQ,iBAAiB;KAAG;CAC5D;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,EAC5B,OAAO,EACP,MAAM,EACN,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,eAAe,EACf,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,OAAO,GACP,EAAE,iBAAiB,kDAkInB"}
@@ -0,0 +1,17 @@
1
+ import { VisualElement } from '@judo/model-api';
2
+ export interface VisualElementRendererProps {
3
+ element: VisualElement;
4
+ readOnly?: boolean;
5
+ }
6
+ /**
7
+ * Dispatcher for all visual element types.
8
+ * Checks for overrides in priority order:
9
+ * 1. sourceId-based override (CustomizationsConfig.components)
10
+ * 2. type-based interceptor (CustomizationsConfig.componentInterceptors)
11
+ * 3. Default rendering by @type
12
+ *
13
+ * When the element has a `subTheme` set and a matching provider is registered,
14
+ * the rendered output is wrapped in a scoped MUI ThemeProvider via SubThemeWrapper.
15
+ */
16
+ export declare function VisualElementRenderer({ element, readOnly }: VisualElementRendererProps): import("react/jsx-runtime").JSX.Element | null;
17
+ //# sourceMappingURL=VisualElementRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VisualElementRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/VisualElementRenderer.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EASX,aAAa,EACb,MAAM,iBAAiB,CAAC;AAWzB,MAAM,WAAW,0BAA0B;IAC1C,OAAO,EAAE,aAAa,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,0BAA0B,kDAqCtF"}
@@ -0,0 +1,17 @@
1
+ import { Alignment, CrossAxisAlignment, MainAxisAlignment } from '@judo/model-api';
2
+ /**
3
+ * Map MainAxisAlignment enum to CSS justify-content value.
4
+ */
5
+ export declare function mapMainAxisAlignment(alignment: MainAxisAlignment | undefined): string;
6
+ /**
7
+ * Map CrossAxisAlignment enum to CSS align-items value.
8
+ */
9
+ export declare function mapCrossAxisAlignment(alignment: CrossAxisAlignment | undefined): string;
10
+ /**
11
+ * Map Alignment enum to CSS position properties.
12
+ */
13
+ export declare function mapAlignment(alignment: Alignment | undefined): {
14
+ justifyContent: string;
15
+ alignItems: string;
16
+ };
17
+ //# sourceMappingURL=alignment-mappers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alignment-mappers.d.ts","sourceRoot":"","sources":["../../src/utils/alignment-mappers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEnF;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,iBAAiB,GAAG,SAAS,GAAG,MAAM,CAiBrF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,kBAAkB,GAAG,SAAS,GAAG,MAAM,CAevF;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,GAAG;IAC/D,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;CACnB,CAuBA"}
@@ -0,0 +1,31 @@
1
+ import { AttributeType, RelationType } from '@judo/model-api';
2
+ /**
3
+ * Build a JUDO mask string from attributes and relations.
4
+ *
5
+ * The mask format wraps comma-separated entries in curly braces.
6
+ * Plain attributes are listed by name, while relations include their
7
+ * target attributes in nested braces.
8
+ *
9
+ * @example
10
+ * // Attributes only
11
+ * buildMaskString({ attributes: [{ name: "born" }, { name: "name" }] })
12
+ * // => "{born,name}"
13
+ *
14
+ * @example
15
+ * // Attributes + relations
16
+ * buildMaskString({
17
+ * attributes: [{ name: "born" }, { name: "name" }],
18
+ * relations: [{ name: "messages", target: { attributes: [{ name: "message" }] } }],
19
+ * })
20
+ * // => "{born,name,messages{message}}"
21
+ *
22
+ * @example
23
+ * // Empty produces "{}"
24
+ * buildMaskString({ attributes: [] })
25
+ * // => "{}"
26
+ */
27
+ export declare function buildMaskString(params: {
28
+ attributes?: AttributeType[];
29
+ relations?: RelationType[];
30
+ }): string;
31
+ //# sourceMappingURL=build-mask-string.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-mask-string.d.ts","sourceRoot":"","sources":["../../src/utils/build-mask-string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE;IAAE,UAAU,CAAC,EAAE,aAAa,EAAE,CAAC;IAAC,SAAS,CAAC,EAAE,YAAY,EAAE,CAAA;CAAE,GAAG,MAAM,CAyB5G"}
@@ -0,0 +1,35 @@
1
+ import { Column } from '@judo/model-api';
2
+ import { GridFilterModel, GridPaginationModel, GridSortModel } from '@mui/x-data-grid';
3
+ /**
4
+ * QueryCustomizer structure for REST API requests.
5
+ * Includes sorting, pagination, and filter criteria.
6
+ */
7
+ export interface QueryCustomizer {
8
+ _orderBy?: {
9
+ attribute: string;
10
+ descending: boolean;
11
+ }[];
12
+ _seek?: {
13
+ limit: number;
14
+ offset: number;
15
+ };
16
+ [filterField: string]: unknown;
17
+ }
18
+ /**
19
+ * Parameters for building a QueryCustomizer from DataGrid state.
20
+ */
21
+ export interface BuildQueryCustomizerParams {
22
+ sortModel: GridSortModel;
23
+ paginationModel: GridPaginationModel;
24
+ filterModel: GridFilterModel;
25
+ columns: Column[];
26
+ }
27
+ /**
28
+ * Build a QueryCustomizer object from DataGrid state (sort, pagination, filter).
29
+ * This is used for server-side table operations to include current state in API requests.
30
+ *
31
+ * @param params - The DataGrid state models and column definitions
32
+ * @returns QueryCustomizer object ready to be spread into an action
33
+ */
34
+ export declare function buildQueryCustomizer(params: BuildQueryCustomizerParams): QueryCustomizer;
35
+ //# sourceMappingURL=build-query-customizer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-query-customizer.d.ts","sourceRoot":"","sources":["../../src/utils/build-query-customizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAI5F;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;IACxD,KAAK,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C,SAAS,EAAE,aAAa,CAAC;IACzB,eAAe,EAAE,mBAAmB,CAAC;IACrC,WAAW,EAAE,eAAe,CAAC;IAC7B,OAAO,EAAE,MAAM,EAAE,CAAC;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,0BAA0B,GAAG,eAAe,CAexF"}
@@ -0,0 +1,17 @@
1
+ import { ConfirmDialogOptions } from '@judo/feedback';
2
+ /**
3
+ * Set of action definition types that are considered destructive.
4
+ * These require user confirmation before execution.
5
+ */
6
+ export declare const DESTRUCTIVE_ACTION_TYPES: Set<string>;
7
+ /**
8
+ * Checks whether an action type is destructive (delete, remove, unset, clear).
9
+ * Handles both prefixed ("ui:DeleteActionDefinition") and unprefixed forms.
10
+ */
11
+ export declare function isDestructiveAction(actionType?: string): boolean;
12
+ /**
13
+ * Returns appropriate confirmation dialog options for a destructive action type.
14
+ * Handles both prefixed ("ui:DeleteActionDefinition") and unprefixed forms.
15
+ */
16
+ export declare function getDestructiveConfirmationOptions(actionType: string): ConfirmDialogOptions;
17
+ //# sourceMappingURL=destructive-action-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"destructive-action-utils.d.ts","sourceRoot":"","sources":["../../src/utils/destructive-action-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,wBAAwB,aAQnC,CAAC;AAEH;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAKhE;AAED;;;GAGG;AACH,wBAAgB,iCAAiC,CAAC,UAAU,EAAE,MAAM,GAAG,oBAAoB,CA8D1F"}
@@ -0,0 +1,26 @@
1
+ import { Action, ActionDefinition, PageDefinition } from '@judo/model-api';
2
+ /**
3
+ * Find an Action in page.actions that matches a given ActionDefinition by xmi:id.
4
+ *
5
+ * This is the core utility for matching visual element ActionDefinitions (inline/contained)
6
+ * with the corresponding Action entries in page.actions (which hold runtime metadata like
7
+ * targetPageDefinition, targetDataElement, etc.).
8
+ *
9
+ * @param page - The PageDefinition containing the actions array
10
+ * @param actionDefinition - The ActionDefinition to match (e.g., from a Button or container.onInit)
11
+ * @returns The matching Action, or undefined if no match is found
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * // For button click handling
16
+ * const action = findActionByDefinition(page, button.actionDefinition);
17
+ * if (action) {
18
+ * dispatch(action);
19
+ * }
20
+ *
21
+ * // For onInit handling
22
+ * const onInitAction = findActionByDefinition(page, container.onInit);
23
+ * ```
24
+ */
25
+ export declare function findActionByDefinition(page: PageDefinition, actionDefinition: ActionDefinition | undefined): Action | undefined;
26
+ //# sourceMappingURL=find-action-by-definition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-action-by-definition.d.ts","sourceRoot":"","sources":["../../src/utils/find-action-by-definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,sBAAsB,CACrC,IAAI,EAAE,cAAc,EACpB,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,GAC5C,MAAM,GAAG,SAAS,CAqBpB"}
@@ -0,0 +1,12 @@
1
+ import { Action, PageContainer, PageDefinition } from '@judo/model-api';
2
+ /**
3
+ * Find the Action in page.actions that matches the container's onInit ActionDefinition.
4
+ * The onInit reference on PageContainer points to an ActionDefinition, and we need to
5
+ * find the corresponding Action in the page that uses that definition.
6
+ *
7
+ * @param page - The PageDefinition containing the actions array
8
+ * @param container - The PageContainer with an optional onInit reference
9
+ * @returns The matching Action, or undefined if no match is found
10
+ */
11
+ export declare function findOnInitAction(page: PageDefinition, container: PageContainer): Action | undefined;
12
+ //# sourceMappingURL=find-on-init-action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-on-init-action.d.ts","sourceRoot":"","sources":["../../src/utils/find-on-init-action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAG7E;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAEnG"}
@@ -0,0 +1,18 @@
1
+ import { VisualElement } from '@judo/model-api';
2
+ /**
3
+ * Find visual element by its @type property.
4
+ */
5
+ export declare function findVisualElementByType<T extends VisualElement = VisualElement>(elements: VisualElement | VisualElement[], type: string): T | undefined;
6
+ /**
7
+ * Find visual element by its xmi:id.
8
+ */
9
+ export declare function findVisualElementById<T extends VisualElement = VisualElement>(elements: VisualElement | VisualElement[], id: string): T | undefined;
10
+ /**
11
+ * Find visual element by its sourceId.
12
+ */
13
+ export declare function findVisualElementBySourceId<T extends VisualElement = VisualElement>(elements: VisualElement | VisualElement[], sourceId: string): T | undefined;
14
+ /**
15
+ * Flatten visual element tree to array.
16
+ */
17
+ export declare function flattenVisualElements(elements: VisualElement | VisualElement[]): VisualElement[];
18
+ //# sourceMappingURL=find-visual-element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-visual-element.d.ts","sourceRoot":"","sources":["../../src/utils/find-visual-element.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhE;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,EAC9E,QAAQ,EAAE,aAAa,GAAG,aAAa,EAAE,EACzC,IAAI,EAAE,MAAM,GACV,CAAC,GAAG,SAAS,CAiBf;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,EAC5E,QAAQ,EAAE,aAAa,GAAG,aAAa,EAAE,EACzC,EAAE,EAAE,MAAM,GACR,CAAC,GAAG,SAAS,CAiBf;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,EAClF,QAAQ,EAAE,aAAa,GAAG,aAAa,EAAE,EACzC,QAAQ,EAAE,MAAM,GACd,CAAC,GAAG,SAAS,CAiBf;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,aAAa,GAAG,aAAa,EAAE,GAAG,aAAa,EAAE,CAYhG"}
@@ -0,0 +1,104 @@
1
+ import { Axis } from '@judo/model-api';
2
+ /** Default column span for visual elements (from EMF meta-model) */
3
+ export declare const DEFAULT_COL = 4;
4
+ /** Full grid width (12-column system) */
5
+ export declare const FULL_GRID_WIDTH = 12;
6
+ /**
7
+ * Grid size configuration for responsive breakpoints.
8
+ * - xs: extra small screens (mobile)
9
+ * - sm: small screens (tablets)
10
+ * - md: medium screens and above (desktop)
11
+ */
12
+ export interface GridSize {
13
+ xs: number;
14
+ sm: number;
15
+ md?: number;
16
+ }
17
+ /**
18
+ * Calculate the scaled size for a child element based on parent's column span.
19
+ *
20
+ * **Legacy calculateSize logic:**
21
+ * - If parent spans full 12 columns: use child's col value as-is
22
+ * - If parent spans less than 12: scale proportionally (12 / parentCol) × childCol
23
+ *
24
+ * @param parentCol - Parent Flex container's column span (1-12)
25
+ * @param childCol - Child element's column span (1-12)
26
+ * @returns Calculated size (may exceed 12 if child is larger than parent)
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * calculateScaledSize(12, 6); // 6 - parent full width, child uses col as-is
31
+ * calculateScaledSize(6, 3); // 6 - (12/6) × 3 = 6
32
+ * calculateScaledSize(6, 6); // 12 - (12/6) × 6 = 12 (full width)
33
+ * calculateScaledSize(4, 2); // 6 - (12/4) × 2 = 6
34
+ * ```
35
+ */
36
+ export declare function calculateScaledSize(parentCol: number, childCol: number): number;
37
+ /**
38
+ * Calculate responsive grid size for horizontal flex layouts.
39
+ *
40
+ * **Responsive behavior:**
41
+ * - xs/sm breakpoints: always full width (12 columns) for mobile/tablet
42
+ * - md breakpoint: use calculated size for desktop
43
+ * - Optimization: omit md property if calculated size equals 12
44
+ *
45
+ * @param parentCol - Parent Flex container's column span
46
+ * @param childCol - Child element's column span
47
+ * @returns GridSize object with responsive breakpoint configuration
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * calculateHorizontalGridSize(12, 6); // { xs: 12, sm: 12, md: 6 }
52
+ * calculateHorizontalGridSize(6, 6); // { xs: 12, sm: 12 } - omits md:12
53
+ * calculateHorizontalGridSize(8, 4); // { xs: 12, sm: 12, md: 6 }
54
+ * ```
55
+ */
56
+ export declare function calculateHorizontalGridSize(parentCol: number, childCol: number): GridSize;
57
+ /**
58
+ * Calculate grid size for vertical flex layouts (Stack-based).
59
+ *
60
+ * **Vertical layout behavior:**
61
+ * - Always returns full width (12 columns) for all breakpoints
62
+ * - The `force-full-width` CSS class enforces 100% width on Stack children
63
+ * - No md breakpoint needed since width is always 100%
64
+ *
65
+ * @returns GridSize object with full width at all breakpoints
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * calculateVerticalGridSize(); // { xs: 12, sm: 12 }
70
+ * ```
71
+ */
72
+ export declare function calculateVerticalGridSize(): GridSize;
73
+ /**
74
+ * Determine if a Flex container uses vertical layout direction.
75
+ *
76
+ * @param direction - Axis enum value from Flex element
77
+ * @returns true if vertical, false if horizontal
78
+ */
79
+ export declare function isVerticalLayout(direction?: Axis): boolean;
80
+ /**
81
+ * Calculate grid size for a child element based on parent's layout direction.
82
+ *
83
+ * **Decision logic:**
84
+ * - Vertical layouts: always full width (Stack + force-full-width CSS)
85
+ * - Horizontal layouts: responsive sizing with calculated md breakpoint
86
+ *
87
+ * @param direction - Parent Flex container's direction
88
+ * @param parentCol - Parent Flex container's column span
89
+ * @param childCol - Child element's column span
90
+ * @returns GridSize object with appropriate responsive configuration
91
+ *
92
+ * @example
93
+ * ```ts
94
+ * // Vertical layout - always full width
95
+ * calculateChildGridSize('VERTICAL', 12, 6); // { xs: 12, sm: 12 }
96
+ * calculateChildGridSize('VERTICAL', 6, 3); // { xs: 12, sm: 12 }
97
+ *
98
+ * // Horizontal layout - responsive sizing
99
+ * calculateChildGridSize('HORIZONTAL', 12, 6); // { xs: 12, sm: 12, md: 6 }
100
+ * calculateChildGridSize('HORIZONTAL', 6, 3); // { xs: 12, sm: 12, md: 6 }
101
+ * ```
102
+ */
103
+ export declare function calculateChildGridSize(direction: Axis | undefined, parentCol: number, childCol: number): GridSize;
104
+ //# sourceMappingURL=flex-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flex-layout.d.ts","sourceRoot":"","sources":["../../src/utils/flex-layout.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAEvC,oEAAoE;AACpE,eAAO,MAAM,WAAW,IAAI,CAAC;AAE7B,yCAAyC;AACzC,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,CAAC,EAAE,MAAM,CAAC;CACZ;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAK/E;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAazF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,IAAI,QAAQ,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,CAAC,EAAE,IAAI,GAAG,OAAO,CAE1D;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,IAAI,GAAG,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAKjH"}
@@ -0,0 +1,33 @@
1
+ import { Action, Button } from '@judo/model-api';
2
+ /**
3
+ * Options for filtering visible buttons.
4
+ */
5
+ export interface GetVisibleButtonsOptions {
6
+ /** Whether the page is currently in edit mode (has unsaved changes) */
7
+ isEditMode?: boolean;
8
+ }
9
+ /**
10
+ * Filter buttons to only show those with matching page actions.
11
+ * A button is visible if there's a page Action whose actionDefinition
12
+ * references the same ActionDefinition as the button.
13
+ *
14
+ * Additional visibility rules:
15
+ * - UpdateActionDefinition (Save) and CancelActionDefinition (Cancel) buttons
16
+ * are only visible when isEditMode=true.
17
+ *
18
+ * @param buttons - Array of buttons to filter
19
+ * @param pageActions - Optional array of page actions to match against
20
+ * @param options - Optional visibility options
21
+ * @returns Filtered array of buttons that have matching page actions
22
+ *
23
+ * @example
24
+ * ```typescript
25
+ * const visibleButtons = getVisibleButtons(
26
+ * buttonGroup.buttons,
27
+ * page.actions,
28
+ * { isEditMode: true }
29
+ * );
30
+ * ```
31
+ */
32
+ export declare function getVisibleButtons(buttons: Button[], pageActions?: Action[], options?: GetVisibleButtonsOptions): Button[];
33
+ //# sourceMappingURL=get-visible-buttons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-visible-buttons.d.ts","sourceRoot":"","sources":["../../src/utils/get-visible-buttons.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAQtD;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACxC,uEAAuE;IACvE,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,iBAAiB,CAChC,OAAO,EAAE,MAAM,EAAE,EACjB,WAAW,CAAC,EAAE,MAAM,EAAE,EACtB,OAAO,GAAE,wBAA6B,GACpC,MAAM,EAAE,CA+CV"}
@@ -0,0 +1,13 @@
1
+ import { Icon } from '@judo/model-api';
2
+ /**
3
+ * Build a MUI `startAdornment` for a TextField-based input if the model element
4
+ * has an icon defined. Returns `undefined` when no icon is present so that callers
5
+ * can spread the result into slotProps without conditional logic.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <TextField slotProps={{ input: { startAdornment: buildIconAdornment(element.icon) } }} />
10
+ * ```
11
+ */
12
+ export declare function buildIconAdornment(icon: Icon | undefined): React.ReactNode | undefined;
13
+ //# sourceMappingURL=icon-adornment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-adornment.d.ts","sourceRoot":"","sources":["../../src/utils/icon-adornment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAI5C;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,GAAG,KAAK,CAAC,SAAS,GAAG,SAAS,CAQtF"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * MDI Icon Alias Resolution
3
+ *
4
+ * Uses a pre-generated alias map for efficient alias resolution.
5
+ * The map is generated from @mdi/svg metadata at build time.
6
+ *
7
+ * The webfont CSS only contains classes for canonical names (e.g., `mdi-note-plus`),
8
+ * not aliases (e.g., `note-add`). This module resolves aliases at runtime.
9
+ *
10
+ * Also normalizes underscores to hyphens (e.g., `delete_forever` -> `delete-forever`)
11
+ * since MDI uses hyphens but some models may use underscores.
12
+ *
13
+ * To regenerate the alias map after updating @mdi/svg:
14
+ * pnpm generate:icons
15
+ */
16
+ /**
17
+ * Resolves an icon name to its canonical MDI name.
18
+ *
19
+ * 1. Normalizes underscores to hyphens (e.g., `delete_forever` -> `delete-forever`)
20
+ * 2. If the result is an alias, returns the canonical name
21
+ * 3. Otherwise returns the normalized name unchanged
22
+ *
23
+ * @example
24
+ * resolveIconName('note-add') // returns 'note-plus' (alias resolved)
25
+ * resolveIconName('note_add') // returns 'note-plus' (normalized + alias resolved)
26
+ * resolveIconName('delete_forever') // returns 'delete-forever' (normalized)
27
+ * resolveIconName('home') // returns 'home' (already canonical)
28
+ * resolveIconName('unknown-icon') // returns 'unknown-icon' (passthrough)
29
+ */
30
+ export declare function resolveIconName(name: string): string;
31
+ /**
32
+ * Checks if a name is an alias (not a canonical icon name).
33
+ * Normalizes underscores to hyphens before checking.
34
+ */
35
+ export declare function isAlias(name: string): boolean;
36
+ /**
37
+ * Gets all aliases for a canonical icon name.
38
+ * Returns empty array if no aliases exist.
39
+ *
40
+ * Note: This requires iterating the map. For frequent lookups,
41
+ * consider caching the result.
42
+ */
43
+ export declare function getAliases(canonicalName: string): string[];
44
+ //# sourceMappingURL=mdi-alias-map.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mdi-alias-map.d.ts","sourceRoot":"","sources":["../../src/utils/mdi-alias-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAYH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGpD;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE7C;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,CAQ1D"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Generated MDI alias map - DO NOT EDIT
3
+ *
4
+ * Generated from @mdi/svg metadata
5
+ * Icons: 7447, Aliases: 6476
6
+ *
7
+ * Run: pnpm generate:icons to regenerate
8
+ */
9
+ export declare const MDI_ALIAS_MAP: Record<string, string>;
10
+ //# sourceMappingURL=mdi-alias-map.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mdi-alias-map.generated.d.ts","sourceRoot":"","sources":["../../src/utils/mdi-alias-map.generated.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA60MhD,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { PageContainer, PageContainerType } from '@judo/model-api';
2
+ /**
3
+ * Resolve the effective container type.
4
+ * In EMF/ECore, default enum values are not serialized.
5
+ * Since TABLE is the first literal (value 0), it's the default when type is not present.
6
+ *
7
+ * Separated from PageRenderer.tsx to preserve HMR boundaries.
8
+ * See: specs/HMR.md — Standard I: Single-Authority Export Mandate
9
+ */
10
+ export declare function resolveContainerType(container: PageContainer): PageContainerType;
11
+ //# sourceMappingURL=resolve-container-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-container-type.d.ts","sourceRoot":"","sources":["../../src/utils/resolve-container-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,aAAa,GAAG,iBAAiB,CAOhF"}
@@ -0,0 +1,25 @@
1
+ import { PageDefinition, RelationType } from '@judo/model-api';
2
+ /**
3
+ * Check if a page is a singleton access page.
4
+ *
5
+ * A singleton access page is an AccessViewPage whose dataElement is a RelationType with:
6
+ * - isAccess = true (it's an access relation, i.e., top-level entry point)
7
+ * - isCollection = false (there's exactly one instance, not a list)
8
+ *
9
+ * Singleton access pages don't require a signedIdentifier in the URL because
10
+ * there's only one transfer behind the relation. The transfer's signedIdentifier
11
+ * must be resolved at runtime by calling refreshAccessRelation before the
12
+ * normal onInit refresh can proceed.
13
+ *
14
+ * @param page - The PageDefinition to check
15
+ * @returns true if the page is a singleton access page
16
+ */
17
+ export declare function isSingletonAccessPage(page: PageDefinition): boolean;
18
+ /**
19
+ * Get the access relation from a singleton access page.
20
+ *
21
+ * @param page - The PageDefinition (must be a singleton access page)
22
+ * @returns The RelationType representing the access relation, or undefined
23
+ */
24
+ export declare function getSingletonAccessRelation(page: PageDefinition): RelationType | undefined;
25
+ //# sourceMappingURL=singleton-access.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"singleton-access.d.ts","sourceRoot":"","sources":["../../src/utils/singleton-access.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAenE;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,cAAc,GAAG,YAAY,GAAG,SAAS,CAKzF"}
@@ -0,0 +1,75 @@
1
+ import { Button as ButtonElement, Column } from '@judo/model-api';
2
+ import { GridColType } from '@mui/x-data-grid';
3
+ /**
4
+ * Row action types that are automatically shown inline (featured) when
5
+ * `featuredActions` is 0 (i.e., no explicit featured actions configured).
6
+ *
7
+ * Includes navigation and CRUD operations that benefit from direct visibility:
8
+ * - OpenPageActionDefinition: View/navigate to row detail page
9
+ * - RowOpenPageActionDefinition: Row-level view navigation
10
+ * - RowDeleteActionDefinition: Delete the row (requires `__deleteable` runtime check)
11
+ * - RemoveActionDefinition: Remove from relation
12
+ * - OpenSetSelectorActionDefinition: Set a relation target
13
+ * - UnsetActionDefinition: Unset a relation target
14
+ */
15
+ export declare const AUTO_FEATURED_ROW_ACTION_TYPES: Set<string>;
16
+ /**
17
+ * Maps model data types to MUI DataGrid column types.
18
+ *
19
+ * MUI DataGrid column types:
20
+ * - 'string' (default): Text values
21
+ * - 'number': Numeric values with number formatting
22
+ * - 'date': Date values (rendered with date picker)
23
+ * - 'dateTime': DateTime/Timestamp values
24
+ * - 'boolean': Boolean values (rendered with checkbox)
25
+ * - 'singleSelect': Enumeration values (dropdown)
26
+ * - 'actions': Action column (special)
27
+ *
28
+ * @param column The model Column definition
29
+ * @returns The MUI DataGrid column type
30
+ */
31
+ export declare function getColumnType(column: Column): GridColType;
32
+ /**
33
+ * Gets value options for enumeration columns.
34
+ * @param column The model Column definition
35
+ * @returns Array of value options for singleSelect type, or undefined
36
+ */
37
+ export declare function getEnumerationValueOptions(column: Column): Array<{
38
+ value: string;
39
+ label: string;
40
+ }> | undefined;
41
+ /**
42
+ * Determines if a table column is sortable.
43
+ * A column is sortable if:
44
+ * 1. It has an attributeType
45
+ * 2. The attributeType's dataType is NOT BinaryType
46
+ * 3. The attributeType's memberType is NOT TRANSIENT
47
+ */
48
+ export declare function isColumnSortable(column: Column): boolean;
49
+ /**
50
+ * Calculates the width needed for an action column based on button content.
51
+ *
52
+ * When `featuredActions` is provided, the calculation accounts for the
53
+ * featured/overflow split pattern (inline buttons + dropdown trigger):
54
+ * - featuredActions = 0: auto-CRUD mode — CRUD buttons shown inline, rest in dropdown.
55
+ * Width accounts for all CRUD buttons (worst-case, including delete).
56
+ * - featuredActions > 0: featured button widths + dropdown trigger (if overflow)
57
+ * - featuredActions >= total: all buttons inline, no dropdown (same as legacy)
58
+ *
59
+ * When `featuredActions` is not provided, all buttons are treated as inline
60
+ * (backward compatible with legacy behavior).
61
+ *
62
+ * Calculation uses actual MUI small outlined Button metrics:
63
+ * - Text width: ~6.5px per character (13px font-size, proportional sans-serif)
64
+ * - Icon width: 24px (18px icon + 8px margin - 2px offset)
65
+ * - Button padding: 18px (9px left + 9px right for small outlined)
66
+ * - Dropdown trigger: 36px (18px padding + 18px icon)
67
+ * - Spacing: 0px (ButtonGroup collapses borders)
68
+ * - Column padding: 20px (DataGrid cell padding ~10px per side)
69
+ *
70
+ * @param buttons Array of buttons to display in the action column
71
+ * @param featuredActions Number of featured actions to show inline (from ButtonGroup model)
72
+ * @returns Calculated width in pixels
73
+ */
74
+ export declare function calculateActionColumnWidth(buttons: ButtonElement[], featuredActions?: number): number;
75
+ //# sourceMappingURL=table-column-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-column-utils.d.ts","sourceRoot":"","sources":["../../src/utils/table-column-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,8BAA8B,aAOzC,CAAC;AAEH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,CAkCzD;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,CAoB9G;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAkBxD;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,aAAa,EAAE,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,CAkErG"}
@@ -0,0 +1,14 @@
1
+ import { Column } from '@judo/model-api';
2
+ import { GridFilterModel } from '@mui/x-data-grid';
3
+ /**
4
+ * Convert MUI GridFilterModel to QueryCustomizer filter format.
5
+ *
6
+ * MUI format: { items: [{ field: "name", operator: "contains", value: "John" }] }
7
+ * JUDO format: { "name": [{ operator: "like", value: "%John%" }] }
8
+ *
9
+ * @param model - MUI DataGrid filter model
10
+ * @param columns - Table columns for type information (optional)
11
+ * @returns QueryCustomizer-compatible filter object
12
+ */
13
+ export declare function convertFilterModelToQueryCustomizer(model: GridFilterModel, columns?: Column[]): Record<string, any> | undefined;
14
+ //# sourceMappingURL=table-filter-utils.d.ts.map