@cxpinsight/react-native 0.10.0 → 0.11.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +100 -0
  2. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,105 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.11.0
4
+
5
+ Requires `@cxpinsight/survey-spec@^0.6.0`.
6
+
7
+ ### Fixed
8
+
9
+ - **A "not" condition could never be true.** An author writing `not {plan} =
10
+ "pro"` got a rule that read correctly and matched nothing, because `not` was
11
+ applied to the answer before the comparison instead of to the comparison. The
12
+ question it guarded either never appeared or never went away.
13
+
14
+ It also meant two answers to the same question: the server works branching
15
+ logic out in advance now, and the server had always read this correctly, so
16
+ the same condition could resolve one way from the compiled version and the
17
+ other way from the written one.
18
+
19
+ - **Two settings the builder accepted and nothing applied.** A pattern set as
20
+ `regex` on a question was read by nothing at all — the same pattern written as
21
+ a rule was enforced, so identical intent behaved differently depending on how
22
+ it was entered. And a minimum or maximum on a number question never applied,
23
+ because the answer arrives as text and the check only looked at numbers.
24
+
25
+ Both now behave the way the builder implies. Neither is enforced any
26
+ differently on the server, where an author-supplied pattern against a
27
+ respondent's answer is a risk to every customer rather than to one.
28
+
29
+ ### Note
30
+
31
+ Release notes for 0.10.0 were written after that version was published, so they
32
+ appear in this package for the first time here. Nothing about 0.10.0 changed.
33
+
34
+ ## 0.10.0
35
+
36
+ Requires `@cxpinsight/survey-spec@^0.5.1`.
37
+
38
+ ### Fixed
39
+
40
+ - **Six targeting operators were equality tests in disguise.** The trigger
41
+ engine implemented 8 of the 14 operators and quietly treated the rest as
42
+ `equals`. So `in`, `not_in`, `not_contains`, `starts_with`, `ends_with` and
43
+ `not_exists` behaved correctly on web and almost never fired on mobile, from
44
+ the same rule, with nothing anywhere reporting the difference.
45
+
46
+ An author targeting `path starts_with /checkout` got an interaction that
47
+ appeared on a website and stayed silent in the app — `/checkout/payment` is
48
+ not equal to `/checkout`. All six now work, and an operator this SDK does not
49
+ recognise fails closed and is reported through `getUnknownTokens()` instead of
50
+ being guessed at.
51
+
52
+ - **An action's destination is resolved before it is opened.** A button's
53
+ destination is written as a template — `myapp://cart/{{orderId}}` — and the
54
+ reference was being handed to the renderer as written, so the button opened a
55
+ literal `{{orderId}}` instead of the customer's cart. If a reference resolves
56
+ to nothing, the button now opens nothing rather than sending someone to a
57
+ broken address; the answer is still recorded either way.
58
+
59
+ - **Two ways question text could show a respondent things it should not.**
60
+ `{{constructor}}` printed JavaScript internals onto the screen, and
61
+ `{{q.answer}}` for a matrix, panel or file question printed the raw answer
62
+ object — including every field it held. Both now render as empty text.
63
+
64
+ ### Added
65
+
66
+ - **Conditions arrive already compiled.** The server now works out each
67
+ question's show/hide logic once and sends the result with the survey, so this
68
+ SDK follows a decision instead of re-reading the rule on every answer. Surveys
69
+ served without it fall back to the previous behaviour, so nothing changes
70
+ until a customer's surveys are served the new way.
71
+
72
+ - **"Remind me later."** A choice that closes the interaction and records a skip
73
+ rather than an answer — so it comes back after the wait and gives up after the
74
+ last try. Built as an ordinary choice it did the opposite: it recorded a
75
+ decision and retired the interaction for good, meaning the one button whose
76
+ purpose is to bring it back guaranteed it never would.
77
+
78
+ - **Four interaction purposes** — ask, notify, offer and comply — each with an
79
+ ending that matches what was asked, rather than thanking someone for answering
80
+ a question that was never put to them.
81
+
82
+ - **The SDK reports what it can actually run.** It now declares its supported
83
+ question types and operators, so a survey using something this version cannot
84
+ render is visible as a version gap rather than as a blank space on a phone.
85
+
86
+ ### Changed
87
+
88
+ - Question rendering is driven by the compiled primitive rather than the
89
+ question type, which is what lets a new question type reach mobile without an
90
+ SDK release.
91
+
92
+ ## 0.9.0
93
+
94
+ ### Added
95
+
96
+ - **The implied question type**, which is what lets Notify, Offer and Comply
97
+ render at all. An implied question's choices *are* its action buttons, so the
98
+ labels an author writes — "Activate discount" / "No thanks", "I agree &
99
+ continue" / "Decline" — are the labels the respondent presses. The three
100
+ interaction kinds had been seeded but marked coming soon, because there was no
101
+ question type meaning "the answer is which action you took".
102
+
3
103
  ## 0.8.0
4
104
 
5
105
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cxpinsight/react-native",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "CXPinsight React Native SDK — engagement tracking, native survey modals & visual setup mode",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -11,7 +11,7 @@
11
11
  "test": "node --test test/*.test.js"
12
12
  },
13
13
  "dependencies": {
14
- "@cxpinsight/survey-spec": "^0.5.1"
14
+ "@cxpinsight/survey-spec": "^0.6.0"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "@react-native-async-storage/async-storage": ">=1.19.0",