@proounce/shared-common 0.0.0-stage → 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.
- package/LICENSE +16 -0
- package/README.md +430 -2
- package/dist/charts/fusion.cjs +252 -0
- package/dist/charts/fusion.cjs.map +1 -0
- package/dist/charts/fusion.d.cts +78 -0
- package/dist/charts/fusion.d.ts +78 -0
- package/dist/charts/fusion.js +220 -0
- package/dist/charts/fusion.js.map +1 -0
- package/dist/grids/ag-grid.cjs +167 -0
- package/dist/grids/ag-grid.cjs.map +1 -0
- package/dist/grids/ag-grid.d.cts +45 -0
- package/dist/grids/ag-grid.d.ts +45 -0
- package/dist/grids/ag-grid.js +152 -0
- package/dist/grids/ag-grid.js.map +1 -0
- package/dist/icons/lucide.cjs +104 -0
- package/dist/icons/lucide.cjs.map +1 -0
- package/dist/icons/lucide.d.cts +1 -0
- package/dist/icons/lucide.d.ts +1 -0
- package/dist/icons/lucide.js +3 -0
- package/dist/icons/lucide.js.map +1 -0
- package/dist/icons/mui.cjs +1106 -0
- package/dist/icons/mui.cjs.map +1 -0
- package/dist/icons/mui.d.cts +150 -0
- package/dist/icons/mui.d.ts +150 -0
- package/dist/icons/mui.js +152 -0
- package/dist/icons/mui.js.map +1 -0
- package/dist/index.cjs +4468 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1779 -0
- package/dist/index.d.ts +1779 -0
- package/dist/index.js +3371 -0
- package/dist/index.js.map +1 -0
- package/dist/mui-b9ldbP0Q.d.cts +306 -0
- package/dist/mui-b9ldbP0Q.d.ts +306 -0
- package/docs/COMPONENT_AUDIT.md +158 -0
- package/package.json +124 -4
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Shared component audit
|
|
2
|
+
|
|
3
|
+
This audit compares `@proounce/shared-common` with the exports in
|
|
4
|
+
`prj241001_fe_shared-base-components`. The migration boundary is reusable,
|
|
5
|
+
presentation-focused components with no API, Redux, router, authentication, or
|
|
6
|
+
application-service dependency.
|
|
7
|
+
|
|
8
|
+
## Included component families
|
|
9
|
+
|
|
10
|
+
| Family | Main exports |
|
|
11
|
+
| --- | --- |
|
|
12
|
+
| Accessibility | `SkipLink`, `LiveRegion`, `VisuallyHidden` |
|
|
13
|
+
| Actions | `ActionIcon`, `ActionIconButton`, `ActionsContainer` |
|
|
14
|
+
| Buttons | `SharedButton`, `SharedIconButton` |
|
|
15
|
+
| Text inputs | `SharedTextField`, `SearchInput`, `TextFieldWithIcon`, `CurrencyInput` |
|
|
16
|
+
| Choice inputs | `SelectInput`, `AdvancedDropDownList`, `DropDownList`, `MultiSelectDropDownList` |
|
|
17
|
+
| Date inputs | `DateInput`, `DateTimeInput` |
|
|
18
|
+
| File inputs | `FileInput`, `CustomDropZone` |
|
|
19
|
+
| Tables | `DataTable`, legacy common/search/pagination/selection wrappers, `TableWrapper`, bordered/sticky/highlighted/info cells, sortable labels, styled rows and skeletons |
|
|
20
|
+
| Forms | Labels, mandatory indicator, checkbox, textarea, read-only values and single/multi option selectors |
|
|
21
|
+
| Feedback | Alerts, spinner, status indicator, empty/error states and information tooltip |
|
|
22
|
+
| Navigation | Tabs, tab panels, back button, breadcrumbs, main selector, scroll indicator, toggles and switches |
|
|
23
|
+
| Layout | `Page`, `PanelWrapper` |
|
|
24
|
+
| Styled surfaces | Theme-aware card, KPI card, accordion, tabs and read-only text field |
|
|
25
|
+
| Dialogs | `Modal`, `ConfirmDialog` |
|
|
26
|
+
| Status dialogs | Accessible processing, success, error and warning dialogs |
|
|
27
|
+
| Display | Date/time, signed currency/percentage, direction indicators, documentation/help cards, summary cards and operations details |
|
|
28
|
+
| Standalone display | Expandable comments, formula/name popovers and status blinkers |
|
|
29
|
+
| Error states | Access feedback and router-independent 401/403/404/500 pages |
|
|
30
|
+
| Generic request primitives | Header/body text, content wrapper, percentage and labeled text inputs |
|
|
31
|
+
| Charts | Raw `FusionChart`, `CommonChart`, selectable chart types, accessible data fallback, bar/column/doughnut/line/area/pie presets and legacy generic/default aliases |
|
|
32
|
+
| AG Grid | Optional `CustomGridTable`/`AgGridTable`, accessible info/formula header, wrapper and public AG Grid types |
|
|
33
|
+
| Icons | Curated MUI action registry and curated Lucide action set |
|
|
34
|
+
|
|
35
|
+
The complete set of 270 unique legacy action purposes is represented.
|
|
36
|
+
|
|
37
|
+
## Final public-export reconciliation
|
|
38
|
+
|
|
39
|
+
The final audit parsed every active `export { default as Name }` declaration in
|
|
40
|
+
the legacy public barrel and compared it with the root, FusionCharts and AG Grid
|
|
41
|
+
entry points in this package:
|
|
42
|
+
|
|
43
|
+
| Result | Count |
|
|
44
|
+
| --- | ---: |
|
|
45
|
+
| Unique legacy named default re-exports | 297 |
|
|
46
|
+
| Exact public-name matches in this package | 185 |
|
|
47
|
+
| Intentionally not copied | 112 |
|
|
48
|
+
|
|
49
|
+
The 112 unmatched names are not overlooked standalone primitives. They are
|
|
50
|
+
application/auth/reporting/review workflows; Redux, API and routing hooks;
|
|
51
|
+
heavy editors, viewers, calendars and geography bundles; obsolete alternate
|
|
52
|
+
table/grid implementations already covered by the typed common-table or AG Grid
|
|
53
|
+
entries; or raw third-party pass-throughs such as date adapters, `dayjs`,
|
|
54
|
+
Mammoth and JSZip. Named exports from raw MUI and Redux libraries were also
|
|
55
|
+
reviewed but are deliberately not duplicated by this package.
|
|
56
|
+
|
|
57
|
+
The final pass added the reusable gaps that remained: choice selectors,
|
|
58
|
+
`CustomDropZone`, `MainSelector`, `TeslaStyleScrollIndicator`, documentation
|
|
59
|
+
cards, KPI cards, `SelectWithTable`, request-form helpers, legacy currency and
|
|
60
|
+
styled-cell aliases, label/help icons, summary cards, and `OperationsInfo`.
|
|
61
|
+
|
|
62
|
+
## Legacy manifest review
|
|
63
|
+
|
|
64
|
+
The legacy manifest was reviewed dependency by dependency. The new package
|
|
65
|
+
keeps only dependencies required by API-free components:
|
|
66
|
+
|
|
67
|
+
| Legacy dependency area | Decision |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| React 18.2+, MUI 5, Emotion 11, MUI icons 5 | Required peers aligned with the shared-base package and consuming applications |
|
|
70
|
+
| MUI date pickers 5 and Day.js 1.11 | Required peers because date inputs are in the root entry |
|
|
71
|
+
| FusionCharts | Optional peer isolated to `charts/fusion` |
|
|
72
|
+
| AG Grid Community 34 | Optional peer isolated to `grids/ag-grid` |
|
|
73
|
+
| Lucide 0.561 | Optional peer isolated to `icons/lucide` |
|
|
74
|
+
| Redux, router and single-spa | Excluded; application architecture, not presentation primitives |
|
|
75
|
+
| MUI Lab, legacy `@mui/styles`, MUI Data Grid | Excluded; no retained component requires them |
|
|
76
|
+
| Editors, viewers, HLS, calendar and drag/drop | Excluded from base; see optional-package guidance below |
|
|
77
|
+
| Currency/number-format wrappers | Replaced with typed MUI/`Intl` primitives where equivalent |
|
|
78
|
+
|
|
79
|
+
Raw MUI controls, date adapters, `dayjs`, and utility libraries are not
|
|
80
|
+
re-exported. Consumers import them from their owning packages, avoiding a
|
|
81
|
+
second public API surface that this package cannot safely version.
|
|
82
|
+
|
|
83
|
+
## Intentionally excluded
|
|
84
|
+
|
|
85
|
+
These are not missing base primitives; they are outside this package boundary.
|
|
86
|
+
|
|
87
|
+
| Legacy area | Reason |
|
|
88
|
+
| --- | --- |
|
|
89
|
+
| User app bar, authorization wrappers and permission screens | Application/authentication behavior |
|
|
90
|
+
| Redux store, selectors and data-fetching hooks | State and API coupling |
|
|
91
|
+
| Reporting, reviews, spend-plan and BOB screens | Domain workflows rather than reusable primitives |
|
|
92
|
+
| Notification center and application menus | Application data, routing and business rules |
|
|
93
|
+
| Request actions and status rails | Workflow-specific state transitions |
|
|
94
|
+
| Audit, organization and LOV workflow modals | Shared-utility and domain-model coupling |
|
|
95
|
+
| `useTimeZone` and other data hooks | Direct service/API calls |
|
|
96
|
+
| Ticket creation and application-menu workflows | Application navigation, state and service behavior |
|
|
97
|
+
|
|
98
|
+
## Separate optional packages recommended
|
|
99
|
+
|
|
100
|
+
The following components are reusable in principle, but should not be placed in
|
|
101
|
+
the base entry point because they have large runtimes, browser workers, licensing,
|
|
102
|
+
or specialized security/update requirements:
|
|
103
|
+
|
|
104
|
+
- CKEditor and SunEditor
|
|
105
|
+
- PDF, Word, Excel and ZIP viewers
|
|
106
|
+
- HLS video player
|
|
107
|
+
- Calendar scheduler
|
|
108
|
+
- Rich dropzone/dialog workflows
|
|
109
|
+
- USA state and congressional map bundles (publish as a geography-specific chart subpath)
|
|
110
|
+
|
|
111
|
+
If required, publish these as optional subpath entries or separate packages so
|
|
112
|
+
ordinary consumers do not install and evaluate them.
|
|
113
|
+
|
|
114
|
+
## Compatibility caveats
|
|
115
|
+
|
|
116
|
+
- Legacy aliases are provided only where the behavior is genuinely equivalent.
|
|
117
|
+
- `FileInput` replaces the basic file-selection use case. It is not falsely
|
|
118
|
+
exported as a drag-and-drop dialog.
|
|
119
|
+
- `Modal` is not exported as `DraggableModal`; a draggable implementation must
|
|
120
|
+
also provide a non-drag interaction to satisfy WCAG 2.2 dragging guidance.
|
|
121
|
+
- Domain-specific tables should compose `DataTable` instead of being copied into
|
|
122
|
+
the base package.
|
|
123
|
+
|
|
124
|
+
## Accessibility status
|
|
125
|
+
|
|
126
|
+
The primitives provide WCAG 2.2-oriented semantics and interaction foundations:
|
|
127
|
+
|
|
128
|
+
- visible labels and linked error/help text;
|
|
129
|
+
- readable `backupName` fallbacks when legacy callers omit label/name/id,
|
|
130
|
+
without exposing generated DOM IDs as accessible names;
|
|
131
|
+
- keyboard-operable actions, tables, comboboxes, tabs and dialogs;
|
|
132
|
+
- visible MUI focus indicators;
|
|
133
|
+
- minimum 40px shared button targets;
|
|
134
|
+
- dialog names, close paths and MUI focus management;
|
|
135
|
+
- live-region, skip-link and visually-hidden helpers;
|
|
136
|
+
- text equivalents for status, trend and error information;
|
|
137
|
+
- automated axe-core checks for representative components.
|
|
138
|
+
|
|
139
|
+
This does not certify a consuming application as WCAG conformant. Applications
|
|
140
|
+
must still verify content, color contrast under their theme, zoom/reflow,
|
|
141
|
+
heading order, focus order, validation behavior, chart alternatives, responsive
|
|
142
|
+
layouts, and complete user journeys with keyboard and assistive technology.
|
|
143
|
+
|
|
144
|
+
## React and package-quality review
|
|
145
|
+
|
|
146
|
+
- Rendering remains pure; FusionCharts registration and licensing happen in
|
|
147
|
+
effects, and the optional entry is not evaluated by root imports.
|
|
148
|
+
- State updates caused by user actions occur in event handlers. Chart type
|
|
149
|
+
selection no longer mirrors props through a synchronization effect.
|
|
150
|
+
- List keys use domain identifiers wherever one exists. Table consumers should
|
|
151
|
+
provide `getRowKey`, and AG Grid consumers should provide `getRowId`, whenever
|
|
152
|
+
records can move or update.
|
|
153
|
+
- Components receive data and callbacks through props and do not fetch data,
|
|
154
|
+
read Redux state, or navigate directly.
|
|
155
|
+
- Memoization is reserved for the expensive AG Grid boundary rather than added
|
|
156
|
+
indiscriminately to every primitive.
|
|
157
|
+
- The package publishes ESM, CommonJS, declarations and source maps with an
|
|
158
|
+
explicit exports map; optional runtimes remain behind subpath exports.
|
package/package.json
CHANGED
|
@@ -1,6 +1,126 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proounce/shared-common",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "API-free shared React components for GC360 applications",
|
|
5
|
+
"author": "Proounce",
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"sideEffects": false,
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"README.md",
|
|
12
|
+
"docs",
|
|
13
|
+
"LICENSE"
|
|
14
|
+
],
|
|
15
|
+
"main": "./dist/index.cjs",
|
|
16
|
+
"module": "./dist/index.js",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"node": "./dist/index.cjs",
|
|
22
|
+
"import": "./dist/index.js",
|
|
23
|
+
"require": "./dist/index.cjs"
|
|
24
|
+
},
|
|
25
|
+
"./icons/mui": {
|
|
26
|
+
"types": "./dist/icons/mui.d.ts",
|
|
27
|
+
"node": "./dist/icons/mui.cjs",
|
|
28
|
+
"import": "./dist/icons/mui.js",
|
|
29
|
+
"require": "./dist/icons/mui.cjs"
|
|
30
|
+
},
|
|
31
|
+
"./icons/lucide": {
|
|
32
|
+
"types": "./dist/icons/lucide.d.ts",
|
|
33
|
+
"node": "./dist/icons/lucide.cjs",
|
|
34
|
+
"import": "./dist/icons/lucide.js",
|
|
35
|
+
"require": "./dist/icons/lucide.cjs"
|
|
36
|
+
},
|
|
37
|
+
"./charts/fusion": {
|
|
38
|
+
"types": "./dist/charts/fusion.d.ts",
|
|
39
|
+
"node": "./dist/charts/fusion.cjs",
|
|
40
|
+
"import": "./dist/charts/fusion.js",
|
|
41
|
+
"require": "./dist/charts/fusion.cjs"
|
|
42
|
+
},
|
|
43
|
+
"./grids/ag-grid": {
|
|
44
|
+
"types": "./dist/grids/ag-grid.d.ts",
|
|
45
|
+
"node": "./dist/grids/ag-grid.cjs",
|
|
46
|
+
"import": "./dist/grids/ag-grid.js",
|
|
47
|
+
"require": "./dist/grids/ag-grid.cjs"
|
|
48
|
+
},
|
|
49
|
+
"./package.json": "./package.json"
|
|
50
|
+
},
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"access": "public",
|
|
53
|
+
"registry": "https://registry.npmjs.org/"
|
|
54
|
+
},
|
|
55
|
+
"scripts": {
|
|
56
|
+
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
57
|
+
"build": "npm run clean && tsup",
|
|
58
|
+
"typecheck": "tsc --noEmit",
|
|
59
|
+
"test": "vitest run",
|
|
60
|
+
"check": "npm run typecheck && npm test && npm run build",
|
|
61
|
+
"prepack": "npm run check"
|
|
62
|
+
},
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"@emotion/react": "^11.11.4",
|
|
65
|
+
"@emotion/styled": "^11.11.5",
|
|
66
|
+
"@mui/icons-material": "^5.15.18",
|
|
67
|
+
"@mui/material": "^5.15.18",
|
|
68
|
+
"@mui/x-date-pickers": "^5.0.20",
|
|
69
|
+
"ag-grid-community": "^34.2.0",
|
|
70
|
+
"ag-grid-react": "^34.2.0",
|
|
71
|
+
"dayjs": "^1.11.7",
|
|
72
|
+
"fusioncharts": "^3.23.0",
|
|
73
|
+
"lucide-react": "^0.561.0",
|
|
74
|
+
"react": "^18.2.0",
|
|
75
|
+
"react-dom": "^18.2.0",
|
|
76
|
+
"react-fusioncharts": "^4.1.0"
|
|
77
|
+
},
|
|
78
|
+
"peerDependenciesMeta": {
|
|
79
|
+
"fusioncharts": {
|
|
80
|
+
"optional": true
|
|
81
|
+
},
|
|
82
|
+
"lucide-react": {
|
|
83
|
+
"optional": true
|
|
84
|
+
},
|
|
85
|
+
"react-fusioncharts": {
|
|
86
|
+
"optional": true
|
|
87
|
+
},
|
|
88
|
+
"ag-grid-community": {
|
|
89
|
+
"optional": true
|
|
90
|
+
},
|
|
91
|
+
"ag-grid-react": {
|
|
92
|
+
"optional": true
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"devDependencies": {
|
|
96
|
+
"@emotion/react": "^11.11.4",
|
|
97
|
+
"@emotion/styled": "^11.11.5",
|
|
98
|
+
"@mui/icons-material": "^5.15.18",
|
|
99
|
+
"@mui/material": "^5.15.18",
|
|
100
|
+
"@mui/x-date-pickers": "^5.0.20",
|
|
101
|
+
"ag-grid-community": "^34.2.0",
|
|
102
|
+
"ag-grid-react": "^34.2.0",
|
|
103
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
104
|
+
"@testing-library/react": "^15.0.7",
|
|
105
|
+
"@testing-library/user-event": "^14.6.9",
|
|
106
|
+
"@types/react": "^18.2.21",
|
|
107
|
+
"@types/react-dom": "^18.2.25",
|
|
108
|
+
"axe-core": "^4.14.0",
|
|
109
|
+
"dayjs": "^1.11.19",
|
|
110
|
+
"fusioncharts": "^3.23.0",
|
|
111
|
+
"jsdom": "^31.0.0",
|
|
112
|
+
"lucide-react": "^0.561.0",
|
|
113
|
+
"react": "^18.2.0",
|
|
114
|
+
"react-dom": "^18.2.0",
|
|
115
|
+
"react-fusioncharts": "^4.1.0",
|
|
116
|
+
"tsup": "^8.5.1",
|
|
117
|
+
"typescript": "^5.9.3",
|
|
118
|
+
"vitest": "^5.1.0"
|
|
119
|
+
},
|
|
120
|
+
"engines": {
|
|
121
|
+
"node": ">=20"
|
|
122
|
+
},
|
|
123
|
+
"overrides": {
|
|
124
|
+
"esbuild": "^0.28.2"
|
|
125
|
+
}
|
|
126
|
+
}
|