@akinon/pz-theme 2.0.165-rc.0 → 2.0.165

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
@@ -1,56 +1,15 @@
1
1
  # @akinon/pz-theme
2
2
 
3
- ## 2.0.165-rc.0
4
-
5
- ### Patch Changes
6
-
7
- - 8e040731e: ZERO-5235: let brands hang actions on order detail lines
8
- - c761b9fd4: ZERO-5296: fall back to the storefront default language in the text block
9
- - 17a598dae: ZERO-5296: report the storefront default language to the editor
10
- - 3b05a407d: ZERO-5232: allow richtext settings on custom blocks
11
- - Updated dependencies [86187b1c2]
12
- - Updated dependencies [08390a87]
13
- - Updated dependencies [0cf9ea239]
14
- - Updated dependencies [324f97d55]
15
- - Updated dependencies [4c3465ae]
16
- - Updated dependencies [51ea06888]
17
- - Updated dependencies
18
- - Updated dependencies [549da545]
19
- - Updated dependencies [2fea41430]
20
- - Updated dependencies [b55acb768]
21
- - Updated dependencies [760258c1c]
22
- - Updated dependencies [143be2b9d]
23
- - Updated dependencies [7889b08fe]
24
- - Updated dependencies [9f8cd3bc5]
25
- - Updated dependencies [d635d345]
26
- - Updated dependencies [bfafa3f49]
27
- - Updated dependencies [d860c917]
28
- - Updated dependencies [ac6cada1]
29
- - Updated dependencies [e90c0e02]
30
- - Updated dependencies [dc7f9ca5]
31
- - Updated dependencies [57d7eb305]
32
- - Updated dependencies [0145dc3f]
33
- - Updated dependencies [d99a6a7d5]
34
- - Updated dependencies [92086b29]
35
- - Updated dependencies [227b7408]
36
- - Updated dependencies [9db81a714]
37
- - Updated dependencies [591e345e1]
38
- - Updated dependencies [4de5303c5]
39
- - Updated dependencies [95b139dc1]
40
- - Updated dependencies [1d00f2d06]
41
- - Updated dependencies [4ac7b2a1e]
42
- - Updated dependencies [4998a9631]
43
- - Updated dependencies [804d2bd6c]
44
- - Updated dependencies [3909d3224]
45
- - Updated dependencies [6a3d8a631]
46
- - Updated dependencies [e18836b20]
47
- - Updated dependencies [b1111d7b1]
48
- - Updated dependencies [1595d458e]
49
- - Updated dependencies [dca128112]
50
- - Updated dependencies [9a7b0937]
51
- - Updated dependencies [8853822c]
52
- - @akinon/next@2.0.165-rc.0
53
- - @akinon/theme-contract@2.0.165-rc.0
3
+ ## 2.0.165
4
+
5
+ ### Patch Changes
6
+
7
+ - 75fa18b0: The profile-form block composes from child blocks, the way the register form does. With children it draws them — an `auth-field` per input, an `auth-consent` per contact channel, any text, link or group around them — starts each one from the shopper's profile, and saves only what is on screen: the profile is PATCHed, so a field the composition does not show (or hides on a breakpoint) keeps its stored value, a question never answered is not written, a box the shopper emptied is sent as `''`, and a visible tick posts `true` or `false` (a custom tick its own value). Visibility is judged per field, so a brand's own drawn checkbox or radio still counts. The e-mail is drawn disabled, Form State children show only in their state, and a profile that fails to load shows the error message. Without children the fixed rows render exactly as before. New `requiredMessage` / `invalidMessage` properties carry the composed fields' validation copy.
8
+
9
+ `auth-field` gains a radio variant for gender (`choiceControl: radio`) and a day / month / year select variant for the birth date (`dateControl: selects`, with `dayPlaceholder`, `monthPlaceholder`, `yearPlaceholder`, `monthLabels`, `minAge`, `maxAge`); both submit the same values as before. `auth-consent` gains one tick per contact channel (`consentType`: `email`, `sms`, `call`, `whatsapp` → `email_allowed` … `whatsapp_allowed`), never required; a register form reads it in place of its blanket marketing answer for that channel, and a channel tick hidden on the current breakpoint no longer answers there. A compound field's parts are validated and cleared under the field's name in every composed form, and a field hidden behind a brand-drawn control is still validated.
10
+
11
+ - @akinon/next@2.0.165
12
+ - @akinon/theme-contract@2.0.165
54
13
 
