@lumiastream/ui 0.6.9 → 0.7.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.
- package/dist/index.js +14 -14
- package/dist/se-import.js +14 -14
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -5412,10 +5412,8 @@ function mapChatbox(widget, ctx) {
|
|
|
5412
5412
|
const fadeOutSeconds = isPermanent ? 0 : typeof v.fadeOut === "number" && v.fadeOut > 0 ? v.fadeOut : typeof v.delay === "number" && v.delay > 0 ? v.delay : DEFAULT_FADE_SECONDS;
|
|
5413
5413
|
const DEFAULT_CHATBOX_FONT_SIZE = 14;
|
|
5414
5414
|
const moduleCss = {};
|
|
5415
|
-
const
|
|
5416
|
-
|
|
5417
|
-
const fontSize = messageWins("font-size");
|
|
5418
|
-
moduleCss.fontSize = fontSize != null ? fontSize : DEFAULT_CHATBOX_FONT_SIZE;
|
|
5415
|
+
const messageFontSize = messageCss["font-size"];
|
|
5416
|
+
moduleCss.fontSize = typeof messageFontSize === "number" && messageFontSize > 0 || typeof messageFontSize === "string" && messageFontSize.length > 0 ? messageFontSize : DEFAULT_CHATBOX_FONT_SIZE;
|
|
5419
5417
|
const rawColor = messageWins("color");
|
|
5420
5418
|
const isSeDefaultColor = rawColor == null || typeof rawColor === "string" && (rawColor === "" || rawColor.toLowerCase() === "#fff" || rawColor.toLowerCase() === "#ffffff");
|
|
5421
5419
|
if (!isSeDefaultColor) {
|
|
@@ -5425,6 +5423,10 @@ function mapChatbox(widget, ctx) {
|
|
|
5425
5423
|
} else if (rawColor != null) {
|
|
5426
5424
|
moduleCss.color = rawColor;
|
|
5427
5425
|
}
|
|
5426
|
+
const messageFontFamily = messageCss["font-family"];
|
|
5427
|
+
if (typeof messageFontFamily === "string" && messageFontFamily.length > 0) {
|
|
5428
|
+
moduleCss.fontFamily = messageFontFamily;
|
|
5429
|
+
}
|
|
5428
5430
|
const messageTextShadow = messageCss["text-shadow"];
|
|
5429
5431
|
if (typeof messageTextShadow === "string" && messageTextShadow.length > 0) {
|
|
5430
5432
|
moduleCss.textShadow = messageTextShadow;
|
|
@@ -10209,19 +10211,17 @@ function StepReview({
|
|
|
10209
10211
|
] });
|
|
10210
10212
|
}
|
|
10211
10213
|
var CUSTOM_WIDGET_TABS = [
|
|
10212
|
-
{ key: "
|
|
10213
|
-
{ key: "
|
|
10214
|
-
{ key: "
|
|
10215
|
-
{ key: "
|
|
10216
|
-
{ key: "
|
|
10217
|
-
{ key: "
|
|
10218
|
-
{ key: "provider", label: "
|
|
10214
|
+
{ key: "css", label: "CSS" },
|
|
10215
|
+
{ key: "html", label: "HTML" },
|
|
10216
|
+
{ key: "js", label: "JS" },
|
|
10217
|
+
{ key: "fields", label: "Fields" },
|
|
10218
|
+
{ key: "fieldData", label: "FieldData" },
|
|
10219
|
+
{ key: "listeners", label: "Listeners" },
|
|
10220
|
+
{ key: "provider", label: "Provider" }
|
|
10219
10221
|
];
|
|
10220
10222
|
function CustomWidgetCard({ widget }) {
|
|
10221
10223
|
const tabs = CUSTOM_WIDGET_TABS.filter(({ key }) => widget[key].trim().length > 0);
|
|
10222
|
-
const [activeKey, setActiveKey] = useState6(
|
|
10223
|
-
tabs[0]?.key ?? "js"
|
|
10224
|
-
);
|
|
10224
|
+
const [activeKey, setActiveKey] = useState6(tabs[0]?.key ?? "js");
|
|
10225
10225
|
const [copied, setCopied] = useState6(false);
|
|
10226
10226
|
const value = widget[activeKey] ?? "";
|
|
10227
10227
|
useEffect6(() => setCopied(false), [activeKey]);
|
package/dist/se-import.js
CHANGED
|
@@ -2332,10 +2332,8 @@ function mapChatbox(widget, ctx) {
|
|
|
2332
2332
|
const fadeOutSeconds = isPermanent ? 0 : typeof v.fadeOut === "number" && v.fadeOut > 0 ? v.fadeOut : typeof v.delay === "number" && v.delay > 0 ? v.delay : DEFAULT_FADE_SECONDS;
|
|
2333
2333
|
const DEFAULT_CHATBOX_FONT_SIZE = 14;
|
|
2334
2334
|
const moduleCss = {};
|
|
2335
|
-
const
|
|
2336
|
-
|
|
2337
|
-
const fontSize = messageWins("font-size");
|
|
2338
|
-
moduleCss.fontSize = fontSize != null ? fontSize : DEFAULT_CHATBOX_FONT_SIZE;
|
|
2335
|
+
const messageFontSize = messageCss["font-size"];
|
|
2336
|
+
moduleCss.fontSize = typeof messageFontSize === "number" && messageFontSize > 0 || typeof messageFontSize === "string" && messageFontSize.length > 0 ? messageFontSize : DEFAULT_CHATBOX_FONT_SIZE;
|
|
2339
2337
|
const rawColor = messageWins("color");
|
|
2340
2338
|
const isSeDefaultColor = rawColor == null || typeof rawColor === "string" && (rawColor === "" || rawColor.toLowerCase() === "#fff" || rawColor.toLowerCase() === "#ffffff");
|
|
2341
2339
|
if (!isSeDefaultColor) {
|
|
@@ -2345,6 +2343,10 @@ function mapChatbox(widget, ctx) {
|
|
|
2345
2343
|
} else if (rawColor != null) {
|
|
2346
2344
|
moduleCss.color = rawColor;
|
|
2347
2345
|
}
|
|
2346
|
+
const messageFontFamily = messageCss["font-family"];
|
|
2347
|
+
if (typeof messageFontFamily === "string" && messageFontFamily.length > 0) {
|
|
2348
|
+
moduleCss.fontFamily = messageFontFamily;
|
|
2349
|
+
}
|
|
2348
2350
|
const messageTextShadow = messageCss["text-shadow"];
|
|
2349
2351
|
if (typeof messageTextShadow === "string" && messageTextShadow.length > 0) {
|
|
2350
2352
|
moduleCss.textShadow = messageTextShadow;
|
|
@@ -9085,19 +9087,17 @@ function StepReview({
|
|
|
9085
9087
|
] });
|
|
9086
9088
|
}
|
|
9087
9089
|
var CUSTOM_WIDGET_TABS = [
|
|
9088
|
-
{ key: "
|
|
9089
|
-
{ key: "
|
|
9090
|
-
{ key: "
|
|
9091
|
-
{ key: "
|
|
9092
|
-
{ key: "
|
|
9093
|
-
{ key: "
|
|
9094
|
-
{ key: "provider", label: "
|
|
9090
|
+
{ key: "css", label: "CSS" },
|
|
9091
|
+
{ key: "html", label: "HTML" },
|
|
9092
|
+
{ key: "js", label: "JS" },
|
|
9093
|
+
{ key: "fields", label: "Fields" },
|
|
9094
|
+
{ key: "fieldData", label: "FieldData" },
|
|
9095
|
+
{ key: "listeners", label: "Listeners" },
|
|
9096
|
+
{ key: "provider", label: "Provider" }
|
|
9095
9097
|
];
|
|
9096
9098
|
function CustomWidgetCard({ widget }) {
|
|
9097
9099
|
const tabs = CUSTOM_WIDGET_TABS.filter(({ key }) => widget[key].trim().length > 0);
|
|
9098
|
-
const [activeKey, setActiveKey] = useState6(
|
|
9099
|
-
tabs[0]?.key ?? "js"
|
|
9100
|
-
);
|
|
9100
|
+
const [activeKey, setActiveKey] = useState6(tabs[0]?.key ?? "js");
|
|
9101
9101
|
const [copied, setCopied] = useState6(false);
|
|
9102
9102
|
const value = widget[activeKey] ?? "";
|
|
9103
9103
|
useEffect6(() => setCopied(false), [activeKey]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lumiastream/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"author": "Lumia Stream",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"description": "Lumia UI Kit",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
},
|
|
130
130
|
"dependencies": {
|
|
131
131
|
"@lumiastream/lumia-translations": "1.16.5",
|
|
132
|
-
"@lumiastream/lumia-types": "3.6.
|
|
132
|
+
"@lumiastream/lumia-types": "3.6.6",
|
|
133
133
|
"classnames": "^2.5.1",
|
|
134
134
|
"globals": "^17.4.0",
|
|
135
135
|
"nanoid": "^5.1.11",
|