@lowdefy/actions-core 5.2.0 → 5.4.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.
@@ -0,0 +1,22 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ function SetLocale({ globals, methods, params }) {
16
+ const { window } = globals;
17
+ const next = params?.locale ?? 'auto';
18
+ window.__lowdefy_setLocale?.(next);
19
+ // Trigger engine update cascade so _locale and _t re-evaluate in all blocks.
20
+ methods.setGlobal({});
21
+ }
22
+ export default SetLocale;
@@ -0,0 +1,27 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ export default {
16
+ type: 'object',
17
+ params: {
18
+ type: 'object',
19
+ properties: {
20
+ locale: {
21
+ type: 'string',
22
+ description: 'BCP 47 locale code (e.g. "en-US", "de-DE") declared in config.i18n.locales, or "auto" to clear the user preference and follow browser/default.'
23
+ }
24
+ },
25
+ additionalProperties: false
26
+ }
27
+ };
package/dist/actions.js CHANGED
@@ -28,6 +28,7 @@ export { default as ScrollTo } from './actions/ScrollTo/ScrollTo.js';
28
28
  export { default as SetDarkMode } from './actions/SetDarkMode/SetDarkMode.js';
29
29
  export { default as SetFocus } from './actions/SetFocus/SetFocus.js';
30
30
  export { default as SetGlobal } from './actions/SetGlobal/SetGlobal.js';
31
+ export { default as SetLocale } from './actions/SetLocale/SetLocale.js';
31
32
  export { default as SetState } from './actions/SetState/SetState.js';
32
33
  export { default as Throw } from './actions/Throw/Throw.js';
33
34
  export { default as UpdateSession } from './actions/UpdateSession/UpdateSession.js';
package/dist/schemas.js CHANGED
@@ -28,6 +28,7 @@ export { default as ScrollTo } from './actions/ScrollTo/schema.js';
28
28
  export { default as SetDarkMode } from './actions/SetDarkMode/schema.js';
29
29
  export { default as SetFocus } from './actions/SetFocus/schema.js';
30
30
  export { default as SetGlobal } from './actions/SetGlobal/schema.js';
31
+ export { default as SetLocale } from './actions/SetLocale/schema.js';
31
32
  export { default as SetState } from './actions/SetState/schema.js';
32
33
  export { default as Throw } from './actions/Throw/schema.js';
33
34
  export { default as UpdateSession } from './actions/UpdateSession/schema.js';
package/dist/types.js CHANGED
@@ -30,6 +30,7 @@
30
30
  'SetDarkMode',
31
31
  'SetFocus',
32
32
  'SetGlobal',
33
+ 'SetLocale',
33
34
  'SetState',
34
35
  'Throw',
35
36
  'UpdateSession',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/actions-core",
3
- "version": "5.2.0",
3
+ "version": "5.4.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -44,12 +44,12 @@
44
44
  "dist/*"
45
45
  ],
46
46
  "dependencies": {
47
- "@lowdefy/errors": "5.2.0",
48
- "@lowdefy/helpers": "5.2.0"
47
+ "@lowdefy/errors": "5.4.0",
48
+ "@lowdefy/helpers": "5.4.0"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@jest/globals": "28.1.3",
52
- "@lowdefy/node-utils": "5.2.0",
52
+ "@lowdefy/node-utils": "5.4.0",
53
53
  "@swc/cli": "0.8.0",
54
54
  "@swc/core": "1.15.18",
55
55
  "@swc/jest": "0.2.39",