@planningcenter/topbar 12.2.0 → 12.2.1-rc.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/topbar.css +3 -1
- package/dist/topbar.css.map +1 -1
- package/dist/topbar.js +199 -24
- package/dist/topbar.js.map +1 -1
- package/dist/topbar.modern.js +199 -24
- package/dist/topbar.modern.js.map +1 -1
- package/dist/topbar.module.js +199 -24
- package/dist/topbar.module.js.map +1 -1
- package/dist/topbar.umd.js +199 -24
- package/dist/topbar.umd.js.map +1 -1
- package/package.json +4 -3
package/dist/topbar.umd.js
CHANGED
|
@@ -4191,7 +4191,7 @@ true;
|
|
|
4191
4191
|
|
|
4192
4192
|
const pcoUrl = pcoUrl$1;
|
|
4193
4193
|
|
|
4194
|
-
var styles = {"banner":"banner-YfQ37","content":"content-lNjWf","icon":"icon-abz7q","iconShape":"iconShape-6uyot","
|
|
4194
|
+
var styles = {"banner":"banner-YfQ37","content":"content-lNjWf","icon":"icon-abz7q","iconShape":"iconShape-6uyot","iconSparkle":"iconSparkle-t0OzK","text":"text--Vlhl","title":"title-zOEOR","subtitle":"subtitle-ufLnk","chevron":"chevron-oOUA-"};
|
|
4195
4195
|
|
|
4196
4196
|
function AskAIBanner({
|
|
4197
4197
|
onClick
|
|
@@ -4214,40 +4214,198 @@ true;
|
|
|
4214
4214
|
size: "16px"
|
|
4215
4215
|
}));
|
|
4216
4216
|
}
|
|
4217
|
-
const
|
|
4217
|
+
const SQUIRCLE_PATH = "M15.9994 0C3.19766 0 0 3.20025 0 16C0 28.7998 3.19766 32 15.9994 32C28.8011 32 32 28.8022 32 16C32 3.19779 28.7999 0 15.9994 0Z";
|
|
4218
|
+
const SQUIRCLE_BORDER_PATH = "M15.999 0.222656C22.4009 0.222656 26.3132 1.0274 28.6426 3.35645C30.972 5.68549 31.7773 9.59729 31.7773 16C31.7773 22.4025 30.9726 26.3145 28.6436 28.6436C26.3143 30.9726 22.4015 31.7773 15.999 31.7773C9.5968 31.7773 5.68536 30.9719 3.35645 28.6426C1.02748 26.3132 0.222656 22.4015 0.222656 16C0.222656 9.59851 1.02748 5.68678 3.35645 3.35742C5.68536 1.02814 9.5968 0.222687 15.999 0.222656Z";
|
|
4219
|
+
// Monotonic counter for per-instance SVG ids. useId would be tidier but isn't
|
|
4220
|
+
// available on React 17, which our peer range still supports.
|
|
4221
|
+
let iconInstanceCount = 0;
|
|
4218
4222
|
function AskAIIcon() {
|
|
4223
|
+
const [uid] = React.useState(() => `ask-ai-icon-${iconInstanceCount++}`);
|
|
4224
|
+
const maskId = `${uid}-mask`;
|
|
4225
|
+
const blur = n => `${uid}-blur-${n}`;
|
|
4226
|
+
const borderA = `${uid}-border-a`;
|
|
4227
|
+
const borderB = `${uid}-border-b`;
|
|
4219
4228
|
return /*#__PURE__*/React.createElement("span", {
|
|
4220
4229
|
className: styles.icon
|
|
4221
4230
|
}, /*#__PURE__*/React.createElement("svg", {
|
|
4222
4231
|
className: styles.iconShape,
|
|
4223
4232
|
viewBox: "0 0 32 32",
|
|
4233
|
+
fill: "none",
|
|
4224
4234
|
"aria-hidden": "true"
|
|
4225
4235
|
}, /*#__PURE__*/React.createElement("path", {
|
|
4226
|
-
d:
|
|
4227
|
-
fill:
|
|
4228
|
-
}), /*#__PURE__*/React.createElement("
|
|
4229
|
-
id:
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4236
|
+
d: SQUIRCLE_PATH,
|
|
4237
|
+
fill: "white"
|
|
4238
|
+
}), /*#__PURE__*/React.createElement("mask", {
|
|
4239
|
+
id: maskId,
|
|
4240
|
+
style: {
|
|
4241
|
+
maskType: "alpha"
|
|
4242
|
+
},
|
|
4243
|
+
maskUnits: "userSpaceOnUse",
|
|
4244
|
+
x: "0",
|
|
4245
|
+
y: "0",
|
|
4246
|
+
width: "32",
|
|
4247
|
+
height: "32"
|
|
4248
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
4249
|
+
d: SQUIRCLE_PATH,
|
|
4250
|
+
fill: "#939393"
|
|
4251
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
4252
|
+
mask: `url(#${maskId})`
|
|
4253
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
4254
|
+
filter: `url(#${blur(0)})`
|
|
4255
|
+
}, /*#__PURE__*/React.createElement("ellipse", {
|
|
4256
|
+
cx: "24.2268",
|
|
4257
|
+
cy: "23.7824",
|
|
4258
|
+
rx: "17.9331",
|
|
4259
|
+
ry: "31.1883",
|
|
4260
|
+
transform: "rotate(-135 24.2268 23.7824)",
|
|
4261
|
+
fill: "#B883E2"
|
|
4262
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
4263
|
+
filter: `url(#${blur(1)})`
|
|
4264
|
+
}, /*#__PURE__*/React.createElement("ellipse", {
|
|
4265
|
+
cx: "7.05187",
|
|
4266
|
+
cy: "9.27409",
|
|
4267
|
+
rx: "14.9017",
|
|
4268
|
+
ry: "29.437",
|
|
4269
|
+
transform: "rotate(45 7.05187 9.27409)",
|
|
4270
|
+
fill: "#74A3FF"
|
|
4271
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
4272
|
+
filter: `url(#${blur(2)})`
|
|
4273
|
+
}, /*#__PURE__*/React.createElement("ellipse", {
|
|
4274
|
+
cx: "29.7552",
|
|
4275
|
+
cy: "31.0886",
|
|
4276
|
+
rx: "11.2869",
|
|
4277
|
+
ry: "15.1567",
|
|
4278
|
+
transform: "rotate(-135 29.7552 31.0886)",
|
|
4279
|
+
fill: "#F28B54"
|
|
4280
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
4281
|
+
filter: `url(#${blur(3)})`
|
|
4282
|
+
}, /*#__PURE__*/React.createElement("ellipse", {
|
|
4283
|
+
cx: "3.58734",
|
|
4284
|
+
cy: "4.03178",
|
|
4285
|
+
rx: "11.2869",
|
|
4286
|
+
ry: "15.1567",
|
|
4287
|
+
transform: "rotate(45 3.58734 4.03178)",
|
|
4288
|
+
fill: "#24D7B7"
|
|
4289
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
4290
|
+
filter: `url(#${blur(4)})`
|
|
4291
|
+
}, /*#__PURE__*/React.createElement("ellipse", {
|
|
4292
|
+
cx: "32.0363",
|
|
4293
|
+
cy: "32.0363",
|
|
4294
|
+
rx: "5.65576",
|
|
4295
|
+
ry: "7.59487",
|
|
4296
|
+
transform: "rotate(-135 32.0363 32.0363)",
|
|
4297
|
+
fill: "#FFBC40"
|
|
4298
|
+
})), /*#__PURE__*/React.createElement("g", {
|
|
4299
|
+
filter: `url(#${blur(5)})`
|
|
4300
|
+
}, /*#__PURE__*/React.createElement("ellipse", {
|
|
4301
|
+
cx: "1.00513",
|
|
4302
|
+
cy: "-0.772657",
|
|
4303
|
+
rx: "5.1403",
|
|
4304
|
+
ry: "6.82216",
|
|
4305
|
+
transform: "rotate(-135 1.00513 -0.772657)",
|
|
4306
|
+
fill: "#70FFD4"
|
|
4307
|
+
})), /*#__PURE__*/React.createElement("path", {
|
|
4308
|
+
d: SQUIRCLE_BORDER_PATH,
|
|
4309
|
+
stroke: `url(#${borderA})`,
|
|
4310
|
+
strokeWidth: "0.444444"
|
|
4311
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
4312
|
+
d: SQUIRCLE_BORDER_PATH,
|
|
4313
|
+
stroke: `url(#${borderB})`,
|
|
4314
|
+
strokeWidth: "0.444444"
|
|
4315
|
+
})), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("filter", {
|
|
4316
|
+
id: blur(0),
|
|
4317
|
+
x: "-20.7722",
|
|
4318
|
+
y: "-21.2166",
|
|
4319
|
+
width: "89.9981",
|
|
4320
|
+
height: "89.9981",
|
|
4321
|
+
filterUnits: "userSpaceOnUse",
|
|
4322
|
+
colorInterpolationFilters: "sRGB"
|
|
4323
|
+
}, /*#__PURE__*/React.createElement("feGaussianBlur", {
|
|
4324
|
+
stdDeviation: "9.77778"
|
|
4325
|
+
})), /*#__PURE__*/React.createElement("filter", {
|
|
4326
|
+
id: blur(1),
|
|
4327
|
+
x: "-35.839",
|
|
4328
|
+
y: "-33.6167",
|
|
4329
|
+
width: "85.7816",
|
|
4330
|
+
height: "85.7816",
|
|
4331
|
+
filterUnits: "userSpaceOnUse",
|
|
4332
|
+
colorInterpolationFilters: "sRGB"
|
|
4333
|
+
}, /*#__PURE__*/React.createElement("feGaussianBlur", {
|
|
4334
|
+
stdDeviation: "9.77778"
|
|
4335
|
+
})), /*#__PURE__*/React.createElement("filter", {
|
|
4336
|
+
id: blur(2),
|
|
4337
|
+
x: "-3.16378",
|
|
4338
|
+
y: "-1.83045",
|
|
4339
|
+
width: "65.838",
|
|
4340
|
+
height: "65.838",
|
|
4341
|
+
filterUnits: "userSpaceOnUse",
|
|
4342
|
+
colorInterpolationFilters: "sRGB"
|
|
4343
|
+
}, /*#__PURE__*/React.createElement("feGaussianBlur", {
|
|
4344
|
+
stdDeviation: "9.77778"
|
|
4345
|
+
})), /*#__PURE__*/React.createElement("filter", {
|
|
4346
|
+
id: blur(3),
|
|
4347
|
+
x: "-29.3317",
|
|
4348
|
+
y: "-28.8872",
|
|
4349
|
+
width: "65.838",
|
|
4350
|
+
height: "65.838",
|
|
4351
|
+
filterUnits: "userSpaceOnUse",
|
|
4352
|
+
colorInterpolationFilters: "sRGB"
|
|
4353
|
+
}, /*#__PURE__*/React.createElement("feGaussianBlur", {
|
|
4354
|
+
stdDeviation: "9.77778"
|
|
4355
|
+
})), /*#__PURE__*/React.createElement("filter", {
|
|
4356
|
+
id: blur(4),
|
|
4357
|
+
x: "16.4511",
|
|
4358
|
+
y: "16.4511",
|
|
4359
|
+
width: "31.1704",
|
|
4360
|
+
height: "31.1704",
|
|
4361
|
+
filterUnits: "userSpaceOnUse",
|
|
4362
|
+
colorInterpolationFilters: "sRGB"
|
|
4363
|
+
}, /*#__PURE__*/React.createElement("feGaussianBlur", {
|
|
4364
|
+
stdDeviation: "4.44444"
|
|
4365
|
+
})), /*#__PURE__*/React.createElement("filter", {
|
|
4366
|
+
id: blur(5),
|
|
4367
|
+
x: "-13.9242",
|
|
4368
|
+
y: "-15.7019",
|
|
4369
|
+
width: "29.8586",
|
|
4370
|
+
height: "29.8586",
|
|
4371
|
+
filterUnits: "userSpaceOnUse",
|
|
4372
|
+
colorInterpolationFilters: "sRGB"
|
|
4373
|
+
}, /*#__PURE__*/React.createElement("feGaussianBlur", {
|
|
4374
|
+
stdDeviation: "4.44444"
|
|
4375
|
+
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
4376
|
+
id: borderA,
|
|
4377
|
+
x1: "4.22222",
|
|
4378
|
+
y1: "2.44444",
|
|
4379
|
+
x2: "16",
|
|
4380
|
+
y2: "14.4444",
|
|
4234
4381
|
gradientUnits: "userSpaceOnUse"
|
|
4235
4382
|
}, /*#__PURE__*/React.createElement("stop", {
|
|
4236
|
-
stopColor: "#
|
|
4383
|
+
stopColor: "#62FAFF"
|
|
4237
4384
|
}), /*#__PURE__*/React.createElement("stop", {
|
|
4238
|
-
offset: "
|
|
4239
|
-
stopColor: "#
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4385
|
+
offset: "1",
|
|
4386
|
+
stopColor: "#55AFD6",
|
|
4387
|
+
stopOpacity: "0"
|
|
4388
|
+
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
4389
|
+
id: borderB,
|
|
4390
|
+
x1: "28.4444",
|
|
4391
|
+
y1: "29.3333",
|
|
4392
|
+
x2: "22.8889",
|
|
4393
|
+
y2: "22.4444",
|
|
4394
|
+
gradientUnits: "userSpaceOnUse"
|
|
4395
|
+
}, /*#__PURE__*/React.createElement("stop", {
|
|
4396
|
+
stopColor: "#FFA961"
|
|
4243
4397
|
}), /*#__PURE__*/React.createElement("stop", {
|
|
4244
4398
|
offset: "1",
|
|
4245
|
-
stopColor: "#
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4250
|
-
|
|
4399
|
+
stopColor: "#D48B91",
|
|
4400
|
+
stopOpacity: "0"
|
|
4401
|
+
})))), /*#__PURE__*/React.createElement("svg", {
|
|
4402
|
+
className: styles.iconSparkle,
|
|
4403
|
+
viewBox: "0 0 19.4995 17.9999",
|
|
4404
|
+
"aria-hidden": "true"
|
|
4405
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
4406
|
+
d: "M2.71191 12.2002C2.81068 11.9333 3.18834 11.9333 3.2871 12.2002L3.84375 13.7031C3.92138 13.9129 4.08707 14.0786 4.29687 14.1562L5.7998 14.7119C6.06662 14.8107 6.06648 15.1882 5.7998 15.2871L4.29687 15.8437C4.08707 15.9214 3.92138 16.0871 3.84375 16.2969L3.2871 17.7998C3.18821 18.0665 2.81066 18.0666 2.71191 17.7998L2.15625 16.2969C2.07861 16.0871 1.91292 15.9214 1.70312 15.8437L0.200191 15.2871C-0.0667302 15.1883 -0.0667302 14.8107 0.200191 14.7119L1.70312 14.1562C1.91292 14.0786 2.07861 13.9129 2.15625 13.7031L2.71191 12.2002ZM11.2812 2C11.5283 1.33313 12.4717 1.33305 12.7187 2L14.1094 5.75878C14.3035 6.28304 14.7169 6.69659 15.2412 6.89062L18.999 8.28125C19.6663 8.52817 19.6663 9.47182 18.999 9.71875L15.2412 11.1094C14.7168 11.3035 14.3035 11.7168 14.1094 12.2412L12.7187 15.999C12.4718 16.6663 11.5282 16.6663 11.2812 15.999L9.89062 12.2412C9.69659 11.7169 9.28304 11.3035 8.75878 11.1094L5 9.71875C4.33305 9.47173 4.33312 8.52834 5 8.28125L8.75878 6.89062C9.28299 6.69653 9.69653 6.28299 9.89062 5.75878L11.2812 2ZM2.71191 0.200191C2.81068 -0.0667302 3.18834 -0.0667302 3.2871 0.200191L3.84375 1.70312C3.92138 1.91292 4.08707 2.07861 4.29687 2.15625L5.7998 2.71191C6.06662 2.81066 6.06648 3.18821 5.7998 3.2871L4.29687 3.84375C4.08707 3.92138 3.92138 4.08707 3.84375 4.29687L3.2871 5.7998C3.18821 6.06648 2.81066 6.06662 2.71191 5.7998L2.15625 4.29687C2.07861 4.08707 1.91292 3.92138 1.70312 3.84375L0.200191 3.2871C-0.0667302 3.18834 -0.0667302 2.81068 0.200191 2.71191L1.70312 2.15625C1.91292 2.07861 2.07861 1.91292 2.15625 1.70312L2.71191 0.200191Z",
|
|
4407
|
+
fill: "currentColor"
|
|
4408
|
+
})));
|
|
4251
4409
|
}
|
|
4252
4410
|
|
|
4253
4411
|
// The article heading lives in the deepest populated hierarchy level (lvl0 is
|
|
@@ -4413,6 +4571,7 @@ true;
|
|
|
4413
4571
|
return fragment ? `${base}#${fragment}` : base;
|
|
4414
4572
|
}
|
|
4415
4573
|
|
|
4574
|
+
const LOAD_TIMEOUT_MS = 3000;
|
|
4416
4575
|
function createPicobotIframe(picobotOrigin) {
|
|
4417
4576
|
return /*#__PURE__*/React.forwardRef(function PicobotIframe({
|
|
4418
4577
|
currentPath: iframePath,
|
|
@@ -4424,10 +4583,25 @@ true;
|
|
|
4424
4583
|
// Contact support) and picobot's own NEW_ROUTE_RENDERED reports—so it
|
|
4425
4584
|
// always reflects the live conversation. See buildPicobotSrc.
|
|
4426
4585
|
const [loadedPath, setLoadedPath] = React.useState(iframePath || "");
|
|
4586
|
+
const hasReportedErrorRef = React.useRef(false);
|
|
4587
|
+
const loadTimeoutRef = React.useRef();
|
|
4588
|
+
const reportLoadError = React.useCallback(() => {
|
|
4589
|
+
if (hasReportedErrorRef.current) return;
|
|
4590
|
+
hasReportedErrorRef.current = true;
|
|
4591
|
+
onMessage === null || onMessage === void 0 ? void 0 : onMessage({
|
|
4592
|
+
type: "IFRAME_LOAD_ERROR"
|
|
4593
|
+
});
|
|
4594
|
+
}, [onMessage]);
|
|
4595
|
+
const reportLoadErrorRef = React.useRef(reportLoadError);
|
|
4596
|
+
reportLoadErrorRef.current = reportLoadError;
|
|
4597
|
+
React.useEffect(function armLoadTimeoutOnMount() {
|
|
4598
|
+
const timeout = setTimeout(() => reportLoadErrorRef.current(), LOAD_TIMEOUT_MS);
|
|
4599
|
+
loadTimeoutRef.current = timeout;
|
|
4600
|
+
return () => clearTimeout(timeout);
|
|
4601
|
+
}, []);
|
|
4427
4602
|
React.useEffect(function subscribeToGuestMessages() {
|
|
4428
|
-
if (!onIframeChangePath && !onMessage) return undefined;
|
|
4429
4603
|
function handleGuestMessage(e) {
|
|
4430
|
-
var _a, _b;
|
|
4604
|
+
var _a, _b, _c;
|
|
4431
4605
|
if (e.origin !== picobotOrigin) return;
|
|
4432
4606
|
if (!e.source || !iframeRef.current) return;
|
|
4433
4607
|
if (e.source !== iframeRef.current.contentWindow) return;
|
|
@@ -4436,6 +4610,7 @@ true;
|
|
|
4436
4610
|
setLoadedPath(reportedPath);
|
|
4437
4611
|
onIframeChangePath(reportedPath);
|
|
4438
4612
|
}
|
|
4613
|
+
if (((_c = e.data) === null || _c === void 0 ? void 0 : _c.type) === "READY") clearTimeout(loadTimeoutRef.current);
|
|
4439
4614
|
if (onMessage) onMessage(e.data);
|
|
4440
4615
|
}
|
|
4441
4616
|
window.addEventListener("message", handleGuestMessage);
|