55
14
  ## 2.0.164
56
15
 
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@akinon/pz-theme",
3
3
  "description": "Theme package for Project Zero Next — ThemePlaceholder system and theme editor infrastructure",
4
- "version": "2.0.165-rc.0",
4
+ "version": "2.0.165",
5
5
  "license": "MIT",
6
6
  "main": "src/index.ts",
7
7
  "scripts": {
8
8
  "test": "jest"
9
9
  },
10
10
  "peerDependencies": {
11
- "@akinon/next": "2.0.165-rc.0",
11
+ "@akinon/next": "2.0.165",
12
12
  "react": "^18.0.0 || ^19.0.0",
13
13
  "react-dom": "^18.0.0 || ^19.0.0"
14
14
  },
15
15
  "dependencies": {
16
- "@akinon/theme-contract": "2.0.165-rc.0",
16
+ "@akinon/theme-contract": "2.0.165",
17
17
  "clsx": "2.1.1",
18
18
  "lottie-web": "^5.13.0",
19
19
  "react-multi-carousel": "2.8.4",
@@ -21,7 +21,7 @@
21
21
  "zod": "4.4.1"
22
22
  },
23
23
  "devDependencies": {
24
- "@akinon/next": "2.0.165-rc.0",
24
+ "@akinon/next": "2.0.165",
25
25
  "@testing-library/jest-dom": "5.16.4",
26
26
  "@testing-library/react": "16.3.2",
27
27
  "@testing-library/user-event": "14.1.1",
@@ -28,7 +28,6 @@ const SETTINGS_LOCALES = [
28
28
  const mockLocalization = {
29
29
  locale: 'tr',
30
30
  locales: SETTINGS_LOCALES as Array<Record<string, unknown>>,
31
- defaultLocaleValue: 'tr',
32
31
  setLocale: jest.fn()
33
32
  };
34
33
 
@@ -107,7 +106,6 @@ beforeEach(() => {
107
106
  postMessage.mockClear();
108
107
  mockLocalization.locale = 'tr';
109
108
  mockLocalization.locales = SETTINGS_LOCALES;
110
- mockLocalization.defaultLocaleValue = 'tr';
111
109
  mockLocalization.setLocale = jest.fn();
112
110
  delete (window as { __iframeReadySent?: boolean }).__iframeReadySent;
113
111
  });
@@ -146,8 +144,7 @@ describe('inside the editor', () => {
146
144
  { value: 'en', label: 'English' },
147
145
  { value: 'tr', label: 'Türkçe' },
148
146
  { value: 'de', label: 'de' }
149
- ],
150
- defaultLocale: 'tr'
147
+ ]
151
148
  }
152
149
  })
153
150
  ]);
@@ -157,34 +154,6 @@ describe('inside the editor', () => {
157
154
  expect(targetOrigin).toBe(EDITOR_ORIGIN);
158
155
  });
159
156
 
160
- it('posts the languages before the document reports ready', () => {
161
- // The editor holds every per-language write until IFRAME_READY and takes
162
- // "ready without languages" to mean they are never coming, so the order
163
- // of the two frames is part of the contract.
164
- render(placeholder('header'));
165
-
166
- const types = postMessage.mock.calls.map(([message]) => message?.type);
167
- expect(types).toContain('LOCALE_UPDATE');
168
- expect(types).toContain('IFRAME_READY');
169
- expect(types.indexOf('LOCALE_UPDATE')).toBeLessThan(
170
- types.indexOf('IFRAME_READY')
171
- );
172
- });
173
-
174
- it("posts the brand's default language, whichever it is", () => {
175
- // The editor's per-language text controls take the plain-string form to
176
- // mean this language; left to guess, the editor assumed English.
177
- mockLocalization.defaultLocaleValue = 'de';
178
-
179
- render(<EditorLocaleBridge />);
180
-
181
- expect(localeFrames()).toEqual([
182
- expect.objectContaining({
183
- data: expect.objectContaining({ locale: 'tr', defaultLocale: 'de' })
184
- })
185
- ]);
186
- });
187
-
188
157
  it("follows the editor's switch exactly once, with several placeholders mounted", () => {
189
158
  render(
190
159
  <>