@alexandregme/zljs 2.1.0 → 2.1.2
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
CHANGED
|
@@ -8,6 +8,12 @@ A change that needs action in an app has a **Migration** note. When updating, re
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [2.1.2] - 2026-11-04
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- `WhatsAppButton` opens `whatsapp://send` on a phone, the scheme in Meta's iOS docs. It opened `whatsapp-business://send`, which is in no official doc: on an iPhone with WhatsApp Business installed, Safari said the address was invalid. On Android, a phone with both apps asks which one to use; on an iPhone, iOS picks one of them
|
|
16
|
+
|
|
11
17
|
## [2.1.0] - 2026-11-03
|
|
12
18
|
|
|
13
19
|
### Added
|
|
@@ -369,7 +375,8 @@ Replace the shade with the class of the `color` being tested, for example `/(^|\
|
|
|
369
375
|
|
|
370
376
|
The message of `Error` is `text-zl-danger`. `none` and `ghost` didn't change.
|
|
371
377
|
|
|
372
|
-
[Unreleased]: https://github.com/alexandregme/zljs/compare/v2.1.
|
|
378
|
+
[Unreleased]: https://github.com/alexandregme/zljs/compare/v2.1.2...HEAD
|
|
379
|
+
[2.1.2]: https://github.com/alexandregme/zljs/compare/v2.1.0...v2.1.2
|
|
373
380
|
[2.1.0]: https://github.com/alexandregme/zljs/compare/v2.0.1...v2.1.0
|
|
374
381
|
[2.0.1]: https://github.com/alexandregme/zljs/compare/v2.0.0...v2.0.1
|
|
375
382
|
[2.0.0]: https://github.com/alexandregme/zljs/compare/v1.19.1...v2.0.0
|
|
@@ -269,6 +269,7 @@ import {
|
|
|
269
269
|
combineReducers,
|
|
270
270
|
configureStore
|
|
271
271
|
} from "@reduxjs/toolkit";
|
|
272
|
+
var emptyReducer = (state = {}) => state;
|
|
272
273
|
var createReduxStore = ({
|
|
273
274
|
reducers,
|
|
274
275
|
middlewares,
|
|
@@ -276,11 +277,10 @@ var createReduxStore = ({
|
|
|
276
277
|
coreReducers
|
|
277
278
|
}) => {
|
|
278
279
|
let dynamicReducers = {};
|
|
279
|
-
const createReducer = () =>
|
|
280
|
-
...dynamicReducers,
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
});
|
|
280
|
+
const createReducer = () => {
|
|
281
|
+
const all = { ...dynamicReducers, ...reducers, ...coreReducers };
|
|
282
|
+
return Object.keys(all).length ? combineReducers(all) : emptyReducer;
|
|
283
|
+
};
|
|
284
284
|
const store = configureStore({
|
|
285
285
|
reducer: createReducer(),
|
|
286
286
|
middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(middlewares),
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
usePageStore,
|
|
13
13
|
useRouterStore,
|
|
14
14
|
useToastStore
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CJYKXG6S.js";
|
|
16
16
|
import {
|
|
17
17
|
Error,
|
|
18
18
|
FormInput,
|
|
@@ -804,7 +804,7 @@ var Modal = ({
|
|
|
804
804
|
|
|
805
805
|
// core/whatsapp-button/whatsapp-button.const.ts
|
|
806
806
|
var whatsappWebUrl = "https://wa.me";
|
|
807
|
-
var
|
|
807
|
+
var whatsappAppUrl = "whatsapp://send";
|
|
808
808
|
var whatsappMobileUserAgent = /Android|iPhone|iPad|iPod/i;
|
|
809
809
|
|
|
810
810
|
// core/whatsapp-button/whatsapp-button.tsx
|
|
@@ -821,12 +821,12 @@ var WhatsAppButton = ({
|
|
|
821
821
|
const hasMessage = Boolean(message);
|
|
822
822
|
const encodedMessage = hasMessage ? encodeURIComponent(message) : "";
|
|
823
823
|
const webUrl = hasMessage ? `${whatsappWebUrl}/${phone}?text=${encodedMessage}` : `${whatsappWebUrl}/${phone}`;
|
|
824
|
-
const
|
|
824
|
+
const appUrl = hasMessage ? `${whatsappAppUrl}?phone=${phone}&text=${encodedMessage}` : `${whatsappAppUrl}?phone=${phone}`;
|
|
825
825
|
if (isMobile) {
|
|
826
826
|
if (window.location?.assign) {
|
|
827
|
-
window.location.assign(
|
|
827
|
+
window.location.assign(appUrl);
|
|
828
828
|
} else {
|
|
829
|
-
window.location.href =
|
|
829
|
+
window.location.href = appUrl;
|
|
830
830
|
}
|
|
831
831
|
} else {
|
|
832
832
|
window.open(webUrl, "_blank");
|
package/dist/next/index.js
CHANGED