@alexandregme/zljs 1.16.0 → 1.17.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/CHANGELOG.md +16 -1
- package/dist/index.d.ts +9 -8
- package/dist/index.js +18 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,20 @@ A change that needs action in an app has a **Migration** note. When updating, re
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [1.17.0] - 2026-11-02
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- `ReduxProvider`, the new name of `GlobalState`, with the types `ReduxProviderProps` and `ReduxStore`. It behaves the same
|
|
16
|
+
|
|
17
|
+
### Removed
|
|
18
|
+
|
|
19
|
+
- `GlobalState`, `GlobalStateProps` and `ExtendedStore`
|
|
20
|
+
|
|
21
|
+
#### Migration
|
|
22
|
+
|
|
23
|
+
Search the app for `GlobalState`, `GlobalStateProps` and `ExtendedStore` imported from `@alexandregme/zljs`, and replace them with `ReduxProvider`, `ReduxProviderProps` and `ReduxStore`. The props don't change.
|
|
24
|
+
|
|
11
25
|
## [1.16.0] - 2026-11-02
|
|
12
26
|
|
|
13
27
|
### Added
|
|
@@ -207,7 +221,8 @@ Replace the shade with the class of the `color` being tested, for example `/(^|\
|
|
|
207
221
|
|
|
208
222
|
The message of `Error` is `text-zl-danger`. `none` and `ghost` didn't change.
|
|
209
223
|
|
|
210
|
-
[Unreleased]: https://github.com/alexandregme/zljs/compare/v1.
|
|
224
|
+
[Unreleased]: https://github.com/alexandregme/zljs/compare/v1.17.0...HEAD
|
|
225
|
+
[1.17.0]: https://github.com/alexandregme/zljs/compare/v1.16.0...v1.17.0
|
|
211
226
|
[1.16.0]: https://github.com/alexandregme/zljs/compare/v1.15.0...v1.16.0
|
|
212
227
|
[1.15.0]: https://github.com/alexandregme/zljs/compare/v1.14.0...v1.15.0
|
|
213
228
|
[1.14.0]: https://github.com/alexandregme/zljs/compare/v1.13.0...v1.14.0
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { S as SemanticColor, D as DataColor } from './colors-CvgrDPVc.js';
|
|
|
4
4
|
export { FormInput, FormInputProps, FormProvider, FormProviderProps } from './rhf/index.js';
|
|
5
5
|
export { toast } from 'sonner';
|
|
6
6
|
import * as zustand from 'zustand';
|
|
7
|
-
import {
|
|
7
|
+
import { Reducer, Middleware, Store, Dispatch } from '@reduxjs/toolkit';
|
|
8
8
|
import 'react-hook-form';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -362,10 +362,7 @@ declare const useModalStore: zustand.UseBoundStore<Omit<zustand.StoreApi<ModalSt
|
|
|
362
362
|
};
|
|
363
363
|
}>;
|
|
364
364
|
|
|
365
|
-
interface
|
|
366
|
-
setDynamicReducers?: (reducers: Record<string, Reducer>) => void;
|
|
367
|
-
}
|
|
368
|
-
interface GlobalStateProps {
|
|
365
|
+
interface ReduxProviderProps {
|
|
369
366
|
children: ReactNode;
|
|
370
367
|
reducers?: Record<string, Reducer>;
|
|
371
368
|
middlewares?: Middleware[];
|
|
@@ -373,7 +370,11 @@ interface GlobalStateProps {
|
|
|
373
370
|
coreReducers?: Record<string, Reducer>;
|
|
374
371
|
}
|
|
375
372
|
|
|
376
|
-
declare const
|
|
373
|
+
declare const ReduxProvider: ({ children, reducers, middlewares, preloadedState, coreReducers, }: ReduxProviderProps) => react.JSX.Element;
|
|
374
|
+
|
|
375
|
+
interface ReduxStore extends Store {
|
|
376
|
+
setDynamicReducers?: (reducers: Record<string, Reducer>) => void;
|
|
377
|
+
}
|
|
377
378
|
|
|
378
379
|
interface RouterState {
|
|
379
380
|
urlAsPath: string;
|
|
@@ -498,5 +499,5 @@ declare class HTTPClient {
|
|
|
498
499
|
patch<T = unknown>(url: string, config?: HttpRequestConfig): Promise<T | undefined>;
|
|
499
500
|
}
|
|
500
501
|
|
|
501
|
-
export { AppWrapper, Button, Checkbox, ConnectedModal, DataColor, DataGrid, DocumentWrapper, Error, Form,
|
|
502
|
-
export type { AppState, AppWrapperProps, ButtonColor, ButtonProps, ButtonVariant, CheckboxProps, CheckboxVariant, ConnectedModalProps, DataGridColumn, DataGridProps, DocumentWrapperProps, ErrorProps,
|
|
502
|
+
export { AppWrapper, Button, Checkbox, ConnectedModal, DataColor, DataGrid, DocumentWrapper, Error, Form, HTTPClient, Heading, Icon, Input, Loader, Modal, PageWrapper, Radio, ReduxProvider, Select, SemanticColor, Sidebar, Spinner, StatsCard, Tag, Text, TextArea, Toaster, WhatsAppButton, splitURLasPath, useAppStore, useModalStore, usePageStore, useRouterStore, useToastStore };
|
|
503
|
+
export type { AppState, AppWrapperProps, ButtonColor, ButtonProps, ButtonVariant, CheckboxProps, CheckboxVariant, ConnectedModalProps, DataGridColumn, DataGridProps, DocumentWrapperProps, ErrorProps, FormProps, HeadingProps, HttpClientConfig, HttpRequestConfig, IconName, IconProps, InitPageFunction, InputProps, LoaderProps, ModalEntry, ModalProps, ModalState, PageState, PageWrapperProps, RadioProps, ReduxProviderProps, ReduxStore, RouterState, SelectOption, SelectProps, SidebarItem, SidebarProps, SidebarSection, SidebarUser, Size, SpinnerProps, SpinnerVariant, StatsCardProps, TagProps, TextAreaProps, TextProps, TextVariant, Toast, ToastState, ToastType, WhatsAppButtonProps };
|
package/dist/index.js
CHANGED
|
@@ -1135,13 +1135,14 @@ var useModalStore = create3()(
|
|
|
1135
1135
|
)
|
|
1136
1136
|
);
|
|
1137
1137
|
|
|
1138
|
-
// core/
|
|
1138
|
+
// core/redux/redux-provider/redux-provider.tsx
|
|
1139
1139
|
import { Provider } from "react-redux";
|
|
1140
|
+
|
|
1141
|
+
// core/redux/store/store.ts
|
|
1140
1142
|
import {
|
|
1141
1143
|
combineReducers,
|
|
1142
1144
|
configureStore
|
|
1143
1145
|
} from "@reduxjs/toolkit";
|
|
1144
|
-
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1145
1146
|
var store;
|
|
1146
1147
|
var persistentReducers = {};
|
|
1147
1148
|
var dynamicReducers = {};
|
|
@@ -1150,7 +1151,12 @@ var createReducer = (coreReducers) => combineReducers({
|
|
|
1150
1151
|
...persistentReducers,
|
|
1151
1152
|
...coreReducers
|
|
1152
1153
|
});
|
|
1153
|
-
var
|
|
1154
|
+
var getReduxStore = ({
|
|
1155
|
+
reducers,
|
|
1156
|
+
middlewares,
|
|
1157
|
+
preloadedState,
|
|
1158
|
+
coreReducers
|
|
1159
|
+
}) => {
|
|
1154
1160
|
persistentReducers = reducers;
|
|
1155
1161
|
if (!store) {
|
|
1156
1162
|
store = configureStore({
|
|
@@ -1167,20 +1173,23 @@ var createStore = (reducers, middlewares, preloadedState, coreReducers) => {
|
|
|
1167
1173
|
}
|
|
1168
1174
|
return store;
|
|
1169
1175
|
};
|
|
1170
|
-
|
|
1176
|
+
|
|
1177
|
+
// core/redux/redux-provider/redux-provider.tsx
|
|
1178
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1179
|
+
var ReduxProvider = ({
|
|
1171
1180
|
children,
|
|
1172
1181
|
reducers = {},
|
|
1173
1182
|
middlewares = [],
|
|
1174
1183
|
preloadedState = {},
|
|
1175
1184
|
coreReducers = {}
|
|
1176
1185
|
}) => {
|
|
1177
|
-
const
|
|
1186
|
+
const store2 = getReduxStore({
|
|
1178
1187
|
reducers,
|
|
1179
1188
|
middlewares,
|
|
1180
1189
|
preloadedState,
|
|
1181
1190
|
coreReducers
|
|
1182
|
-
);
|
|
1183
|
-
return /* @__PURE__ */ jsx17(Provider, { store:
|
|
1191
|
+
});
|
|
1192
|
+
return /* @__PURE__ */ jsx17(Provider, { store: store2, children });
|
|
1184
1193
|
};
|
|
1185
1194
|
|
|
1186
1195
|
// core/state/router/router.store.ts
|
|
@@ -1340,7 +1349,7 @@ var AppWrapper = ({
|
|
|
1340
1349
|
}
|
|
1341
1350
|
}, [router?.isReady, router?.asPath, setRoute]);
|
|
1342
1351
|
return /* @__PURE__ */ jsx22(SessionProvider, { children: /* @__PURE__ */ jsxs13(
|
|
1343
|
-
|
|
1352
|
+
ReduxProvider,
|
|
1344
1353
|
{
|
|
1345
1354
|
reducers,
|
|
1346
1355
|
middlewares,
|
|
@@ -1446,7 +1455,6 @@ export {
|
|
|
1446
1455
|
Form,
|
|
1447
1456
|
FormInput,
|
|
1448
1457
|
FormProvider,
|
|
1449
|
-
GlobalState,
|
|
1450
1458
|
HTTPClient,
|
|
1451
1459
|
Heading,
|
|
1452
1460
|
Icon,
|
|
@@ -1455,6 +1463,7 @@ export {
|
|
|
1455
1463
|
Modal,
|
|
1456
1464
|
PageWrapper,
|
|
1457
1465
|
Radio,
|
|
1466
|
+
ReduxProvider,
|
|
1458
1467
|
Select,
|
|
1459
1468
|
Sidebar,
|
|
1460
1469
|
Spinner,
|