@proounce/shared-common 0.1.0 → 0.1.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/README.md +75 -384
- package/dist/charts/fusion.cjs +61 -3
- package/dist/charts/fusion.cjs.map +1 -1
- package/dist/charts/fusion.d.cts +15 -15
- package/dist/charts/fusion.d.ts +15 -15
- package/dist/charts/fusion.js +61 -3
- package/dist/charts/fusion.js.map +1 -1
- package/dist/grids/ag-grid.cjs +91 -16
- package/dist/grids/ag-grid.cjs.map +1 -1
- package/dist/grids/ag-grid.d.cts +4 -4
- package/dist/grids/ag-grid.d.ts +4 -4
- package/dist/grids/ag-grid.js +90 -16
- package/dist/grids/ag-grid.js.map +1 -1
- package/dist/icons/lucide.d.cts +150 -0
- package/dist/icons/lucide.d.ts +150 -0
- package/dist/index.cjs +15809 -4245
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3751 -1718
- package/dist/index.d.ts +3751 -1718
- package/dist/index.js +15539 -3133
- package/dist/index.js.map +1 -1
- package/docs/COMPATIBILITY_MATRIX.md +325 -0
- package/docs/COMPONENT_AUDIT.md +71 -153
- package/docs/LEGACY_CLOSURE.json +1143 -0
- package/package.json +25 -4
- package/dist/mui-b9ldbP0Q.d.cts +0 -306
- package/dist/mui-b9ldbP0Q.d.ts +0 -306
package/README.md
CHANGED
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
# @proounce/shared-common
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
Public npm distribution of the 185 selected, API-free exports from
|
|
4
|
+
`@gc360/shared-base-components`.
|
|
5
|
+
|
|
6
|
+
The package root is a source-faithful port from legacy commit `83e0238b`.
|
|
7
|
+
Component structure, underlying MUI/native controls, default properties,
|
|
8
|
+
styles, padding, dimensions, colors, states, icons and event behavior are
|
|
9
|
+
retained. The remaining 112 legacy exports are intentionally not published.
|
|
7
10
|
|
|
8
11
|
## Requirements
|
|
9
12
|
|
|
10
13
|
- Node.js 20 or newer
|
|
11
|
-
- React
|
|
12
|
-
- Material UI 5
|
|
13
|
-
-
|
|
14
|
-
-
|
|
14
|
+
- React and React DOM `^18.2.0`
|
|
15
|
+
- Material UI 5, MUI Icons 5, Emotion 11 and MUI X Date Pickers 5
|
|
16
|
+
- Day.js 1.11
|
|
17
|
+
- The peer dependencies used by the selected component being imported
|
|
18
|
+
|
|
19
|
+
Some faithful legacy components use `@gc360/shared-styleguide` or
|
|
20
|
+
`@gc360/shared-utilities`. They are optional npm peers so installation of this
|
|
21
|
+
public package does not fail when those packages are unavailable. Applications
|
|
22
|
+
using the affected components must provide the same GC360 packages at runtime.
|
|
23
|
+
FusionCharts, AG Grid and Lucide are likewise optional unless their components
|
|
24
|
+
or subpath entry points are used.
|
|
15
25
|
|
|
16
26
|
## Installation
|
|
17
27
|
|
|
@@ -19,413 +29,94 @@ router, and shared-utility coupling.
|
|
|
19
29
|
npm install @proounce/shared-common
|
|
20
30
|
```
|
|
21
31
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
This is a public npm package and can be downloaded without membership in the
|
|
26
|
-
`proounce` organization. It remains covered by the repository's proprietary
|
|
27
|
-
license; public availability does not grant rights beyond that license.
|
|
32
|
+
This package is publicly downloadable but remains proprietary. Public
|
|
33
|
+
availability does not grant rights beyond [the license](LICENSE).
|
|
28
34
|
|
|
29
|
-
##
|
|
35
|
+
## Usage
|
|
30
36
|
|
|
31
|
-
|
|
37
|
+
Existing imports can be migrated without changing component names:
|
|
32
38
|
|
|
33
39
|
```tsx
|
|
34
40
|
import {
|
|
35
41
|
ActionIcon,
|
|
36
42
|
AdvancedDropDownList,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
type DataTableColumn,
|
|
41
|
-
type DropDownOption,
|
|
42
|
-
} from "@proounce/shared-common";
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
The root entry point is safe to import in Node and server-rendered applications.
|
|
46
|
-
|
|
47
|
-
## Buttons and actions
|
|
48
|
-
|
|
49
|
-
`ActionIcon` and `ActionIconButton` support the action purposes carried over
|
|
50
|
-
from the legacy shared-base package.
|
|
51
|
-
|
|
52
|
-
```tsx
|
|
53
|
-
import { ActionIcon, ActionIconButton } from "@proounce/shared-common";
|
|
54
|
-
|
|
55
|
-
export function RowActions() {
|
|
56
|
-
return (
|
|
57
|
-
<>
|
|
58
|
-
<ActionIcon purpose="edit" title="Edit record" onClick={() => {}} />
|
|
59
|
-
<ActionIconButton
|
|
60
|
-
purpose="download"
|
|
61
|
-
title="Download report"
|
|
62
|
-
onClick={() => {}}
|
|
63
|
-
/>
|
|
64
|
-
</>
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
All 270 unique purposes from the legacy `action-icon-data` and
|
|
70
|
-
`action-icon-button-data` files are represented in `ActionIconData`.
|
|
71
|
-
|
|
72
|
-
## Dropdowns
|
|
73
|
-
|
|
74
|
-
Dropdown options use an `id` for the submitted value and `value` for the
|
|
75
|
-
visible label. Change events retain the legacy `{ target: { name, value } }`
|
|
76
|
-
shape to simplify migration.
|
|
77
|
-
|
|
78
|
-
```tsx
|
|
79
|
-
import {
|
|
80
|
-
AdvancedDropDownList,
|
|
81
|
-
type DropDownOption,
|
|
43
|
+
CommonTable,
|
|
44
|
+
LightTooltip,
|
|
45
|
+
StyledTableCell,
|
|
82
46
|
} from "@proounce/shared-common";
|
|
83
|
-
|
|
84
|
-
const options: DropDownOption<number>[] = [
|
|
85
|
-
{ id: 1, value: "First option" },
|
|
86
|
-
{ id: 2, value: "Second option" },
|
|
87
|
-
];
|
|
88
|
-
|
|
89
|
-
export function Example() {
|
|
90
|
-
return (
|
|
91
|
-
<AdvancedDropDownList
|
|
92
|
-
id="selection"
|
|
93
|
-
label="Selection"
|
|
94
|
-
value={1}
|
|
95
|
-
options={options}
|
|
96
|
-
onChange={(event) => console.log(event.target.value)}
|
|
97
|
-
/>
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Supported dropdown exports include:
|
|
103
|
-
|
|
104
|
-
- `AdvancedDropDownList` and `MuiAdvancedDropDownList`
|
|
105
|
-
- `StyledAdvanceDropDownList`
|
|
106
|
-
- `GenericAdvanceDropDownList` and `GenericAdvancedSelect`
|
|
107
|
-
- `DropDownList` and `DropDownWithMessage`
|
|
108
|
-
- `MultiSelectDropDownList`
|
|
109
|
-
- `GroupedMultiSelectDropDown` and `MuiGroupedMultiSelectDropDown`
|
|
110
|
-
- `FloatingAdvanceDropDownList` and `FloatingMultiSelectDropDownList`
|
|
111
|
-
- `DropDownListWithImage` for options with a visual identifier
|
|
112
|
-
- `EmailSuggestionInput`, `EmailSuggestionMuiTextBox`, and
|
|
113
|
-
`EmailSuggestionTextBox` for free-form recipient chips
|
|
114
|
-
|
|
115
|
-
## Tables
|
|
116
|
-
|
|
117
|
-
`DataTable` provides stable client-side sorting, pagination, loading skeletons,
|
|
118
|
-
custom cell rendering, row actions, and typed columns.
|
|
119
|
-
|
|
120
|
-
```tsx
|
|
121
|
-
import { DataTable, type DataTableColumn } from "@proounce/shared-common";
|
|
122
|
-
|
|
123
|
-
interface Person {
|
|
124
|
-
id: number;
|
|
125
|
-
name: string;
|
|
126
|
-
status: string;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
const columns: DataTableColumn<Person>[] = [
|
|
130
|
-
{ field: "name", header: "Name" },
|
|
131
|
-
{ field: "status", header: "Status", sortable: false },
|
|
132
|
-
];
|
|
133
|
-
|
|
134
|
-
export function PeopleTable({ rows }: { rows: Person[] }) {
|
|
135
|
-
return <DataTable rows={rows} columns={columns} getRowKey={(row) => row.id} />;
|
|
136
|
-
}
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
Legacy columns using `title` instead of `header` are also accepted. Styled
|
|
140
|
-
table cells, rows, and skeleton table bodies are exported separately. This
|
|
141
|
-
includes `StyledTableCell`, `StyledBorderedTableCell`,
|
|
142
|
-
`StyledLinesBorderedTableCell`, `StickyTableCell`, `StickyFooterTableCell`,
|
|
143
|
-
`HighlightedTableCell`, `TableCellWithInfo`, `StyledTableSortLabel`, and their
|
|
144
|
-
documented legacy aliases.
|
|
145
|
-
|
|
146
|
-
Legacy common-table contracts are available as real typed wrappers rather than
|
|
147
|
-
name-only aliases:
|
|
148
|
-
|
|
149
|
-
- `CommonTable` and `CustomTable`
|
|
150
|
-
- `CommonSearchTable`
|
|
151
|
-
- `PaginationTable` for controlled/server pagination
|
|
152
|
-
- `CommonSelectionTable`
|
|
153
|
-
- `CommonSelectionValidateTable`
|
|
154
|
-
- `CommonSelectionStickyTable` and `CustomStickyTable`
|
|
155
|
-
- `GenericCustomTable` for the shared generic selection/action modes
|
|
156
|
-
|
|
157
|
-
These wrappers accept the legacy `data`, `columns`, `title`, `sorting`,
|
|
158
|
-
`render(row)`, `primaryColId`, `selected`, and `setSelected` properties while
|
|
159
|
-
remaining API-free. New code can use `DataTable` directly.
|
|
160
|
-
|
|
161
|
-
The former generic table's nested columns are flattened to accessible leaf
|
|
162
|
-
headers. Its highly specialized column-configuration dialog and calculated
|
|
163
|
-
business totals are not silently emulated; applications should compose those
|
|
164
|
-
features through table actions and column renderers.
|
|
165
|
-
|
|
166
|
-
## Styled surfaces
|
|
167
|
-
|
|
168
|
-
Reusable styled surfaces include `StyledCard`, `StyledKpiCard`,
|
|
169
|
-
`CustomAccordion`, `CustomAccordionSummary`, `CustomAccordionDetails`,
|
|
170
|
-
`StyledTabs`, `StyledTab`, `StyledReadOnlyTextField`, and the styled table
|
|
171
|
-
primitives. All styling is theme-aware and applications can override it with
|
|
172
|
-
MUI theme configuration or `sx` properties.
|
|
173
|
-
|
|
174
|
-
## Standalone feedback and form components
|
|
175
|
-
|
|
176
|
-
The root entry point also includes standalone components missed by the first
|
|
177
|
-
migration pass:
|
|
178
|
-
|
|
179
|
-
- `StatusDialog`, `ProcessingModal`, `SuccessModal`, `ErrorModal`, and
|
|
180
|
-
`WarningModal`
|
|
181
|
-
- `ErrorPage` plus router-independent 401, 403, 404, menu-not-found, and 500
|
|
182
|
-
presets
|
|
183
|
-
- `AccessError`, `AccessLoader`, `ExpandableComment`/`CommentExpand`, and status
|
|
184
|
-
blinkers
|
|
185
|
-
- `FormulaIcon`, `FormulaInfoIcon`/`FormulaInfoWithIcon`, and
|
|
186
|
-
`NameDescriptionPopover`/`NameDescPopover`
|
|
187
|
-
- `BlueHeaderText`, `BoldText`, `ContentWrapper`, `QuestionTextWrapper`,
|
|
188
|
-
`PercentageInput`, `TextInput`, `TextInputWithLabel`,
|
|
189
|
-
`TextInputWithLabelIcon`, and `CurrencyInputWithLabelIcon`
|
|
190
|
-
- `OptionSelectorWithLabel`, `OptionMultiSelectorWithLabel`,
|
|
191
|
-
`MandatoryIndicatorWithText`, and `RequestModalGridItem`
|
|
192
|
-
- `CustomDropZone`, `MainSelector`, `TeslaStyleScrollIndicator`, and
|
|
193
|
-
`SelectWithTable`
|
|
194
|
-
- `DocumentationCard`, `AppHelp`, `CardComponent`,
|
|
195
|
-
`CardComponentWithActions`, and `OperationsInfo`
|
|
196
|
-
- `CustomTransition`, `DialogAction`, and `useDisplayOrder`
|
|
197
|
-
|
|
198
|
-
These are modern replacements rather than byte-for-byte copies. They use MUI
|
|
199
|
-
theme tokens and semantic controls instead of Tailwind classes, clickable
|
|
200
|
-
`div` elements, or unmanaged portals.
|
|
201
|
-
|
|
202
|
-
## Charts
|
|
203
|
-
|
|
204
|
-
FusionCharts is isolated in a browser-only entry point so importing the main
|
|
205
|
-
package does not evaluate browser globals during server rendering.
|
|
206
|
-
|
|
207
|
-
```tsx
|
|
208
|
-
import {
|
|
209
|
-
CommonChart,
|
|
210
|
-
ColumnChart,
|
|
211
|
-
DoughnutChart,
|
|
212
|
-
FusionChart,
|
|
213
|
-
LineChart,
|
|
214
|
-
} from "@proounce/shared-common/charts/fusion";
|
|
215
|
-
|
|
216
|
-
<ColumnChart
|
|
217
|
-
height={320}
|
|
218
|
-
dataSource={{
|
|
219
|
-
chart: { caption: "Requests" },
|
|
220
|
-
data: [{ label: "Open", value: "12" }],
|
|
221
|
-
}}
|
|
222
|
-
/>;
|
|
223
47
|
```
|
|
224
48
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
```tsx
|
|
229
|
-
<CommonChart
|
|
230
|
-
type="column2d"
|
|
231
|
-
title="Requests by status"
|
|
232
|
-
xAxisName="Status"
|
|
233
|
-
yAxisName="Requests"
|
|
234
|
-
items={[
|
|
235
|
-
{ label: "Open", value: 12 },
|
|
236
|
-
{ label: "Closed", value: 28 },
|
|
237
|
-
]}
|
|
238
|
-
showTypeSelector
|
|
239
|
-
showDataTable
|
|
240
|
-
/>
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
The chart entry point exports:
|
|
244
|
-
|
|
245
|
-
- `FusionChart` for raw FusionCharts `dataSource` configuration
|
|
246
|
-
- `CommonChart` for the shared `title`, axes and `items` contract
|
|
247
|
-
- `BarChart`, `ColumnChart`/`ChartColumn2D`, and `DoughnutChart`, accepting
|
|
248
|
-
either the legacy common contract or a raw `dataSource`
|
|
249
|
-
- `LineChart`, `AreaChart`, and `PieChart`
|
|
250
|
-
- `GenericChart`, `GenericChartCDMS`, `FusionDefaultCharts`,
|
|
251
|
-
`FusionDefaultChartsPF`, and `FusionDefaultChartsPH` compatibility exports
|
|
252
|
-
|
|
253
|
-
`CommonChart` can expose a native HTML data table as the chart alternative and
|
|
254
|
-
can provide an accessible chart-type selector. Map and congressional-map
|
|
255
|
-
packages are not loaded by this common entry point because their FusionCharts
|
|
256
|
-
map definitions are large and geography-specific.
|
|
49
|
+
The exact list and original source file for every supported name is recorded in
|
|
50
|
+
[the compatibility matrix](docs/COMPATIBILITY_MATRIX.md). Internal helper files
|
|
51
|
+
needed by those exports are bundled but are not added to the public API.
|
|
257
52
|
|
|
258
|
-
|
|
259
|
-
application. The component never requests them from an API.
|
|
260
|
-
|
|
261
|
-
## Icons
|
|
262
|
-
|
|
263
|
-
Icons use dedicated entry points:
|
|
53
|
+
## Optional entry points
|
|
264
54
|
|
|
265
55
|
```tsx
|
|
266
|
-
import {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
} from "@proounce/shared-common/
|
|
270
|
-
import { Download, Search } from "@proounce/shared-common/icons/lucide";
|
|
56
|
+
import { Add, EditOutlined } from "@proounce/shared-common/icons/mui";
|
|
57
|
+
import { Search, X } from "@proounce/shared-common/icons/lucide";
|
|
58
|
+
import { FusionChart } from "@proounce/shared-common/charts/fusion";
|
|
59
|
+
import { CustomGridTable } from "@proounce/shared-common/grids/ag-grid";
|
|
271
60
|
```
|
|
272
61
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
contains a curated UI/action set. Neither entry point wildcard-exports its
|
|
276
|
-
underlying icon library.
|
|
62
|
+
Only the curated icons required by the shared components and action registries
|
|
63
|
+
are exported; the package does not duplicate the complete MUI icon library.
|
|
277
64
|
|
|
278
|
-
|
|
279
|
-
consuming application. Import an icon only when the application renders that
|
|
280
|
-
icon itself, using the curated `icons/mui` or `icons/lucide` subpath.
|
|
65
|
+
## Compatibility policy
|
|
281
66
|
|
|
282
|
-
|
|
67
|
+
A matching export name is not treated as proof of compatibility. The porting
|
|
68
|
+
source of truth is the original implementation at commit `83e0238b`. The
|
|
69
|
+
materializer preserves its dependency closure and rewrites only:
|
|
283
70
|
|
|
284
|
-
|
|
285
|
-
|
|
71
|
+
- self-package imports to their original concrete modules;
|
|
72
|
+
- extensionless FusionCharts file imports to the same `.js` files required by
|
|
73
|
+
Node ESM resolution;
|
|
74
|
+
- removal of the unreachable first `pagination` prop in `CustomGridTable`.
|
|
75
|
+
The later `pagination={enablePagination}` already overrode it in every legacy
|
|
76
|
+
render, so this removes a build warning without changing runtime behavior.
|
|
286
77
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
78
|
+
Accessibility behavior is the behavior present in the source baseline. A
|
|
79
|
+
consumer application must still perform WCAG testing for its theme, content,
|
|
80
|
+
responsive layout, focus order and complete user journeys.
|
|
290
81
|
|
|
291
|
-
|
|
292
|
-
import {
|
|
293
|
-
CustomGridHeaderCellWithInfo,
|
|
294
|
-
CustomGridTable,
|
|
295
|
-
type ColDef,
|
|
296
|
-
} from "@proounce/shared-common/grids/ag-grid";
|
|
297
|
-
|
|
298
|
-
interface Person {
|
|
299
|
-
id: string;
|
|
300
|
-
name: string;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
const columns: ColDef<Person>[] = [
|
|
304
|
-
{ field: "name", headerName: "Name" },
|
|
305
|
-
];
|
|
306
|
-
|
|
307
|
-
<CustomGridTable
|
|
308
|
-
ariaLabel="People"
|
|
309
|
-
data={[{ id: "1", name: "Ada" }]}
|
|
310
|
-
columns={columns}
|
|
311
|
-
getRowId={({ data }) => data.id}
|
|
312
|
-
enableSelection
|
|
313
|
-
onSelect={(rows) => console.log(rows)}
|
|
314
|
-
/>;
|
|
315
|
-
```
|
|
316
|
-
|
|
317
|
-
The wrapper targets the platform's AG Grid 34 line and supplies community
|
|
318
|
-
modules directly to the grid. It supports pinned totals, loading state,
|
|
319
|
-
optional pagination, typed column definitions and keyboard-accessible multi-row
|
|
320
|
-
selection. `CustomGridHeaderCellWithInfo`
|
|
321
|
-
provides sortable headers with accessible information and formula actions.
|
|
322
|
-
Applications should always provide `getRowId` when rows can be reordered or
|
|
323
|
-
updated.
|
|
324
|
-
|
|
325
|
-
## Main component groups
|
|
326
|
-
|
|
327
|
-
- Actions, buttons, and icon buttons
|
|
328
|
-
- Text, search, select, date, textarea, and checkbox inputs
|
|
329
|
-
- Single, multiple, grouped, floating, and searchable dropdowns
|
|
330
|
-
- Data tables and styled table primitives
|
|
331
|
-
- Labels, read-only values, and mandatory indicators
|
|
332
|
-
- Tooltips, alerts, loading spinners, and skeletons
|
|
333
|
-
- Tabs, tab panels, toggle buttons, and switches
|
|
334
|
-
- Confirmation dialogs
|
|
335
|
-
- FusionCharts wrappers and presets
|
|
336
|
-
- File input, empty/error states, skip links and live regions
|
|
337
|
-
- Status dialogs, error-page presets, expandable comments and formula details
|
|
338
|
-
|
|
339
|
-
## Legacy compatibility
|
|
340
|
-
|
|
341
|
-
Common legacy names are retained where the new component has an equivalent:
|
|
342
|
-
|
|
343
|
-
- `Button` and `StyledButton` map to `SharedButton`
|
|
344
|
-
- `IconButton` maps to `SharedIconButton`
|
|
345
|
-
- `TextField` and `StyledTextField` map to `SharedTextField`
|
|
346
|
-
- `DatePicker` and `NormalDatePicker` map to `DateInput`
|
|
347
|
-
- `CommonTable` and `CustomTable` are typed wrappers around the modern table
|
|
348
|
-
primitives and retain their legacy column contract
|
|
349
|
-
|
|
350
|
-
Application-bound screens, review/reporting workflows, user app bars, Redux
|
|
351
|
-
hooks, and components importing `@gc360/shared-utilities` are intentionally not
|
|
352
|
-
included.
|
|
353
|
-
|
|
354
|
-
The package also does not re-export generic MUI components, `dayjs`, adapters,
|
|
355
|
-
or styling functions. Applications should import those from their owning
|
|
356
|
-
packages. This prevents version ambiguity and keeps the public API focused on
|
|
357
|
-
components maintained here.
|
|
358
|
-
|
|
359
|
-
## Local development
|
|
82
|
+
## Development and verification
|
|
360
83
|
|
|
361
84
|
```sh
|
|
362
|
-
npm ci
|
|
363
|
-
npm run
|
|
85
|
+
npm ci --legacy-peer-deps
|
|
86
|
+
npm run audit:legacy-closure
|
|
87
|
+
npm run port:legacy
|
|
88
|
+
npm run typecheck
|
|
89
|
+
npm run build
|
|
364
90
|
npm pack --dry-run
|
|
365
91
|
```
|
|
366
92
|
|
|
367
93
|
| Command | Purpose |
|
|
368
94
|
| --- | --- |
|
|
369
|
-
| `npm run
|
|
370
|
-
| `npm run
|
|
371
|
-
| `npm run
|
|
372
|
-
| `npm
|
|
373
|
-
|
|
374
|
-
|
|
95
|
+
| `npm run audit:legacy-closure` | Resolve private helpers and dependencies required by the 185 exports |
|
|
96
|
+
| `npm run port:legacy` | Materialize the faithful source tree from the pinned commit |
|
|
97
|
+
| `npm run audit:compatibility` | Reconcile package names with the legacy public barrel |
|
|
98
|
+
| `npm run typecheck` | Validate TypeScript and declaration inputs |
|
|
99
|
+
| `npm run build` | Generate ESM, CommonJS, declarations and source maps |
|
|
100
|
+
| `npm run check` | Run package validation and the production build |
|
|
375
101
|
|
|
376
|
-
|
|
102
|
+
Generated `dist/` files must not be edited manually.
|
|
377
103
|
|
|
378
|
-
|
|
379
|
-
names, shared buttons meet a 40px minimum target, MUI widgets retain keyboard
|
|
380
|
-
and focus behavior, form errors are textual, table rows support keyboard
|
|
381
|
-
activation, tabs can be explicitly linked to panels, and dialogs use MUI focus
|
|
382
|
-
management. Representative components are checked with axe-core in `npm test`;
|
|
383
|
-
the current suite covers 15 component and interaction scenarios.
|
|
104
|
+
## Publishing
|
|
384
105
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
106
|
+
```sh
|
|
107
|
+
npm login --auth-type=web
|
|
108
|
+
npm whoami
|
|
109
|
+
npm ci --legacy-peer-deps
|
|
110
|
+
npm run check
|
|
111
|
+
npm publish --access public
|
|
391
112
|
```
|
|
392
113
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
but are never exposed as the control's accessible name. A visible label remains
|
|
397
|
-
the preferred choice; backup names protect legacy and dynamically composed
|
|
398
|
-
screens from producing unnamed controls.
|
|
399
|
-
|
|
400
|
-
Automated checks cannot establish conformance for an application. Consumers
|
|
401
|
-
must test their theme contrast, content, responsive layouts, focus order,
|
|
402
|
-
validation flows, charts, and end-to-end journeys with keyboard and assistive
|
|
403
|
-
technology.
|
|
404
|
-
|
|
405
|
-
See [the component audit](docs/COMPONENT_AUDIT.md) for migration coverage,
|
|
406
|
-
intentional exclusions, and compatibility decisions.
|
|
407
|
-
|
|
408
|
-
## Jenkins publishing
|
|
409
|
-
|
|
410
|
-
The included `Jenkinsfile` performs these stages:
|
|
411
|
-
|
|
412
|
-
1. Checkout the repository.
|
|
413
|
-
2. Optionally apply a patch, minor, or major version bump.
|
|
414
|
-
3. Install dependencies with `npm ci`.
|
|
415
|
-
4. Type-check, build, and inspect the npm package.
|
|
416
|
-
5. Request manual approval when publishing is enabled.
|
|
417
|
-
6. Publish the public scoped package to npm.
|
|
418
|
-
|
|
419
|
-
Configure a Jenkins secret-text credential named `npm-token` using a token
|
|
420
|
-
owned by an authorized publisher. That npm user must have permission to publish
|
|
421
|
-
packages in the `proounce` organization. Publishing is disabled by default;
|
|
422
|
-
enable the `PUBLISH_TO_NPM` parameter for a release build.
|
|
423
|
-
The pipeline removes its temporary npm authentication file after completion.
|
|
424
|
-
The package is published with public visibility. Installation does not require
|
|
425
|
-
an npm organization membership or authentication token.
|
|
114
|
+
The Jenkins pipeline installs, validates, requests approval and publishes
|
|
115
|
+
`@proounce/shared-common`. Configure its credentials for the authorized npm
|
|
116
|
+
publishing account and use trusted or staged publishing where available.
|
|
426
117
|
|
|
427
|
-
##
|
|
118
|
+
## Audit documents
|
|
428
119
|
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
120
|
+
- [Compatibility matrix](docs/COMPATIBILITY_MATRIX.md)
|
|
121
|
+
- [Component audit](docs/COMPONENT_AUDIT.md)
|
|
122
|
+
- [Resolved legacy dependency closure](docs/LEGACY_CLOSURE.json)
|
package/dist/charts/fusion.cjs
CHANGED
|
@@ -7,8 +7,9 @@ var react = require('react');
|
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
var MenuItem = require('@mui/material/MenuItem');
|
|
9
9
|
var Stack = require('@mui/material/Stack');
|
|
10
|
-
var TextField = require('@mui/material/TextField');
|
|
11
10
|
var Typography = require('@mui/material/Typography');
|
|
11
|
+
var TextField = require('@mui/material/TextField');
|
|
12
|
+
require('@mui/material/FormControl');
|
|
12
13
|
|
|
13
14
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
15
|
|
|
@@ -17,8 +18,8 @@ var charts__default = /*#__PURE__*/_interopDefault(charts);
|
|
|
17
18
|
var ReactFusioncharts__default = /*#__PURE__*/_interopDefault(ReactFusioncharts);
|
|
18
19
|
var MenuItem__default = /*#__PURE__*/_interopDefault(MenuItem);
|
|
19
20
|
var Stack__default = /*#__PURE__*/_interopDefault(Stack);
|
|
20
|
-
var TextField__default = /*#__PURE__*/_interopDefault(TextField);
|
|
21
21
|
var Typography__default = /*#__PURE__*/_interopDefault(Typography);
|
|
22
|
+
var TextField__default = /*#__PURE__*/_interopDefault(TextField);
|
|
22
23
|
|
|
23
24
|
// src/charts/FusionChart.tsx
|
|
24
25
|
var fusionRegistered = false;
|
|
@@ -84,6 +85,63 @@ var FusionDefaultCharts = FusionChart;
|
|
|
84
85
|
var GenericChartCDMS = FusionChart;
|
|
85
86
|
var FusionDefaultChartsPF = FusionChart;
|
|
86
87
|
var FusionDefaultChartsPH = FusionChart;
|
|
88
|
+
|
|
89
|
+
// src/accessibility/controlNames.ts
|
|
90
|
+
function humanizeControlName(value) {
|
|
91
|
+
const normalized = value?.replace(/[_-]+/g, " ").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/\s+/g, " ").trim();
|
|
92
|
+
return normalized ? normalized.charAt(0).toUpperCase() + normalized.slice(1) : void 0;
|
|
93
|
+
}
|
|
94
|
+
function resolveControlName({
|
|
95
|
+
label,
|
|
96
|
+
ariaLabel,
|
|
97
|
+
name,
|
|
98
|
+
id,
|
|
99
|
+
backupName
|
|
100
|
+
}) {
|
|
101
|
+
if (typeof label === "string" && label.trim()) return label.trim();
|
|
102
|
+
if (typeof ariaLabel === "string" && ariaLabel.trim()) return ariaLabel.trim();
|
|
103
|
+
return humanizeControlName(name) ?? humanizeControlName(id) ?? backupName;
|
|
104
|
+
}
|
|
105
|
+
function SharedTextField({
|
|
106
|
+
size = "small",
|
|
107
|
+
variant = "outlined",
|
|
108
|
+
InputLabelProps,
|
|
109
|
+
inputProps,
|
|
110
|
+
id,
|
|
111
|
+
name,
|
|
112
|
+
label,
|
|
113
|
+
backupName = "Text input",
|
|
114
|
+
...props
|
|
115
|
+
}) {
|
|
116
|
+
const generatedId = react.useId().replace(/:/g, "");
|
|
117
|
+
const controlId = id ?? `shared-text-field-${generatedId}`;
|
|
118
|
+
const accessibleName = resolveControlName({
|
|
119
|
+
label,
|
|
120
|
+
ariaLabel: inputProps?.["aria-label"],
|
|
121
|
+
name,
|
|
122
|
+
id,
|
|
123
|
+
backupName
|
|
124
|
+
});
|
|
125
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
126
|
+
TextField__default.default,
|
|
127
|
+
{
|
|
128
|
+
fullWidth: true,
|
|
129
|
+
size,
|
|
130
|
+
variant,
|
|
131
|
+
id: controlId,
|
|
132
|
+
name,
|
|
133
|
+
label,
|
|
134
|
+
InputLabelProps: { shrink: true, ...InputLabelProps },
|
|
135
|
+
inputProps: {
|
|
136
|
+
autoComplete: "off",
|
|
137
|
+
"data-gramm": "false",
|
|
138
|
+
...!label && !inputProps?.["aria-labelledby"] ? { "aria-label": accessibleName } : {},
|
|
139
|
+
...inputProps
|
|
140
|
+
},
|
|
141
|
+
...props
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
}
|
|
87
145
|
var DEFAULT_CHART_TYPES = [
|
|
88
146
|
{ value: "column2d", label: "Column" },
|
|
89
147
|
{ value: "bar2d", label: "Bar" },
|
|
@@ -152,7 +210,7 @@ function CommonChart({
|
|
|
152
210
|
children: [
|
|
153
211
|
title ? /* @__PURE__ */ jsxRuntime.jsx(Typography__default.default, { component: "h2", variant: "h6", children: title }) : null,
|
|
154
212
|
showTypeSelector ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
155
|
-
|
|
213
|
+
SharedTextField,
|
|
156
214
|
{
|
|
157
215
|
select: true,
|
|
158
216
|
size: "small",
|