@j2-health/design-system 0.3.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +84 -31
- package/dist/index.cjs +4 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/src/components/alert/Alert.cjs +12 -2
- package/dist/src/components/alert/Alert.cjs.map +1 -1
- package/dist/src/components/alert/Alert.d.ts +1 -1
- package/dist/src/components/alert/Alert.js +12 -2
- package/dist/src/components/alert/Alert.js.map +1 -1
- package/dist/src/components/alert/Alert.module.css.cjs +1 -1
- package/dist/src/components/alert/Alert.module.css.js +1 -1
- package/dist/src/components/barchart/BarChart.cjs +2 -2
- package/dist/src/components/barchart/BarChart.cjs.map +1 -1
- package/dist/src/components/barchart/BarChart.js +2 -2
- package/dist/src/components/barchart/BarChart.js.map +1 -1
- package/dist/src/components/card/Card.cjs +1 -1
- package/dist/src/components/card/Card.cjs.map +1 -1
- package/dist/src/components/card/Card.js +1 -1
- package/dist/src/components/card/Card.js.map +1 -1
- package/dist/src/components/collapse/Collapse.module.css.cjs +3 -3
- package/dist/src/components/collapse/Collapse.module.css.js +3 -3
- package/dist/src/components/drawer/Drawer.cjs +3 -1
- package/dist/src/components/drawer/Drawer.cjs.map +1 -1
- package/dist/src/components/drawer/Drawer.js +3 -1
- package/dist/src/components/drawer/Drawer.js.map +1 -1
- package/dist/src/components/form/Form.cjs +21 -4
- package/dist/src/components/form/Form.cjs.map +1 -1
- package/dist/src/components/form/Form.d.ts +10 -3
- package/dist/src/components/form/Form.js +20 -3
- package/dist/src/components/form/Form.js.map +1 -1
- package/dist/src/components/form/FormItem.cjs +42 -0
- package/dist/src/components/form/FormItem.cjs.map +1 -0
- package/dist/src/components/form/FormItem.d.ts +10 -0
- package/dist/src/components/form/FormItem.js +42 -0
- package/dist/src/components/form/FormItem.js.map +1 -0
- package/dist/src/components/form/FormItemFieldContext.cjs +8 -0
- package/dist/src/components/form/FormItemFieldContext.cjs.map +1 -0
- package/dist/src/components/form/FormItemFieldContext.d.ts +2 -0
- package/dist/src/components/form/FormItemFieldContext.js +8 -0
- package/dist/src/components/form/FormItemFieldContext.js.map +1 -0
- package/dist/src/components/form/FormikField.cjs +20 -0
- package/dist/src/components/form/FormikField.cjs.map +1 -0
- package/dist/src/components/form/FormikField.d.ts +8 -0
- package/dist/src/components/form/FormikField.js +20 -0
- package/dist/src/components/form/FormikField.js.map +1 -0
- package/dist/src/components/input/AntdInput.d.ts +77 -31
- package/dist/src/components/input/AntdSearchInput.d.ts +82 -30
- package/dist/src/components/input/Input.cjs +29 -3
- package/dist/src/components/input/Input.cjs.map +1 -1
- package/dist/src/components/input/Input.d.ts +4 -3
- package/dist/src/components/input/Input.js +29 -3
- package/dist/src/components/input/Input.js.map +1 -1
- package/dist/src/components/inputnumber/InputNumber.cjs +20 -5
- package/dist/src/components/inputnumber/InputNumber.cjs.map +1 -1
- package/dist/src/components/inputnumber/InputNumber.d.ts +4 -3
- package/dist/src/components/inputnumber/InputNumber.js +19 -4
- package/dist/src/components/inputnumber/InputNumber.js.map +1 -1
- package/dist/src/components/inputnumber/InputNumber.module.css.cjs +1 -1
- package/dist/src/components/inputnumber/InputNumber.module.css.js +1 -1
- package/dist/src/components/manageColumns/ManageColumnsItem.cjs +76 -0
- package/dist/src/components/manageColumns/ManageColumnsItem.cjs.map +1 -0
- package/dist/src/components/manageColumns/ManageColumnsItem.d.ts +7 -0
- package/dist/src/components/manageColumns/ManageColumnsItem.js +76 -0
- package/dist/src/components/manageColumns/ManageColumnsItem.js.map +1 -0
- package/dist/src/components/manageColumns/ManageColumnsPanel.cjs +79 -0
- package/dist/src/components/manageColumns/ManageColumnsPanel.cjs.map +1 -0
- package/dist/src/components/manageColumns/ManageColumnsPanel.d.ts +18 -0
- package/dist/src/components/manageColumns/ManageColumnsPanel.js +79 -0
- package/dist/src/components/manageColumns/ManageColumnsPanel.js.map +1 -0
- package/dist/src/components/manageColumns/SelectAll.cjs +27 -0
- package/dist/src/components/manageColumns/SelectAll.cjs.map +1 -0
- package/dist/src/components/manageColumns/SelectAll.d.ts +15 -0
- package/dist/src/components/manageColumns/SelectAll.js +27 -0
- package/dist/src/components/manageColumns/SelectAll.js.map +1 -0
- package/dist/src/components/manageColumns/index.d.ts +4 -0
- package/dist/src/components/modal/Modal.cjs +0 -1
- package/dist/src/components/modal/Modal.cjs.map +1 -1
- package/dist/src/components/modal/Modal.js +0 -1
- package/dist/src/components/modal/Modal.js.map +1 -1
- package/dist/src/components/notification/Notification.module.css.cjs +1 -1
- package/dist/src/components/notification/Notification.module.css.js +1 -1
- package/dist/src/components/notification/useNotification.cjs +5 -2
- package/dist/src/components/notification/useNotification.cjs.map +1 -1
- package/dist/src/components/notification/useNotification.js +5 -2
- package/dist/src/components/notification/useNotification.js.map +1 -1
- package/dist/src/components/pagination/Pagination.cjs +2 -0
- package/dist/src/components/pagination/Pagination.cjs.map +1 -1
- package/dist/src/components/pagination/Pagination.js +2 -0
- package/dist/src/components/pagination/Pagination.js.map +1 -1
- package/dist/src/components/popover/Popover.cjs +3 -1
- package/dist/src/components/popover/Popover.cjs.map +1 -1
- package/dist/src/components/popover/Popover.d.ts +1 -1
- package/dist/src/components/popover/Popover.js +3 -1
- package/dist/src/components/popover/Popover.js.map +1 -1
- package/dist/src/components/popover/Popover.module.css.cjs +9 -9
- package/dist/src/components/popover/Popover.module.css.js +9 -9
- package/dist/src/components/select/Select.cjs +29 -13
- package/dist/src/components/select/Select.cjs.map +1 -1
- package/dist/src/components/select/Select.js +29 -13
- package/dist/src/components/select/Select.js.map +1 -1
- package/dist/src/components/select/SummarizedSelect.cjs.map +1 -1
- package/dist/src/components/select/SummarizedSelect.js.map +1 -1
- package/dist/src/components/select/SummarizedSelect.module.css.cjs +8 -8
- package/dist/src/components/select/SummarizedSelect.module.css.js +8 -8
- package/dist/src/components/steps/Steps.cjs +14 -4
- package/dist/src/components/steps/Steps.cjs.map +1 -1
- package/dist/src/components/steps/Steps.d.ts +3 -3
- package/dist/src/components/steps/Steps.js +14 -4
- package/dist/src/components/steps/Steps.js.map +1 -1
- package/dist/src/components/table/Table.cjs +1 -1
- package/dist/src/components/table/Table.cjs.map +1 -1
- package/dist/src/components/table/Table.d.ts +4 -1
- package/dist/src/components/table/Table.js +1 -1
- package/dist/src/components/table/Table.js.map +1 -1
- package/dist/src/components/tag/Tag.cjs +4 -0
- package/dist/src/components/tag/Tag.cjs.map +1 -1
- package/dist/src/components/tag/Tag.d.ts +1 -1
- package/dist/src/components/tag/Tag.js +4 -0
- package/dist/src/components/tag/Tag.js.map +1 -1
- package/dist/src/components/vennDiagram/VennDiagram.cjs +1 -1
- package/dist/src/components/vennDiagram/VennDiagram.cjs.map +1 -1
- package/dist/src/components/vennDiagram/VennDiagram.js +1 -1
- package/dist/src/components/vennDiagram/VennDiagram.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/style.css +92 -78
- package/dist/tailwind.cjs +4 -0
- package/dist/tailwind.cjs.map +1 -1
- package/dist/tailwind.config.d.ts +6 -0
- package/dist/tailwind.js +4 -0
- package/dist/tailwind.js.map +1 -1
- package/package.json +38 -26
- package/src/stylesheets/base.css +322 -0
- package/src/stylesheets/fonts.css +1 -0
- package/src/stylesheets/index.css +3 -327
- package/src/stylesheets/tailwind-v3.css +3 -0
- package/src/stylesheets/tailwind.css +4 -0
package/README.md
CHANGED
|
@@ -47,11 +47,9 @@ The package ships a prebuilt bundle plus type declarations, and expects the
|
|
|
47
47
|
consuming app to provide the peer dependencies listed in `package.json` (react,
|
|
48
48
|
antd, formik, highcharts, tailwindcss, ...).
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
> anyway, so the mismatch is easy to miss. Pin it:
|
|
54
|
-
> `npm i -D tailwindcss@^3.4.14`.
|
|
50
|
+
Tailwind 3.4 and Tailwind 4 are both supported. The package keeps its JavaScript
|
|
51
|
+
preset so existing Tailwind 3 consumers do not need to migrate with the design
|
|
52
|
+
system. Tailwind 4 consumers load the same preset explicitly with `@config`.
|
|
55
53
|
|
|
56
54
|
Wire it up in three places:
|
|
57
55
|
|
|
@@ -69,21 +67,43 @@ Wire it up in three places:
|
|
|
69
67
|
import '@j2-health/design-system/style.css'
|
|
70
68
|
```
|
|
71
69
|
|
|
70
|
+
With Tailwind 3, import the legacy stylesheet as the first statement in your
|
|
71
|
+
root stylesheet:
|
|
72
|
+
|
|
72
73
|
```css
|
|
73
|
-
/* your root stylesheet — processed by YOUR Tailwind/PostCSS build.
|
|
74
|
-
This @import must be the FIRST statement in the file: it carries an
|
|
75
|
-
@import of its own (the Rubik webfont), and CSS drops an @import that
|
|
76
|
-
follows other rules. */
|
|
77
74
|
@import '@j2-health/design-system/stylesheets/index.css';
|
|
78
75
|
```
|
|
79
76
|
|
|
80
|
-
**This file is your Tailwind entry point.** It supplies `@tailwind base`,
|
|
77
|
+
**This file is your Tailwind 3 entry point.** It supplies `@tailwind base`,
|
|
81
78
|
`@tailwind components`, and `@tailwind utilities` along with the design
|
|
82
79
|
tokens and base element styles, so remove those directives from your own
|
|
83
80
|
stylesheet — keeping both emits every Tailwind layer twice.
|
|
84
81
|
|
|
82
|
+
With Tailwind 4, install the separate PostCSS plugin:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
npm install --save-dev @tailwindcss/postcss
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Replace `tailwindcss: {}` with `'@tailwindcss/postcss': {}` in your PostCSS
|
|
89
|
+
config, then use the Tailwind 4 stylesheet entry and load your JavaScript
|
|
90
|
+
config explicitly:
|
|
91
|
+
|
|
92
|
+
```css
|
|
93
|
+
@import '@j2-health/design-system/stylesheets/tailwind.css';
|
|
94
|
+
@config '../../tailwind.config.ts';
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Adjust the `@config` path relative to the stylesheet containing it. Tailwind
|
|
98
|
+
4 no longer discovers JavaScript config files automatically. The Tailwind 4
|
|
99
|
+
entry scans the package's compiled components and emits each Tailwind layer
|
|
100
|
+
once.
|
|
101
|
+
|
|
85
102
|
3. **Tailwind** — use the preset and scan the package's compiled output so
|
|
86
|
-
utility classes used inside components are generated by your build
|
|
103
|
+
utility classes used inside components are generated by your build. This
|
|
104
|
+
config works with Tailwind 3 and can be loaded by Tailwind 4 through the
|
|
105
|
+
`@config` directive above. Tailwind 4 scans the package from its stylesheet;
|
|
106
|
+
the package glob remains necessary for Tailwind 3:
|
|
87
107
|
|
|
88
108
|
```ts
|
|
89
109
|
// tailwind.config.ts
|
|
@@ -107,29 +127,62 @@ the repo root; submodule consumers should alias `design-system` to that file
|
|
|
107
127
|
explicitly, since the package.json `exports` map points at `dist/`, which only
|
|
108
128
|
exists in the published package.
|
|
109
129
|
|
|
130
|
+
### Migrating to 0.4.0 (Ant Design 6)
|
|
131
|
+
|
|
132
|
+
Version 0.4.0 requires **antd ^6.6.3** and **@ant-design/icons ^6.3.4**. Upgrade
|
|
133
|
+
both with the design system; Ant Design 5 is no longer supported. React 18.3.1
|
|
134
|
+
and React 19 remain supported, and Tailwind stays on v3. Ant Design 6 requires
|
|
135
|
+
modern browsers with CSS-variable support.
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
npm install @j2-health/design-system@^0.4.0 antd@^6.6.3 @ant-design/icons@^6.3.4
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
`formik-antd` is no longer a dependency: its published peer range excludes Ant
|
|
142
|
+
Design 6. The design system's `Form`, `Form.Item`, `Input`, `InputNumber`, and
|
|
143
|
+
`Select` now bind directly to Formik. Keep these components inside a `<Formik>`
|
|
144
|
+
provider. Nested field names, validation, touched state, submission, reset, and
|
|
145
|
+
field callbacks continue to use Formik.
|
|
146
|
+
|
|
147
|
+
If your application imports `formik-antd` directly, migrate those imports before
|
|
148
|
+
uninstalling it. Use the design-system exports for the components above; other
|
|
149
|
+
controls need an explicit Formik binding. `Form.Item` validation should use
|
|
150
|
+
Formik's `validate` or `validationSchema`, rather than antd's separate form
|
|
151
|
+
store and `rules` API.
|
|
152
|
+
|
|
153
|
+
Review direct antd imports and custom `.ant-*` CSS using the
|
|
154
|
+
[Ant Design 6 migration guide](https://ant.design/docs/react/migration-v6).
|
|
155
|
+
Several internal DOM classes changed. For types, derive step items from
|
|
156
|
+
`NonNullable<StepsProps['items']>[number]` instead of the removed `StepProps`
|
|
157
|
+
export. The design-system `Tag` retains its outlined default and trailing
|
|
158
|
+
spacing; raw antd tags follow the new v6 defaults.
|
|
159
|
+
|
|
110
160
|
### Local development against a consuming app
|
|
111
161
|
|
|
112
|
-
To work on a component and see it live in an app that depends on this package,
|
|
113
|
-
app's bundler at this checkout's source rather than linking the built
|
|
114
|
-
apps support this through a `DESIGN_SYSTEM_LOCAL` environment
|
|
162
|
+
To work on a component and see it live in an app that depends on this package,
|
|
163
|
+
point the app's bundler at this checkout's source rather than linking the built
|
|
164
|
+
package. Consuming apps support this through a `DESIGN_SYSTEM_LOCAL` environment
|
|
165
|
+
variable:
|
|
115
166
|
|
|
116
167
|
```bash
|
|
117
168
|
DESIGN_SYSTEM_LOCAL=/path/to/design-system npm run dev
|
|
118
169
|
```
|
|
119
170
|
|
|
120
|
-
**Do not use `npm link` or `npm install ../design-system`.** This package
|
|
121
|
-
dependencies that are also devDependencies, because Storybook and
|
|
122
|
-
to run. A linked install resolves those imports from
|
|
123
|
-
rather than the app's, so the app ends up
|
|
171
|
+
**Do not use `npm link` or `npm install ../design-system`.** This package
|
|
172
|
+
declares peer dependencies that are also devDependencies, because Storybook and
|
|
173
|
+
the test suite need them to run. A linked install resolves those imports from
|
|
174
|
+
this checkout's own `node_modules` rather than the app's, so the app ends up
|
|
175
|
+
with two copies of React and two copies of antd.
|
|
124
176
|
|
|
125
|
-
Two copies of React raise `Invalid hook call`, which is at least obvious. Two
|
|
126
|
-
fail silently: `AppConfigProvider` supplies the theme through
|
|
127
|
-
React context singleton, so a component resolved from
|
|
128
|
-
and renders unthemed with no error and no
|
|
129
|
-
|
|
177
|
+
Two copies of React raise `Invalid hook call`, which is at least obvious. Two
|
|
178
|
+
copies of antd fail silently: `AppConfigProvider` supplies the theme through
|
|
179
|
+
antd's `ConfigProvider`, a React context singleton, so a component resolved from
|
|
180
|
+
the second copy reads an empty context and renders unthemed with no error and no
|
|
181
|
+
warning. Because it only reproduces under a linked install, it looks like a bug
|
|
182
|
+
in this library that disappears the moment you publish.
|
|
130
183
|
|
|
131
|
-
Consuming apps must also set `resolve.dedupe` for `react`, `react-dom`, and
|
|
132
|
-
local checkout has its own `node_modules`.
|
|
184
|
+
Consuming apps must also set `resolve.dedupe` for `react`, `react-dom`, and
|
|
185
|
+
`antd`, since a local checkout has its own `node_modules`.
|
|
133
186
|
|
|
134
187
|
### Publishing to npm
|
|
135
188
|
|
|
@@ -144,9 +197,9 @@ consequences worth knowing before you change anything here:
|
|
|
144
197
|
- **Renaming or moving `publish-workflow.yml` breaks publishing.** The trusted
|
|
145
198
|
publisher is matched on the exact filename, case-sensitive. Update it on
|
|
146
199
|
npmjs.com in the same change.
|
|
147
|
-
- **Do not lower `.node-version` below 24.5.0.** Trusted publishing needs
|
|
148
|
-
|
|
149
|
-
|
|
200
|
+
- **Do not lower `.node-version` below 24.5.0.** Trusted publishing needs npm >=
|
|
201
|
+
11.5.1, which is exactly what Node 24.5.0 ships. The workflow asserts this
|
|
202
|
+
rather than letting it surface later as an unexplained 401.
|
|
150
203
|
|
|
151
204
|
To release a new version — maintainers only, since step 2 needs write access to
|
|
152
205
|
this repository:
|
|
@@ -160,7 +213,7 @@ $ gh workflow run publish-workflow.yml --ref main
|
|
|
160
213
|
```
|
|
161
214
|
|
|
162
215
|
Or, in the UI, **Actions → Publish to npm → Run workflow** with `main` selected.
|
|
163
|
-
Pick the ref carefully: the publish job is
|
|
216
|
+
Pick the ref carefully: the publish job is _skipped_ rather than failed on any
|
|
164
217
|
other ref, so a dispatch from a feature branch reports success without
|
|
165
218
|
publishing.
|
|
166
219
|
|
|
@@ -176,8 +229,8 @@ nowhere to push to.
|
|
|
176
229
|
Pushing a `v*` tag also triggers a release. Tag the remote `main` commit
|
|
177
230
|
explicitly: a bare `git tag` tags your current `HEAD`, and the workflow accepts
|
|
178
231
|
any tag ref, so a tag on an unmerged branch would publish that branch. Push the
|
|
179
|
-
tag explicitly too — `git push --follow-tags` silently skips lightweight tags
|
|
180
|
-
would report success without publishing:
|
|
232
|
+
tag explicitly too — `git push --follow-tags` silently skips lightweight tags
|
|
233
|
+
and would report success without publishing:
|
|
181
234
|
|
|
182
235
|
```bash
|
|
183
236
|
$ git fetch origin main
|
package/dist/index.cjs
CHANGED
|
@@ -22,6 +22,7 @@ const Input = require("./src/components/input/Input.cjs");
|
|
|
22
22
|
const InputNumber = require("./src/components/inputnumber/InputNumber.cjs");
|
|
23
23
|
const LegacyNavMenu = require("./src/components/legacyNavMenu/LegacyNavMenu.cjs");
|
|
24
24
|
const ListPopover = require("./src/components/listpopover/ListPopover.cjs");
|
|
25
|
+
const ManageColumnsPanel = require("./src/components/manageColumns/ManageColumnsPanel.cjs");
|
|
25
26
|
const Menu = require("./src/components/menu/Menu.cjs");
|
|
26
27
|
const Modal = require("./src/components/modal/Modal.cjs");
|
|
27
28
|
const useFilterField = require("./src/components/filterform/useFilterField.cjs");
|
|
@@ -33,6 +34,7 @@ const Progress = require("./src/components/progress/Progress.cjs");
|
|
|
33
34
|
const Radio = require("./src/components/radio/Radio.cjs");
|
|
34
35
|
const Rate = require("./src/components/rate/Rate.cjs");
|
|
35
36
|
const Select = require("./src/components/select/Select.cjs");
|
|
37
|
+
const SelectAll = require("./src/components/manageColumns/SelectAll.cjs");
|
|
36
38
|
const Skeleton = require("./src/components/skeleton/Skeleton.cjs");
|
|
37
39
|
const Spinner = require("./src/components/spinner/Spinner.cjs");
|
|
38
40
|
const Steps = require("./src/components/steps/Steps.cjs");
|
|
@@ -76,6 +78,7 @@ exports.Input = Input.Input;
|
|
|
76
78
|
exports.InputNumber = InputNumber.InputNumber;
|
|
77
79
|
exports.LegacyNavMenu = LegacyNavMenu.LegacyNavMenu;
|
|
78
80
|
exports.ListPopover = ListPopover.ListPopover;
|
|
81
|
+
exports.ManageColumnsPanel = ManageColumnsPanel.ManageColumnsPanel;
|
|
79
82
|
exports.Menu = Menu.Menu;
|
|
80
83
|
exports.Modal = Modal.Modal;
|
|
81
84
|
exports.MultiValueTextOperatorOptions = useFilterField.MultiValueTextOperatorOptions;
|
|
@@ -90,6 +93,7 @@ exports.Radio = Radio.Radio;
|
|
|
90
93
|
exports.RadioGroup = Radio.RadioGroup;
|
|
91
94
|
exports.Rate = Rate.Rate;
|
|
92
95
|
exports.Select = Select.Select;
|
|
96
|
+
exports.SelectAll = SelectAll.SelectAll;
|
|
93
97
|
exports.Skeleton = Skeleton.Skeleton;
|
|
94
98
|
exports.Spinner = Spinner.Spinner;
|
|
95
99
|
exports.Steps = Steps.Steps;
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export * from './src/components/form/index.js';
|
|
|
17
17
|
export * from './src/components/input/index.js';
|
|
18
18
|
export * from './src/components/inputnumber/index.js';
|
|
19
19
|
export * from './src/components/listpopover/index.js';
|
|
20
|
+
export * from './src/components/manageColumns/index.js';
|
|
20
21
|
export * from './src/components/menu/index.js';
|
|
21
22
|
export * from './src/components/message/index.js';
|
|
22
23
|
export * from './src/components/modal/index.js';
|
package/dist/index.js
CHANGED
|
@@ -20,6 +20,7 @@ import { Input } from "./src/components/input/Input.js";
|
|
|
20
20
|
import { InputNumber } from "./src/components/inputnumber/InputNumber.js";
|
|
21
21
|
import { LegacyNavMenu } from "./src/components/legacyNavMenu/LegacyNavMenu.js";
|
|
22
22
|
import { ListPopover } from "./src/components/listpopover/ListPopover.js";
|
|
23
|
+
import { ManageColumnsPanel } from "./src/components/manageColumns/ManageColumnsPanel.js";
|
|
23
24
|
import { Menu } from "./src/components/menu/Menu.js";
|
|
24
25
|
import { Modal } from "./src/components/modal/Modal.js";
|
|
25
26
|
import { MultiValueTextOperatorOptions, operatorOptionsFor } from "./src/components/filterform/useFilterField.js";
|
|
@@ -31,6 +32,7 @@ import { Progress } from "./src/components/progress/Progress.js";
|
|
|
31
32
|
import { Radio, RadioGroup } from "./src/components/radio/Radio.js";
|
|
32
33
|
import { Rate } from "./src/components/rate/Rate.js";
|
|
33
34
|
import { Select } from "./src/components/select/Select.js";
|
|
35
|
+
import { SelectAll } from "./src/components/manageColumns/SelectAll.js";
|
|
34
36
|
import { Skeleton } from "./src/components/skeleton/Skeleton.js";
|
|
35
37
|
import { Spinner } from "./src/components/spinner/Spinner.js";
|
|
36
38
|
import { Steps } from "./src/components/steps/Steps.js";
|
|
@@ -72,6 +74,7 @@ export {
|
|
|
72
74
|
InputNumber,
|
|
73
75
|
LegacyNavMenu,
|
|
74
76
|
ListPopover,
|
|
77
|
+
ManageColumnsPanel,
|
|
75
78
|
Menu,
|
|
76
79
|
Modal,
|
|
77
80
|
MultiValueTextOperatorOptions,
|
|
@@ -84,6 +87,7 @@ export {
|
|
|
84
87
|
RadioGroup,
|
|
85
88
|
Rate,
|
|
86
89
|
Select,
|
|
90
|
+
SelectAll,
|
|
87
91
|
Skeleton,
|
|
88
92
|
Spinner,
|
|
89
93
|
Steps,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -28,6 +28,12 @@ const Alert = ({
|
|
|
28
28
|
closable = false,
|
|
29
29
|
showIcon = true,
|
|
30
30
|
banner = false,
|
|
31
|
+
message,
|
|
32
|
+
title,
|
|
33
|
+
closeIcon,
|
|
34
|
+
closeText,
|
|
35
|
+
onClose,
|
|
36
|
+
afterClose,
|
|
31
37
|
...props
|
|
32
38
|
}) => {
|
|
33
39
|
const { token } = antd.theme.useToken();
|
|
@@ -81,12 +87,16 @@ const Alert = ({
|
|
|
81
87
|
{
|
|
82
88
|
className: Alert_module.default.alert,
|
|
83
89
|
icon,
|
|
84
|
-
closable
|
|
90
|
+
closable: closable || closeText ? {
|
|
91
|
+
closeIcon: closeText || (closeIcon ?? /* @__PURE__ */ jsxRuntime.jsx(react.XIcon, { size: token.size, weight: "regular" })),
|
|
92
|
+
onClose,
|
|
93
|
+
afterClose
|
|
94
|
+
} : false,
|
|
85
95
|
showIcon,
|
|
86
96
|
type: antDType,
|
|
87
97
|
banner,
|
|
88
98
|
description,
|
|
89
|
-
|
|
99
|
+
title: title ?? message,
|
|
90
100
|
...props
|
|
91
101
|
}
|
|
92
102
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.cjs","sources":["../../../../src/components/alert/Alert.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Alert as AntdAlert, AlertProps, theme } from 'antd'\nimport {\n CheckCircleIcon,\n InfoIcon,\n WarningCircleIcon,\n XIcon,\n XCircleIcon,\n CircleNotchIcon,\n} from '@phosphor-icons/react'\nimport styles from './Alert.module.css'\ntype Props = Expand<Omit<AlertProps, 'type'>> & {\n description?: string\n type: 'success' | 'info' | 'warning' | 'error' | 'loading'\n closable?: boolean\n showIcon?: boolean\n banner?: boolean\n}\n\nconst Alert = ({\n description,\n type,\n closable = false,\n showIcon = true,\n banner = false,\n ...props\n}: Props) => {\n const { token } = theme.useToken()\n const icon = React.useMemo(() => {\n const size = description ? token.sizeLG : token.size\n const iconStyle = !description\n ? { display: 'flex', alignItems: 'center' }\n : undefined\n\n const iconElement = (() => {\n switch (type) {\n case 'success':\n return (\n <CheckCircleIcon fill=\"var(--j2-color-success-text)\" size={size} />\n )\n case 'error':\n return <XCircleIcon fill=\"var(--j2-color-error-text)\" size={size} />\n case 'info':\n return <InfoIcon fill=\"var(--j2-color-info-text)\" size={size} />\n case 'warning':\n return (\n <WarningCircleIcon\n fill=\"var(--j2-color-warning-text)\"\n size={size}\n />\n )\n case 'loading':\n return (\n <CircleNotchIcon\n fill=\"var(--j2-color-info-text)\"\n size={size}\n weight=\"regular\"\n style={{\n animation: 'spin 1s linear infinite',\n }}\n />\n )\n default:\n return null\n }\n })()\n\n return iconStyle ? (\n <span style={iconStyle}>{iconElement}</span>\n ) : (\n iconElement\n )\n }, [type, description, token.size, token.sizeLG])\n\n const antDType = React.useMemo(():\n 'success' | 'info' | 'warning' | 'error' => {\n switch (type) {\n case 'loading':\n return 'info'\n default:\n return type as 'success' | 'info' | 'warning' | 'error'\n }\n }, [type])\n\n return (\n <AntdAlert\n className={styles.alert}\n icon={icon}\n closable={closable}\n showIcon={showIcon}\n type={antDType}\n banner={banner}\n description={description}\n
|
|
1
|
+
{"version":3,"file":"Alert.cjs","sources":["../../../../src/components/alert/Alert.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Alert as AntdAlert, AlertProps, theme } from 'antd'\nimport {\n CheckCircleIcon,\n InfoIcon,\n WarningCircleIcon,\n XIcon,\n XCircleIcon,\n CircleNotchIcon,\n} from '@phosphor-icons/react'\nimport styles from './Alert.module.css'\ntype Props = Expand<Omit<AlertProps, 'type'>> & {\n description?: string\n type: 'success' | 'info' | 'warning' | 'error' | 'loading'\n closable?: boolean\n showIcon?: boolean\n banner?: boolean\n}\n\nconst Alert = ({\n description,\n type,\n closable = false,\n showIcon = true,\n banner = false,\n message,\n title,\n closeIcon,\n closeText,\n onClose,\n afterClose,\n ...props\n}: Props) => {\n const { token } = theme.useToken()\n const icon = React.useMemo(() => {\n const size = description ? token.sizeLG : token.size\n const iconStyle = !description\n ? { display: 'flex', alignItems: 'center' }\n : undefined\n\n const iconElement = (() => {\n switch (type) {\n case 'success':\n return (\n <CheckCircleIcon fill=\"var(--j2-color-success-text)\" size={size} />\n )\n case 'error':\n return <XCircleIcon fill=\"var(--j2-color-error-text)\" size={size} />\n case 'info':\n return <InfoIcon fill=\"var(--j2-color-info-text)\" size={size} />\n case 'warning':\n return (\n <WarningCircleIcon\n fill=\"var(--j2-color-warning-text)\"\n size={size}\n />\n )\n case 'loading':\n return (\n <CircleNotchIcon\n fill=\"var(--j2-color-info-text)\"\n size={size}\n weight=\"regular\"\n style={{\n animation: 'spin 1s linear infinite',\n }}\n />\n )\n default:\n return null\n }\n })()\n\n return iconStyle ? (\n <span style={iconStyle}>{iconElement}</span>\n ) : (\n iconElement\n )\n }, [type, description, token.size, token.sizeLG])\n\n const antDType = React.useMemo(():\n 'success' | 'info' | 'warning' | 'error' => {\n switch (type) {\n case 'loading':\n return 'info'\n default:\n return type as 'success' | 'info' | 'warning' | 'error'\n }\n }, [type])\n\n return (\n <AntdAlert\n className={styles.alert}\n icon={icon}\n closable={\n closable || closeText\n ? {\n closeIcon:\n closeText ||\n (closeIcon ?? <XIcon size={token.size} weight=\"regular\" />),\n onClose,\n afterClose,\n }\n : false\n }\n showIcon={showIcon}\n type={antDType}\n banner={banner}\n description={description}\n title={title ?? message}\n {...props}\n />\n )\n}\n\nexport { Alert }\n"],"names":["theme","React","jsx","CheckCircleIcon","XCircleIcon","InfoIcon","WarningCircleIcon","CircleNotchIcon","AntdAlert","styles","XIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAmBA,MAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,WAAW;AAAA,EACX,SAAS;AAAA,EACT;AAAA,EACA;AAA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;AAET,SACEC,2BAAAA;AAAAA,IAACM,KAAAA;AAAAA,IAAA;AAAA,MACC,WAAWC,aAAAA,QAAO;AAAA,MAClB;AAAA,MACA,UACE,YAAY,YACR;AAAA,QACE,WACE,cACC,aAAaP,2BAAAA,IAACQ,MAAAA,SAAM,MAAM,MAAM,MAAM,QAAO,UAAA,CAAU;AAAA,QAC1D;AAAA,QACA;AAAA,MAAA,IAEF;AAAA,MAEN;AAAA,MACA,MAAM;AAAA,MACN;AAAA,MACA;AAAA,MACA,OAAO,SAAS;AAAA,MACf,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;;"}
|
|
@@ -7,5 +7,5 @@ type Props = Expand<Omit<AlertProps, 'type'>> & {
|
|
|
7
7
|
showIcon?: boolean;
|
|
8
8
|
banner?: boolean;
|
|
9
9
|
};
|
|
10
|
-
declare const Alert: ({ description, type, closable, showIcon, banner, ...props }: Props) => React.JSX.Element;
|
|
10
|
+
declare const Alert: ({ description, type, closable, showIcon, banner, message, title, closeIcon, closeText, onClose, afterClose, ...props }: Props) => React.JSX.Element;
|
|
11
11
|
export { Alert };
|
|
@@ -9,6 +9,12 @@ const Alert = ({
|
|
|
9
9
|
closable = false,
|
|
10
10
|
showIcon = true,
|
|
11
11
|
banner = false,
|
|
12
|
+
message,
|
|
13
|
+
title,
|
|
14
|
+
closeIcon,
|
|
15
|
+
closeText,
|
|
16
|
+
onClose,
|
|
17
|
+
afterClose,
|
|
12
18
|
...props
|
|
13
19
|
}) => {
|
|
14
20
|
const { token } = theme.useToken();
|
|
@@ -62,12 +68,16 @@ const Alert = ({
|
|
|
62
68
|
{
|
|
63
69
|
className: styles.alert,
|
|
64
70
|
icon,
|
|
65
|
-
closable
|
|
71
|
+
closable: closable || closeText ? {
|
|
72
|
+
closeIcon: closeText || (closeIcon ?? /* @__PURE__ */ jsx(XIcon, { size: token.size, weight: "regular" })),
|
|
73
|
+
onClose,
|
|
74
|
+
afterClose
|
|
75
|
+
} : false,
|
|
66
76
|
showIcon,
|
|
67
77
|
type: antDType,
|
|
68
78
|
banner,
|
|
69
79
|
description,
|
|
70
|
-
|
|
80
|
+
title: title ?? message,
|
|
71
81
|
...props
|
|
72
82
|
}
|
|
73
83
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","sources":["../../../../src/components/alert/Alert.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Alert as AntdAlert, AlertProps, theme } from 'antd'\nimport {\n CheckCircleIcon,\n InfoIcon,\n WarningCircleIcon,\n XIcon,\n XCircleIcon,\n CircleNotchIcon,\n} from '@phosphor-icons/react'\nimport styles from './Alert.module.css'\ntype Props = Expand<Omit<AlertProps, 'type'>> & {\n description?: string\n type: 'success' | 'info' | 'warning' | 'error' | 'loading'\n closable?: boolean\n showIcon?: boolean\n banner?: boolean\n}\n\nconst Alert = ({\n description,\n type,\n closable = false,\n showIcon = true,\n banner = false,\n ...props\n}: Props) => {\n const { token } = theme.useToken()\n const icon = React.useMemo(() => {\n const size = description ? token.sizeLG : token.size\n const iconStyle = !description\n ? { display: 'flex', alignItems: 'center' }\n : undefined\n\n const iconElement = (() => {\n switch (type) {\n case 'success':\n return (\n <CheckCircleIcon fill=\"var(--j2-color-success-text)\" size={size} />\n )\n case 'error':\n return <XCircleIcon fill=\"var(--j2-color-error-text)\" size={size} />\n case 'info':\n return <InfoIcon fill=\"var(--j2-color-info-text)\" size={size} />\n case 'warning':\n return (\n <WarningCircleIcon\n fill=\"var(--j2-color-warning-text)\"\n size={size}\n />\n )\n case 'loading':\n return (\n <CircleNotchIcon\n fill=\"var(--j2-color-info-text)\"\n size={size}\n weight=\"regular\"\n style={{\n animation: 'spin 1s linear infinite',\n }}\n />\n )\n default:\n return null\n }\n })()\n\n return iconStyle ? (\n <span style={iconStyle}>{iconElement}</span>\n ) : (\n iconElement\n )\n }, [type, description, token.size, token.sizeLG])\n\n const antDType = React.useMemo(():\n 'success' | 'info' | 'warning' | 'error' => {\n switch (type) {\n case 'loading':\n return 'info'\n default:\n return type as 'success' | 'info' | 'warning' | 'error'\n }\n }, [type])\n\n return (\n <AntdAlert\n className={styles.alert}\n icon={icon}\n closable={closable}\n showIcon={showIcon}\n type={antDType}\n banner={banner}\n description={description}\n
|
|
1
|
+
{"version":3,"file":"Alert.js","sources":["../../../../src/components/alert/Alert.tsx"],"sourcesContent":["import * as React from 'react'\nimport { Alert as AntdAlert, AlertProps, theme } from 'antd'\nimport {\n CheckCircleIcon,\n InfoIcon,\n WarningCircleIcon,\n XIcon,\n XCircleIcon,\n CircleNotchIcon,\n} from '@phosphor-icons/react'\nimport styles from './Alert.module.css'\ntype Props = Expand<Omit<AlertProps, 'type'>> & {\n description?: string\n type: 'success' | 'info' | 'warning' | 'error' | 'loading'\n closable?: boolean\n showIcon?: boolean\n banner?: boolean\n}\n\nconst Alert = ({\n description,\n type,\n closable = false,\n showIcon = true,\n banner = false,\n message,\n title,\n closeIcon,\n closeText,\n onClose,\n afterClose,\n ...props\n}: Props) => {\n const { token } = theme.useToken()\n const icon = React.useMemo(() => {\n const size = description ? token.sizeLG : token.size\n const iconStyle = !description\n ? { display: 'flex', alignItems: 'center' }\n : undefined\n\n const iconElement = (() => {\n switch (type) {\n case 'success':\n return (\n <CheckCircleIcon fill=\"var(--j2-color-success-text)\" size={size} />\n )\n case 'error':\n return <XCircleIcon fill=\"var(--j2-color-error-text)\" size={size} />\n case 'info':\n return <InfoIcon fill=\"var(--j2-color-info-text)\" size={size} />\n case 'warning':\n return (\n <WarningCircleIcon\n fill=\"var(--j2-color-warning-text)\"\n size={size}\n />\n )\n case 'loading':\n return (\n <CircleNotchIcon\n fill=\"var(--j2-color-info-text)\"\n size={size}\n weight=\"regular\"\n style={{\n animation: 'spin 1s linear infinite',\n }}\n />\n )\n default:\n return null\n }\n })()\n\n return iconStyle ? (\n <span style={iconStyle}>{iconElement}</span>\n ) : (\n iconElement\n )\n }, [type, description, token.size, token.sizeLG])\n\n const antDType = React.useMemo(():\n 'success' | 'info' | 'warning' | 'error' => {\n switch (type) {\n case 'loading':\n return 'info'\n default:\n return type as 'success' | 'info' | 'warning' | 'error'\n }\n }, [type])\n\n return (\n <AntdAlert\n className={styles.alert}\n icon={icon}\n closable={\n closable || closeText\n ? {\n closeIcon:\n closeText ||\n (closeIcon ?? <XIcon size={token.size} weight=\"regular\" />),\n onClose,\n afterClose,\n }\n : false\n }\n showIcon={showIcon}\n type={antDType}\n banner={banner}\n description={description}\n title={title ?? message}\n {...props}\n />\n )\n}\n\nexport { Alert }\n"],"names":["AntdAlert"],"mappings":";;;;;AAmBA,MAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,WAAW;AAAA,EACX,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAa;AACX,QAAM,EAAE,MAAA,IAAU,MAAM,SAAA;AACxB,QAAM,OAAO,MAAM,QAAQ,MAAM;AAC/B,UAAM,OAAO,cAAc,MAAM,SAAS,MAAM;AAChD,UAAM,YAAY,CAAC,cACf,EAAE,SAAS,QAAQ,YAAY,aAC/B;AAEJ,UAAM,eAAe,MAAM;AACzB,cAAQ,MAAA;AAAA,QACN,KAAK;AACH,iBACE,oBAAC,iBAAA,EAAgB,MAAK,gCAA+B,KAAA,CAAY;AAAA,QAErE,KAAK;AACH,iBAAO,oBAAC,aAAA,EAAY,MAAK,8BAA6B,KAAA,CAAY;AAAA,QACpE,KAAK;AACH,iBAAO,oBAAC,UAAA,EAAS,MAAK,6BAA4B,KAAA,CAAY;AAAA,QAChE,KAAK;AACH,iBACE;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL;AAAA,YAAA;AAAA,UAAA;AAAA,QAGN,KAAK;AACH,iBACE;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL;AAAA,cACA,QAAO;AAAA,cACP,OAAO;AAAA,gBACL,WAAW;AAAA,cAAA;AAAA,YACb;AAAA,UAAA;AAAA,QAGN;AACE,iBAAO;AAAA,MAAA;AAAA,IAEb,GAAA;AAEA,WAAO,YACL,oBAAC,QAAA,EAAK,OAAO,WAAY,uBAAY,IAErC;AAAA,EAEJ,GAAG,CAAC,MAAM,aAAa,MAAM,MAAM,MAAM,MAAM,CAAC;AAEhD,QAAM,WAAW,MAAM,QAAQ,MACe;AAC5C,YAAQ,MAAA;AAAA,MACN,KAAK;AACH,eAAO;AAAA,MACT;AACE,eAAO;AAAA,IAAA;AAAA,EAEb,GAAG,CAAC,IAAI,CAAC;AAET,SACE;AAAA,IAACA;AAAAA,IAAA;AAAA,MACC,WAAW,OAAO;AAAA,MAClB;AAAA,MACA,UACE,YAAY,YACR;AAAA,QACE,WACE,cACC,aAAa,oBAAC,SAAM,MAAM,MAAM,MAAM,QAAO,UAAA,CAAU;AAAA,QAC1D;AAAA,QACA;AAAA,MAAA,IAEF;AAAA,MAEN;AAAA,MACA,MAAM;AAAA,MACN;AAAA,MACA;AAAA,MACA,OAAO,SAAS;AAAA,MACf,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const antd = require("antd");
|
|
5
5
|
const react = require("@highcharts/react");
|
|
6
|
-
require("@highcharts/react/
|
|
7
|
-
require("@highcharts/react/
|
|
6
|
+
require("@highcharts/react/modules/Accessibility.js");
|
|
7
|
+
require("@highcharts/react/modules/Exporting.js");
|
|
8
8
|
const chart_module = require("./chart.module.css.cjs");
|
|
9
9
|
const server = require("react-dom/server");
|
|
10
10
|
const BarChart = ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BarChart.cjs","sources":["../../../../src/components/barchart/BarChart.tsx"],"sourcesContent":["import { theme } from 'antd'\nimport type * as Highcharts from 'highcharts'\nimport {\n Chart as HighchartsReact,\n type HighchartsReactRefObject,\n} from '@highcharts/react'\nimport '@highcharts/react/
|
|
1
|
+
{"version":3,"file":"BarChart.cjs","sources":["../../../../src/components/barchart/BarChart.tsx"],"sourcesContent":["import { theme } from 'antd'\nimport type * as Highcharts from 'highcharts'\nimport {\n Chart as HighchartsReact,\n type HighchartsReactRefObject,\n} from '@highcharts/react'\n// `modules/`, not `options/`. @highcharts/react 5 moved the module entry\n// points and left the old `options/` files in the package still importing\n// `highcharts/esm/…`, while the Chart component now loads\n// `highcharts/es-modules/masters/…`. Those are two different Highcharts\n// instances, so the old path composes the module onto one the chart never\n// uses: no error, no missing export, the module just stops taking effect.\nimport '@highcharts/react/modules/Accessibility.js'\nimport '@highcharts/react/modules/Exporting.js'\nimport styles from './chart.module.css'\nimport { renderToString } from 'react-dom/server'\n\ntype Series = {\n name?: string\n data: Highcharts.PointOptionsObject[] | number[]\n color?: string\n hoverColor?: string\n}\n\ntype BarChartProps = {\n categories: string[]\n series: Series[]\n min: number\n max: number | undefined | null\n tickInterval: number | undefined\n tickFormat?: (value: number) => string\n xAxisTitle?: string\n yAxisTitle?: string\n gridLineColor?: string\n gridLineDashStyle?: Highcharts.DashStyleValue\n xAxisLabelMaxLines?: number\n tooltip: (\n category: string | number | undefined,\n value: number | null | undefined,\n seriesName: string | undefined\n ) => React.ReactNode\n chartRef?: React.RefObject<HighchartsReactRefObject>\n exporting?: Highcharts.ExportingOptions\n maxBars?: number\n barsWidth?: number\n height?: number\n width?: number\n}\n\nconst BarChart = ({\n categories,\n series,\n min,\n max,\n tickInterval,\n tickFormat,\n xAxisTitle,\n yAxisTitle,\n gridLineColor,\n gridLineDashStyle,\n xAxisLabelMaxLines,\n tooltip,\n exporting,\n chartRef,\n height,\n width,\n maxBars = 50,\n barsWidth = undefined,\n}: BarChartProps) => {\n const limitedCategories = categories.slice(0, maxBars)\n const limitedSeries = series.map((s) => ({\n ...s,\n data: s.data.slice(0, maxBars),\n }))\n\n const { token } = theme.useToken()\n\n const baseFont: Highcharts.CSSObject = {\n fontSize: `${token.fontSize}px`,\n fontFamily: token.fontFamily,\n color: token.colorText,\n }\n\n const options: Highcharts.Options = {\n credits: {\n enabled: false,\n },\n chart: {\n type: 'column',\n ...(height ? { height } : {}),\n ...(width ? { width } : {}),\n },\n plotOptions: {\n column: {\n borderRadius: series[0].data.length > 5 ? '20%' : '15%',\n ...(barsWidth !== undefined ? { pointWidth: barsWidth } : {}),\n },\n },\n exporting: {\n ...exporting,\n enabled: false,\n chartOptions: {\n ...exporting?.chartOptions,\n title: {\n align: 'left',\n text: exporting?.chartOptions?.title?.text,\n style: {\n fontSize: `${token.fontSize}px`,\n fontFamily: 'sans-serif',\n color: token.colorText,\n ...exporting?.chartOptions?.title?.style,\n },\n },\n series: limitedSeries.map((s) => ({\n type: 'column',\n color: s.color ? s.color : '#253761', // --j2-blue-9\n })),\n legend: exporting?.chartOptions?.legend || { enabled: false },\n },\n },\n title: {\n text: '',\n },\n xAxis: {\n categories: limitedCategories,\n title: xAxisTitle\n ? {\n text: xAxisTitle,\n style: { ...baseFont, color: token.colorTextDescription },\n }\n : undefined,\n labels: {\n y: 30,\n style: baseFont,\n ...(xAxisLabelMaxLines\n ? {\n useHTML: true,\n formatter: function (\n this: Highcharts.AxisLabelsFormatterContextObject\n ) {\n return `<div style=\"overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: ${xAxisLabelMaxLines}; -webkit-box-orient: vertical; text-align: center;\">${this.value}</div>`\n },\n }\n : {}),\n },\n },\n yAxis: {\n min: min,\n max: max,\n endOnTick: true,\n gridLineDashStyle: gridLineDashStyle || 'Dot',\n gridLineColor: gridLineColor || 'white',\n title: yAxisTitle\n ? {\n text: yAxisTitle,\n style: { ...baseFont, color: token.colorTextDescription },\n x: -10,\n }\n : undefined,\n tickInterval: tickInterval,\n labels: {\n formatter: tickFormat\n ? ({ value }) => tickFormat(value as number)\n : undefined,\n style: baseFont,\n },\n },\n legend: {\n enabled: false,\n },\n series: limitedSeries.map((s) => ({\n data: s.data,\n name: s.name,\n type: 'column',\n color: s.color || 'var(--j2-blue-11)',\n states: {\n hover: {\n color: s.hoverColor || token.colorPrimaryTextHover,\n },\n },\n })),\n tooltip: {\n useHTML: true,\n outside: true,\n backgroundColor: 'transparent',\n shadow: false,\n padding: 0,\n style: { zIndex: 9999 },\n formatter: function (this) {\n return renderToString(\n <div className={styles.tooltip}>\n {tooltip(this.key, this.y, this.series.name)}\n </div>\n )\n },\n },\n }\n\n return (\n <HighchartsReact\n ref={chartRef}\n options={options}\n containerProps={{ className: 'highcharts-light' }}\n />\n )\n}\n\nexport { BarChart }\n"],"names":["theme","renderToString","jsx","styles","HighchartsReact"],"mappings":";;;;;;;;;AAiDA,MAAM,WAAW,CAAC;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,YAAY;AACd,MAAqB;;AACnB,QAAM,oBAAoB,WAAW,MAAM,GAAG,OAAO;AACrD,QAAM,gBAAgB,OAAO,IAAI,CAAC,OAAO;AAAA,IACvC,GAAG;AAAA,IACH,MAAM,EAAE,KAAK,MAAM,GAAG,OAAO;AAAA,EAAA,EAC7B;AAEF,QAAM,EAAE,MAAA,IAAUA,KAAAA,MAAM,SAAA;AAExB,QAAM,WAAiC;AAAA,IACrC,UAAU,GAAG,MAAM,QAAQ;AAAA,IAC3B,YAAY,MAAM;AAAA,IAClB,OAAO,MAAM;AAAA,EAAA;AAGf,QAAM,UAA8B;AAAA,IAClC,SAAS;AAAA,MACP,SAAS;AAAA,IAAA;AAAA,IAEX,OAAO;AAAA,MACL,MAAM;AAAA,MACN,GAAI,SAAS,EAAE,OAAA,IAAW,CAAA;AAAA,MAC1B,GAAI,QAAQ,EAAE,UAAU,CAAA;AAAA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";
|
|
3
3
|
import { Chart } from "@highcharts/react";
|
|
4
|
-
import "@highcharts/react/
|
|
5
|
-
import "@highcharts/react/
|
|
4
|
+
import "@highcharts/react/modules/Accessibility.js";
|
|
5
|
+
import "@highcharts/react/modules/Exporting.js";
|
|
6
6
|
import styles from "./chart.module.css.js";
|
|
7
7
|
import { renderToString } from "react-dom/server";
|
|
8
8
|
const BarChart = ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BarChart.js","sources":["../../../../src/components/barchart/BarChart.tsx"],"sourcesContent":["import { theme } from 'antd'\nimport type * as Highcharts from 'highcharts'\nimport {\n Chart as HighchartsReact,\n type HighchartsReactRefObject,\n} from '@highcharts/react'\nimport '@highcharts/react/
|
|
1
|
+
{"version":3,"file":"BarChart.js","sources":["../../../../src/components/barchart/BarChart.tsx"],"sourcesContent":["import { theme } from 'antd'\nimport type * as Highcharts from 'highcharts'\nimport {\n Chart as HighchartsReact,\n type HighchartsReactRefObject,\n} from '@highcharts/react'\n// `modules/`, not `options/`. @highcharts/react 5 moved the module entry\n// points and left the old `options/` files in the package still importing\n// `highcharts/esm/…`, while the Chart component now loads\n// `highcharts/es-modules/masters/…`. Those are two different Highcharts\n// instances, so the old path composes the module onto one the chart never\n// uses: no error, no missing export, the module just stops taking effect.\nimport '@highcharts/react/modules/Accessibility.js'\nimport '@highcharts/react/modules/Exporting.js'\nimport styles from './chart.module.css'\nimport { renderToString } from 'react-dom/server'\n\ntype Series = {\n name?: string\n data: Highcharts.PointOptionsObject[] | number[]\n color?: string\n hoverColor?: string\n}\n\ntype BarChartProps = {\n categories: string[]\n series: Series[]\n min: number\n max: number | undefined | null\n tickInterval: number | undefined\n tickFormat?: (value: number) => string\n xAxisTitle?: string\n yAxisTitle?: string\n gridLineColor?: string\n gridLineDashStyle?: Highcharts.DashStyleValue\n xAxisLabelMaxLines?: number\n tooltip: (\n category: string | number | undefined,\n value: number | null | undefined,\n seriesName: string | undefined\n ) => React.ReactNode\n chartRef?: React.RefObject<HighchartsReactRefObject>\n exporting?: Highcharts.ExportingOptions\n maxBars?: number\n barsWidth?: number\n height?: number\n width?: number\n}\n\nconst BarChart = ({\n categories,\n series,\n min,\n max,\n tickInterval,\n tickFormat,\n xAxisTitle,\n yAxisTitle,\n gridLineColor,\n gridLineDashStyle,\n xAxisLabelMaxLines,\n tooltip,\n exporting,\n chartRef,\n height,\n width,\n maxBars = 50,\n barsWidth = undefined,\n}: BarChartProps) => {\n const limitedCategories = categories.slice(0, maxBars)\n const limitedSeries = series.map((s) => ({\n ...s,\n data: s.data.slice(0, maxBars),\n }))\n\n const { token } = theme.useToken()\n\n const baseFont: Highcharts.CSSObject = {\n fontSize: `${token.fontSize}px`,\n fontFamily: token.fontFamily,\n color: token.colorText,\n }\n\n const options: Highcharts.Options = {\n credits: {\n enabled: false,\n },\n chart: {\n type: 'column',\n ...(height ? { height } : {}),\n ...(width ? { width } : {}),\n },\n plotOptions: {\n column: {\n borderRadius: series[0].data.length > 5 ? '20%' : '15%',\n ...(barsWidth !== undefined ? { pointWidth: barsWidth } : {}),\n },\n },\n exporting: {\n ...exporting,\n enabled: false,\n chartOptions: {\n ...exporting?.chartOptions,\n title: {\n align: 'left',\n text: exporting?.chartOptions?.title?.text,\n style: {\n fontSize: `${token.fontSize}px`,\n fontFamily: 'sans-serif',\n color: token.colorText,\n ...exporting?.chartOptions?.title?.style,\n },\n },\n series: limitedSeries.map((s) => ({\n type: 'column',\n color: s.color ? s.color : '#253761', // --j2-blue-9\n })),\n legend: exporting?.chartOptions?.legend || { enabled: false },\n },\n },\n title: {\n text: '',\n },\n xAxis: {\n categories: limitedCategories,\n title: xAxisTitle\n ? {\n text: xAxisTitle,\n style: { ...baseFont, color: token.colorTextDescription },\n }\n : undefined,\n labels: {\n y: 30,\n style: baseFont,\n ...(xAxisLabelMaxLines\n ? {\n useHTML: true,\n formatter: function (\n this: Highcharts.AxisLabelsFormatterContextObject\n ) {\n return `<div style=\"overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: ${xAxisLabelMaxLines}; -webkit-box-orient: vertical; text-align: center;\">${this.value}</div>`\n },\n }\n : {}),\n },\n },\n yAxis: {\n min: min,\n max: max,\n endOnTick: true,\n gridLineDashStyle: gridLineDashStyle || 'Dot',\n gridLineColor: gridLineColor || 'white',\n title: yAxisTitle\n ? {\n text: yAxisTitle,\n style: { ...baseFont, color: token.colorTextDescription },\n x: -10,\n }\n : undefined,\n tickInterval: tickInterval,\n labels: {\n formatter: tickFormat\n ? ({ value }) => tickFormat(value as number)\n : undefined,\n style: baseFont,\n },\n },\n legend: {\n enabled: false,\n },\n series: limitedSeries.map((s) => ({\n data: s.data,\n name: s.name,\n type: 'column',\n color: s.color || 'var(--j2-blue-11)',\n states: {\n hover: {\n color: s.hoverColor || token.colorPrimaryTextHover,\n },\n },\n })),\n tooltip: {\n useHTML: true,\n outside: true,\n backgroundColor: 'transparent',\n shadow: false,\n padding: 0,\n style: { zIndex: 9999 },\n formatter: function (this) {\n return renderToString(\n <div className={styles.tooltip}>\n {tooltip(this.key, this.y, this.series.name)}\n </div>\n )\n },\n },\n }\n\n return (\n <HighchartsReact\n ref={chartRef}\n options={options}\n containerProps={{ className: 'highcharts-light' }}\n />\n )\n}\n\nexport { BarChart }\n"],"names":["HighchartsReact"],"mappings":";;;;;;;AAiDA,MAAM,WAAW,CAAC;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,YAAY;AACd,MAAqB;;AACnB,QAAM,oBAAoB,WAAW,MAAM,GAAG,OAAO;AACrD,QAAM,gBAAgB,OAAO,IAAI,CAAC,OAAO;AAAA,IACvC,GAAG;AAAA,IACH,MAAM,EAAE,KAAK,MAAM,GAAG,OAAO;AAAA,EA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AK,KAAK,KAAK,GAAG,KAAK,OAAO,IAAI,EAAA,CAC7C;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EACF;AAGF,SACE;AAAA,IAACA;AAAAA,IAAA;AAAA,MACC,KAAK;AAAA,MACL;AAAA,MACA,gBAAgB,EAAE,WAAW,mBAAA;AAAA,IAAmB;AAAA,EAAA;AAGtD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.cjs","sources":["../../../../src/components/card/Card.tsx"],"sourcesContent":["import { Card as AntdCard, CardProps } from 'antd'\nimport cx from 'classnames'\n\n// import this file to enable styling defined in there\nimport './Card.css'\n\nexport type Props = Omit<CardProps, 'size'> & {\n /** Card title */\n title?: string\n /** Card contents */\n children: React.ReactNode\n /** Loading state */\n loading?: boolean\n /** Card size */\n size?: 'default' | 'small' | 'compact' | 'large'\n /**\n * Inner card type variant.\n * It allows inner card to have variants independent of other props.\n * Works only with type=\"inner\".\n */\n innerVariant?: 'default' | 'basic'\n}\n\nconst Card = ({\n title,\n children,\n loading,\n size = 'default',\n innerVariant = 'default',\n className,\n ...props\n}: Props) => {\n const isInner = props.type === 'inner'\n const isInnerBasic = isInner && innerVariant === 'basic'\n return (\n <AntdCard\n className={cx(\n 'j2-card',\n `j2-card-${size}`,\n isInnerBasic && 'inner-basic',\n className\n )}\n {...props}\n size={size === '
|
|
1
|
+
{"version":3,"file":"Card.cjs","sources":["../../../../src/components/card/Card.tsx"],"sourcesContent":["import { Card as AntdCard, CardProps } from 'antd'\nimport cx from 'classnames'\n\n// import this file to enable styling defined in there\nimport './Card.css'\n\nexport type Props = Omit<CardProps, 'size'> & {\n /** Card title */\n title?: string\n /** Card contents */\n children: React.ReactNode\n /** Loading state */\n loading?: boolean\n /** Card size */\n size?: 'default' | 'small' | 'compact' | 'large'\n /**\n * Inner card type variant.\n * It allows inner card to have variants independent of other props.\n * Works only with type=\"inner\".\n */\n innerVariant?: 'default' | 'basic'\n}\n\nconst Card = ({\n title,\n children,\n loading,\n size = 'default',\n innerVariant = 'default',\n className,\n ...props\n}: Props) => {\n const isInner = props.type === 'inner'\n const isInnerBasic = isInner && innerVariant === 'basic'\n return (\n <AntdCard\n className={cx(\n 'j2-card',\n `j2-card-${size}`,\n isInnerBasic && 'inner-basic',\n className\n )}\n {...props}\n size={size === 'small' ? 'small' : 'medium'}\n title={title}\n loading={loading}\n >\n {children}\n </AntdCard>\n )\n}\n\nexport { Card }\n"],"names":["jsx","AntdCard"],"mappings":";;;;;;AAuBA,MAAM,OAAO,CAAC;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,eAAe;AAAA,EACf;AAAA,EACA,GAAG;AACL,MAAa;AACX,QAAM,UAAU,MAAM,SAAS;AAC/B,QAAM,eAAe,WAAW,iBAAiB;AACjD,SACEA,2BAAAA;AAAAA,IAACC,KAAAA;AAAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,WAAW,IAAI;AAAA,QACf,gBAAgB;AAAA,QAChB;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,MACJ,MAAM,SAAS,UAAU,UAAU;AAAA,MACnC;AAAA,MACA;AAAA,MAEC;AAAA,IAAA;AAAA,EAAA;AAGP;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sources":["../../../../src/components/card/Card.tsx"],"sourcesContent":["import { Card as AntdCard, CardProps } from 'antd'\nimport cx from 'classnames'\n\n// import this file to enable styling defined in there\nimport './Card.css'\n\nexport type Props = Omit<CardProps, 'size'> & {\n /** Card title */\n title?: string\n /** Card contents */\n children: React.ReactNode\n /** Loading state */\n loading?: boolean\n /** Card size */\n size?: 'default' | 'small' | 'compact' | 'large'\n /**\n * Inner card type variant.\n * It allows inner card to have variants independent of other props.\n * Works only with type=\"inner\".\n */\n innerVariant?: 'default' | 'basic'\n}\n\nconst Card = ({\n title,\n children,\n loading,\n size = 'default',\n innerVariant = 'default',\n className,\n ...props\n}: Props) => {\n const isInner = props.type === 'inner'\n const isInnerBasic = isInner && innerVariant === 'basic'\n return (\n <AntdCard\n className={cx(\n 'j2-card',\n `j2-card-${size}`,\n isInnerBasic && 'inner-basic',\n className\n )}\n {...props}\n size={size === '
|
|
1
|
+
{"version":3,"file":"Card.js","sources":["../../../../src/components/card/Card.tsx"],"sourcesContent":["import { Card as AntdCard, CardProps } from 'antd'\nimport cx from 'classnames'\n\n// import this file to enable styling defined in there\nimport './Card.css'\n\nexport type Props = Omit<CardProps, 'size'> & {\n /** Card title */\n title?: string\n /** Card contents */\n children: React.ReactNode\n /** Loading state */\n loading?: boolean\n /** Card size */\n size?: 'default' | 'small' | 'compact' | 'large'\n /**\n * Inner card type variant.\n * It allows inner card to have variants independent of other props.\n * Works only with type=\"inner\".\n */\n innerVariant?: 'default' | 'basic'\n}\n\nconst Card = ({\n title,\n children,\n loading,\n size = 'default',\n innerVariant = 'default',\n className,\n ...props\n}: Props) => {\n const isInner = props.type === 'inner'\n const isInnerBasic = isInner && innerVariant === 'basic'\n return (\n <AntdCard\n className={cx(\n 'j2-card',\n `j2-card-${size}`,\n isInnerBasic && 'inner-basic',\n className\n )}\n {...props}\n size={size === 'small' ? 'small' : 'medium'}\n title={title}\n loading={loading}\n >\n {children}\n </AntdCard>\n )\n}\n\nexport { Card }\n"],"names":["AntdCard"],"mappings":";;;;AAuBA,MAAM,OAAO,CAAC;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,eAAe;AAAA,EACf;AAAA,EACA,GAAG;AACL,MAAa;AACX,QAAM,UAAU,MAAM,SAAS;AAC/B,QAAM,eAAe,WAAW,iBAAiB;AACjD,SACE;AAAA,IAACA;AAAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,WAAW,IAAI;AAAA,QACf,gBAAgB;AAAA,QAChB;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,MACJ,MAAM,SAAS,UAAU,UAAU;AAAA,MACnC;AAAA,MACA;AAAA,MAEC;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const warning = "
|
|
4
|
-
const error = "
|
|
3
|
+
const warning = "_warning_1t61q_2";
|
|
4
|
+
const error = "_error_1t61q_3";
|
|
5
5
|
const styles = {
|
|
6
|
-
"default": "
|
|
6
|
+
"default": "_default_1t61q_1",
|
|
7
7
|
warning,
|
|
8
8
|
error
|
|
9
9
|
};
|
|
@@ -16,7 +16,9 @@ const Drawer = ({
|
|
|
16
16
|
{
|
|
17
17
|
...props,
|
|
18
18
|
closable: false,
|
|
19
|
-
...fillPage && {
|
|
19
|
+
...fillPage && {
|
|
20
|
+
size: props.placement === "top" || props.placement === "bottom" ? "100vh" : "100vw"
|
|
21
|
+
},
|
|
20
22
|
...footer && { footer },
|
|
21
23
|
extra: /* @__PURE__ */ jsxRuntime.jsxs(antd.Space, { children: [
|
|
22
24
|
extraContent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.cjs","sources":["../../../../src/components/drawer/Drawer.tsx"],"sourcesContent":["import { Drawer as AntdDrawer, DrawerProps, Space } from 'antd'\nimport { Button } from '../button'\nimport { XIcon } from '@phosphor-icons/react'\nimport './Drawer.css'\n\ntype AllProps = Omit<DrawerProps, 'extra' | 'closable'> & {\n fillPage?: boolean\n footer?: React.ReactNode\n extraContent?: React.ReactNode\n}\n\nexport type Props = Expand<AllProps>\n\nexport const Drawer = ({\n fillPage = false,\n footer,\n extraContent,\n ...props\n}: Props) => {\n return (\n <AntdDrawer\n {...props}\n closable={false}\n {...(fillPage && {
|
|
1
|
+
{"version":3,"file":"Drawer.cjs","sources":["../../../../src/components/drawer/Drawer.tsx"],"sourcesContent":["import { Drawer as AntdDrawer, DrawerProps, Space } from 'antd'\nimport { Button } from '../button'\nimport { XIcon } from '@phosphor-icons/react'\nimport './Drawer.css'\n\ntype AllProps = Omit<DrawerProps, 'extra' | 'closable'> & {\n fillPage?: boolean\n footer?: React.ReactNode\n extraContent?: React.ReactNode\n}\n\nexport type Props = Expand<AllProps>\n\nexport const Drawer = ({\n fillPage = false,\n footer,\n extraContent,\n ...props\n}: Props) => {\n return (\n <AntdDrawer\n {...props}\n closable={false}\n {...(fillPage && {\n size:\n props.placement === 'top' || props.placement === 'bottom'\n ? '100vh'\n : '100vw',\n })}\n {...(footer && { footer })}\n extra={\n <Space>\n {extraContent}\n <Button\n className=\"p-0\"\n type=\"link\"\n onClick={props.onClose}\n aria-label=\"Close\"\n >\n <XIcon size={22} weight=\"regular\" />\n </Button>\n </Space>\n }\n className=\"j2-drawer\"\n />\n )\n}\n"],"names":["jsx","AntdDrawer","Space","Button","XIcon"],"mappings":";;;;;;;AAaO,MAAM,SAAS,CAAC;AAAA,EACrB,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAa;AACX,SACEA,2BAAAA;AAAAA,IAACC,KAAAA;AAAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ,UAAU;AAAA,MACT,GAAI,YAAY;AAAA,QACf,MACE,MAAM,cAAc,SAAS,MAAM,cAAc,WAC7C,UACA;AAAA,MAAA;AAAA,MAEP,GAAI,UAAU,EAAE,OAAA;AAAA,MACjB,uCACGC,YAAA,EACE,UAAA;AAAA,QAAA;AAAA,QACDF,2BAAAA;AAAAA,UAACG,OAAAA;AAAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,SAAS,MAAM;AAAA,YACf,cAAW;AAAA,YAEX,UAAAH,2BAAAA,IAACI,aAAA,EAAM,MAAM,IAAI,QAAO,UAAA,CAAU;AAAA,UAAA;AAAA,QAAA;AAAA,MACpC,GACF;AAAA,MAEF,WAAU;AAAA,IAAA;AAAA,EAAA;AAGhB;;"}
|