@select-org/select-post-builder 1.1.22 → 1.1.23
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.d.ts +2 -1
- package/dist/post-builder.cjs.js +25 -33
- package/dist/post-builder.js +25 -33
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/post-builder.cjs.js
CHANGED
|
@@ -2555,7 +2555,8 @@ var EditorPlacement = /* @__PURE__ */ ((EditorPlacement2) => {
|
|
|
2555
2555
|
EditorPlacement2["Feed"] = "Feed";
|
|
2556
2556
|
EditorPlacement2["Modal"] = "Modal";
|
|
2557
2557
|
EditorPlacement2["Comment"] = "Comment";
|
|
2558
|
-
EditorPlacement2["
|
|
2558
|
+
EditorPlacement2["Inbox"] = "Inbox";
|
|
2559
|
+
EditorPlacement2["Global"] = "Global";
|
|
2559
2560
|
return EditorPlacement2;
|
|
2560
2561
|
})(EditorPlacement || {});
|
|
2561
2562
|
var EditorTypes = /* @__PURE__ */ ((EditorTypes2) => {
|
|
@@ -16364,7 +16365,6 @@ const GroupSelector = ({ store }) => {
|
|
|
16364
16365
|
}, [store]);
|
|
16365
16366
|
const { groupId, selectedGroupId } = state2;
|
|
16366
16367
|
const currentValue = selectedGroupId ?? groupId ?? "";
|
|
16367
|
-
const isDisabled = !!groupId;
|
|
16368
16368
|
React.useEffect(() => {
|
|
16369
16369
|
let cancelled = false;
|
|
16370
16370
|
const loadGroups = async () => {
|
|
@@ -16389,39 +16389,31 @@ const GroupSelector = ({ store }) => {
|
|
|
16389
16389
|
const handleValueChange = (value) => {
|
|
16390
16390
|
store.getState().selectGroup(value);
|
|
16391
16391
|
};
|
|
16392
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "not-prose flex items-center gap-3", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16393
|
-
|
|
16394
|
-
|
|
16395
|
-
|
|
16396
|
-
|
|
16397
|
-
|
|
16398
|
-
|
|
16399
|
-
|
|
16400
|
-
|
|
16392
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "not-prose flex items-center gap-3", children: /* @__PURE__ */ jsxRuntime.jsxs(Select, { value: currentValue, onValueChange: handleValueChange, disabled: isLoading, children: [
|
|
16393
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
16394
|
+
SelectTrigger,
|
|
16395
|
+
{
|
|
16396
|
+
size: "sm",
|
|
16397
|
+
id: `group-selector-${currentValue}-${selectorId}`,
|
|
16398
|
+
className: "bg-background",
|
|
16399
|
+
"aria-label": "Select group",
|
|
16400
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
16401
|
+
SelectValue,
|
|
16401
16402
|
{
|
|
16402
|
-
|
|
16403
|
-
|
|
16404
|
-
className: "bg-background",
|
|
16405
|
-
"aria-label": "Select group",
|
|
16406
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
16407
|
-
SelectValue,
|
|
16408
|
-
{
|
|
16409
|
-
className: "text-sm",
|
|
16410
|
-
placeholder: isLoading ? "Loading groups..." : "Select a group…"
|
|
16411
|
-
}
|
|
16412
|
-
)
|
|
16403
|
+
className: "text-sm",
|
|
16404
|
+
placeholder: isLoading ? "Loading groups..." : "Select a group…"
|
|
16413
16405
|
}
|
|
16414
|
-
)
|
|
16415
|
-
|
|
16416
|
-
|
|
16417
|
-
|
|
16418
|
-
|
|
16419
|
-
|
|
16420
|
-
|
|
16421
|
-
|
|
16422
|
-
|
|
16423
|
-
}
|
|
16424
|
-
) });
|
|
16406
|
+
)
|
|
16407
|
+
}
|
|
16408
|
+
),
|
|
16409
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { align: "start", children: groups.map((entry) => /* @__PURE__ */ jsxRuntime.jsxs(SelectItem, { value: entry.group_id, children: [
|
|
16410
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Avatar, { className: "size-6", children: [
|
|
16411
|
+
/* @__PURE__ */ jsxRuntime.jsx(AvatarImage, { src: entry.group.avatar }),
|
|
16412
|
+
/* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { children: entry?.group?.name?.charAt(0) })
|
|
16413
|
+
] }),
|
|
16414
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: entry.group?.name ?? entry.group_id })
|
|
16415
|
+
] }, entry.group_id)) })
|
|
16416
|
+
] }) });
|
|
16425
16417
|
};
|
|
16426
16418
|
const GifIcon = (props) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
16427
16419
|
"svg",
|
package/dist/post-builder.js
CHANGED
|
@@ -2525,7 +2525,8 @@ var EditorPlacement = /* @__PURE__ */ ((EditorPlacement2) => {
|
|
|
2525
2525
|
EditorPlacement2["Feed"] = "Feed";
|
|
2526
2526
|
EditorPlacement2["Modal"] = "Modal";
|
|
2527
2527
|
EditorPlacement2["Comment"] = "Comment";
|
|
2528
|
-
EditorPlacement2["
|
|
2528
|
+
EditorPlacement2["Inbox"] = "Inbox";
|
|
2529
|
+
EditorPlacement2["Global"] = "Global";
|
|
2529
2530
|
return EditorPlacement2;
|
|
2530
2531
|
})(EditorPlacement || {});
|
|
2531
2532
|
var EditorTypes = /* @__PURE__ */ ((EditorTypes2) => {
|
|
@@ -16334,7 +16335,6 @@ const GroupSelector = ({ store }) => {
|
|
|
16334
16335
|
}, [store]);
|
|
16335
16336
|
const { groupId, selectedGroupId } = state;
|
|
16336
16337
|
const currentValue = selectedGroupId ?? groupId ?? "";
|
|
16337
|
-
const isDisabled = !!groupId;
|
|
16338
16338
|
useEffect(() => {
|
|
16339
16339
|
let cancelled = false;
|
|
16340
16340
|
const loadGroups = async () => {
|
|
@@ -16359,39 +16359,31 @@ const GroupSelector = ({ store }) => {
|
|
|
16359
16359
|
const handleValueChange = (value) => {
|
|
16360
16360
|
store.getState().selectGroup(value);
|
|
16361
16361
|
};
|
|
16362
|
-
return /* @__PURE__ */ jsx("div", { className: "not-prose flex items-center gap-3", children: /* @__PURE__ */ jsxs(
|
|
16363
|
-
|
|
16364
|
-
|
|
16365
|
-
|
|
16366
|
-
|
|
16367
|
-
|
|
16368
|
-
|
|
16369
|
-
|
|
16370
|
-
|
|
16362
|
+
return /* @__PURE__ */ jsx("div", { className: "not-prose flex items-center gap-3", children: /* @__PURE__ */ jsxs(Select, { value: currentValue, onValueChange: handleValueChange, disabled: isLoading, children: [
|
|
16363
|
+
/* @__PURE__ */ jsx(
|
|
16364
|
+
SelectTrigger,
|
|
16365
|
+
{
|
|
16366
|
+
size: "sm",
|
|
16367
|
+
id: `group-selector-${currentValue}-${selectorId}`,
|
|
16368
|
+
className: "bg-background",
|
|
16369
|
+
"aria-label": "Select group",
|
|
16370
|
+
children: /* @__PURE__ */ jsx(
|
|
16371
|
+
SelectValue,
|
|
16371
16372
|
{
|
|
16372
|
-
|
|
16373
|
-
|
|
16374
|
-
className: "bg-background",
|
|
16375
|
-
"aria-label": "Select group",
|
|
16376
|
-
children: /* @__PURE__ */ jsx(
|
|
16377
|
-
SelectValue,
|
|
16378
|
-
{
|
|
16379
|
-
className: "text-sm",
|
|
16380
|
-
placeholder: isLoading ? "Loading groups..." : "Select a group…"
|
|
16381
|
-
}
|
|
16382
|
-
)
|
|
16373
|
+
className: "text-sm",
|
|
16374
|
+
placeholder: isLoading ? "Loading groups..." : "Select a group…"
|
|
16383
16375
|
}
|
|
16384
|
-
)
|
|
16385
|
-
|
|
16386
|
-
|
|
16387
|
-
|
|
16388
|
-
|
|
16389
|
-
|
|
16390
|
-
|
|
16391
|
-
|
|
16392
|
-
|
|
16393
|
-
}
|
|
16394
|
-
) });
|
|
16376
|
+
)
|
|
16377
|
+
}
|
|
16378
|
+
),
|
|
16379
|
+
/* @__PURE__ */ jsx(SelectContent, { align: "start", children: groups.map((entry) => /* @__PURE__ */ jsxs(SelectItem, { value: entry.group_id, children: [
|
|
16380
|
+
/* @__PURE__ */ jsxs(Avatar, { className: "size-6", children: [
|
|
16381
|
+
/* @__PURE__ */ jsx(AvatarImage, { src: entry.group.avatar }),
|
|
16382
|
+
/* @__PURE__ */ jsx(AvatarFallback, { children: entry?.group?.name?.charAt(0) })
|
|
16383
|
+
] }),
|
|
16384
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm", children: entry.group?.name ?? entry.group_id })
|
|
16385
|
+
] }, entry.group_id)) })
|
|
16386
|
+
] }) });
|
|
16395
16387
|
};
|
|
16396
16388
|
const GifIcon = (props) => /* @__PURE__ */ jsx(
|
|
16397
16389
|
"svg",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@select-org/select-post-builder",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.23",
|
|
4
4
|
"description": "A reusable, extensible Post Builder widget for the Select platform and beyond.",
|
|
5
5
|
"main": "./dist/post-builder.cjs.js",
|
|
6
6
|
"module": "./dist/post-builder.js",
|