@salesforcedevs/dx-components 1.35.0 → 1.35.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dx-components",
|
|
3
|
-
"version": "1.35.
|
|
3
|
+
"version": "1.35.1",
|
|
4
4
|
"description": "DX Lightning web components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"luxon": "3.4.4",
|
|
45
45
|
"msw": "^2.12.4"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "0112829c264018cab7536554f5984faa2fc5c4f5"
|
|
48
48
|
}
|
|
@@ -96,11 +96,33 @@ export default class AgentMiawUi extends LightningElement {
|
|
|
96
96
|
/** When set, forwarded to the embed as `welcome-text` (greeting / headline copy). */
|
|
97
97
|
@api welcomeText?: string;
|
|
98
98
|
@api agentforceEnv?: string;
|
|
99
|
+
private _hideAgentConditionally = false;
|
|
100
|
+
|
|
99
101
|
/**
|
|
100
|
-
* When
|
|
102
|
+
* When set, mounting of the agent is gated behind the `showAgent=true` query param
|
|
101
103
|
* or `show_agent=true` cookie opt-in; otherwise (and by default), gating is off.
|
|
104
|
+
*
|
|
105
|
+
* COERCION: this component is consumed as raw, server-rendered HTML on an LWR page —
|
|
106
|
+
* not inside another LWC's template — so LWC's presence→boolean attribute convention
|
|
107
|
+
* does NOT apply automatically. Native attribute reflection runs instead, and LWC's
|
|
108
|
+
* attributeChangedCallback assigns the raw attribute STRING to this property
|
|
109
|
+
* (`this[prop] = newValue`), so a bare `hide-agent-conditionally` arrives as `""`, not
|
|
110
|
+
* boolean `true`. This setter restores HTML boolean-attribute semantics by source:
|
|
111
|
+
* - boolean (LWC property API / tests): honored as-is, so `false` turns gating off.
|
|
112
|
+
* - string (native attribute reflection): PRESENCE means true regardless of value —
|
|
113
|
+
* `""`, `"true"`, and even `"false"` all enable gating, exactly like `disabled="false"`
|
|
114
|
+
* is still disabled. Only absence (null/undefined, i.e. the attribute removed) is false.
|
|
102
115
|
*/
|
|
103
|
-
@api
|
|
116
|
+
@api
|
|
117
|
+
get hideAgentConditionally(): boolean {
|
|
118
|
+
return this._hideAgentConditionally;
|
|
119
|
+
}
|
|
120
|
+
set hideAgentConditionally(value: boolean | string | null | undefined) {
|
|
121
|
+
this._hideAgentConditionally =
|
|
122
|
+
typeof value === "boolean"
|
|
123
|
+
? value
|
|
124
|
+
: value !== null && value !== undefined;
|
|
125
|
+
}
|
|
104
126
|
/**
|
|
105
127
|
* Apex domain that the opt-in cookie targets (covers subdomains); applied only when the
|
|
106
128
|
* current host matches it, so local dev / preview hosts fall back to a host-only cookie.
|