@expcat/tigercat-core 0.2.27 → 0.3.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.cjs +319 -71
- package/dist/index.d.cts +1541 -509
- package/dist/index.d.ts +1541 -509
- package/dist/index.js +300 -71
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1080,6 +1080,93 @@ function getInputErrorClasses(size = "md") {
|
|
|
1080
1080
|
);
|
|
1081
1081
|
}
|
|
1082
1082
|
|
|
1083
|
+
// src/utils/form-item-styles.ts
|
|
1084
|
+
var FORM_ITEM_SPACING = {
|
|
1085
|
+
sm: "mb-3 last:mb-0",
|
|
1086
|
+
md: "mb-4 last:mb-0",
|
|
1087
|
+
lg: "mb-6 last:mb-0"
|
|
1088
|
+
};
|
|
1089
|
+
var LABEL_TEXT_SIZE = {
|
|
1090
|
+
sm: "text-xs",
|
|
1091
|
+
md: "text-sm",
|
|
1092
|
+
lg: "text-base"
|
|
1093
|
+
};
|
|
1094
|
+
var LABEL_PADDING_TOP = {
|
|
1095
|
+
sm: "pt-1",
|
|
1096
|
+
md: "pt-2",
|
|
1097
|
+
lg: "pt-3"
|
|
1098
|
+
};
|
|
1099
|
+
var ERROR_TEXT_SIZE = {
|
|
1100
|
+
sm: "text-xs",
|
|
1101
|
+
md: "text-xs",
|
|
1102
|
+
lg: "text-sm"
|
|
1103
|
+
};
|
|
1104
|
+
function getFormItemClasses(options = {}) {
|
|
1105
|
+
const { size = "md", labelPosition = "right", hasError = false, disabled = false } = options;
|
|
1106
|
+
const layoutClasses = labelPosition === "top" ? "flex flex-col gap-2" : "flex items-start gap-4";
|
|
1107
|
+
return classNames(
|
|
1108
|
+
"tiger-form-item",
|
|
1109
|
+
"w-full",
|
|
1110
|
+
`tiger-form-item--${size}`,
|
|
1111
|
+
`tiger-form-item--label-${labelPosition}`,
|
|
1112
|
+
layoutClasses,
|
|
1113
|
+
FORM_ITEM_SPACING[size],
|
|
1114
|
+
hasError && "tiger-form-item--error",
|
|
1115
|
+
disabled && "tiger-form-item--disabled"
|
|
1116
|
+
);
|
|
1117
|
+
}
|
|
1118
|
+
function getFormItemLabelClasses(options = {}) {
|
|
1119
|
+
const { size = "md", labelPosition = "right", labelAlign = "right", isRequired = false } = options;
|
|
1120
|
+
const alignClass = labelAlign === "right" ? "text-right" : labelAlign === "left" ? "text-left" : "text-left";
|
|
1121
|
+
const positionClasses = labelPosition === "top" ? "w-full" : "shrink-0";
|
|
1122
|
+
const paddingClass = labelPosition === "top" ? "" : LABEL_PADDING_TOP[size];
|
|
1123
|
+
return classNames(
|
|
1124
|
+
"tiger-form-item__label",
|
|
1125
|
+
`tiger-form-item__label--${labelAlign}`,
|
|
1126
|
+
"font-medium",
|
|
1127
|
+
"text-[var(--tiger-text,#111827)]",
|
|
1128
|
+
LABEL_TEXT_SIZE[size],
|
|
1129
|
+
alignClass,
|
|
1130
|
+
positionClasses,
|
|
1131
|
+
paddingClass,
|
|
1132
|
+
isRequired && "tiger-form-item__label--required"
|
|
1133
|
+
);
|
|
1134
|
+
}
|
|
1135
|
+
function getFormItemContentClasses(labelPosition = "right") {
|
|
1136
|
+
return classNames(
|
|
1137
|
+
"tiger-form-item__content",
|
|
1138
|
+
labelPosition === "top" ? "w-full" : "flex-1",
|
|
1139
|
+
"min-w-0",
|
|
1140
|
+
"flex",
|
|
1141
|
+
"flex-col"
|
|
1142
|
+
);
|
|
1143
|
+
}
|
|
1144
|
+
function getFormItemFieldClasses() {
|
|
1145
|
+
return classNames("tiger-form-item__field", "w-full");
|
|
1146
|
+
}
|
|
1147
|
+
function getFormItemErrorClasses(size = "md") {
|
|
1148
|
+
return classNames(
|
|
1149
|
+
"tiger-form-item__error",
|
|
1150
|
+
"mt-1",
|
|
1151
|
+
ERROR_TEXT_SIZE[size],
|
|
1152
|
+
"text-[var(--tiger-error,#ef4444)]"
|
|
1153
|
+
);
|
|
1154
|
+
}
|
|
1155
|
+
function getFormItemAsteriskClasses() {
|
|
1156
|
+
return classNames(
|
|
1157
|
+
"tiger-form-item__asterisk",
|
|
1158
|
+
"mr-1",
|
|
1159
|
+
"font-semibold",
|
|
1160
|
+
"text-red-500",
|
|
1161
|
+
"text-[var(--tiger-error,#ef4444)]"
|
|
1162
|
+
);
|
|
1163
|
+
}
|
|
1164
|
+
function getFormItemAsteriskStyle() {
|
|
1165
|
+
return {
|
|
1166
|
+
color: "var(--tiger-error,#ef4444)"
|
|
1167
|
+
};
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1083
1170
|
// src/utils/select-utils.ts
|
|
1084
1171
|
var selectBaseClasses = "relative inline-block w-full";
|
|
1085
1172
|
var SELECT_TRIGGER_BASE_CLASSES = [
|
|
@@ -2879,91 +2966,53 @@ function groupItemsIntoRows(items, column) {
|
|
|
2879
2966
|
// src/utils/timeline-utils.ts
|
|
2880
2967
|
var timelineContainerClasses = "relative";
|
|
2881
2968
|
var timelineListClasses = "list-none m-0 p-0";
|
|
2882
|
-
var timelineItemClasses = "relative pb-8
|
|
2969
|
+
var timelineItemClasses = "relative pb-8";
|
|
2883
2970
|
var timelineTailClasses = "absolute w-0.5 bg-[var(--tiger-border,#e5e7eb)]";
|
|
2884
|
-
var timelineHeadClasses = "absolute flex items-center justify-center";
|
|
2885
|
-
var timelineDotBgClass = "bg-[var(--tiger-timeline-dot,#d1d5db)]";
|
|
2886
|
-
var timelineDotClasses = `w-2.5 h-2.5 rounded-full border-2 border-[var(--tiger-surface,#ffffff)] ${timelineDotBgClass}`;
|
|
2887
|
-
var timelineCustomDotClasses = "flex items-center justify-center";
|
|
2971
|
+
var timelineHeadClasses = "absolute z-10 flex items-center justify-center";
|
|
2888
2972
|
var timelineContentClasses = "relative";
|
|
2973
|
+
var timelineCustomDotClasses = "flex items-center justify-center";
|
|
2889
2974
|
var timelineLabelClasses = "text-sm text-[var(--tiger-text-muted,#6b7280)] mb-1";
|
|
2890
2975
|
var timelineDescriptionClasses = "text-[var(--tiger-text,#374151)]";
|
|
2976
|
+
var dotBg = "bg-[var(--tiger-timeline-dot,#d1d5db)]";
|
|
2977
|
+
var timelineDotClasses = `w-2.5 h-2.5 rounded-full border-2 border-[var(--tiger-surface,#ffffff)] ${dotBg}`;
|
|
2978
|
+
var HEAD_TOP = "top-[18px]";
|
|
2979
|
+
var TAIL_TOP = "top-[23px]";
|
|
2980
|
+
var TAIL_BOTTOM = "-bottom-[23px]";
|
|
2891
2981
|
function getTimelineContainerClasses(mode) {
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
classes.push("pl-0");
|
|
2895
|
-
} else if (mode === "alternate") {
|
|
2896
|
-
classes.push("flex flex-col");
|
|
2897
|
-
}
|
|
2898
|
-
return classes.join(" ");
|
|
2982
|
+
if (mode === "alternate") return `${timelineContainerClasses} flex flex-col`;
|
|
2983
|
+
return timelineContainerClasses;
|
|
2899
2984
|
}
|
|
2900
2985
|
function getTimelineItemClasses(mode, position, isLast = false) {
|
|
2901
|
-
const
|
|
2902
|
-
if (mode === "
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
classes.push("pr-8 text-right");
|
|
2906
|
-
} else if (mode === "alternate") {
|
|
2907
|
-
if (position === "left") {
|
|
2908
|
-
classes.push("pr-8 text-right flex flex-row-reverse");
|
|
2909
|
-
} else {
|
|
2910
|
-
classes.push("pl-8 flex");
|
|
2911
|
-
}
|
|
2986
|
+
const base = isLast ? "relative pb-0" : timelineItemClasses;
|
|
2987
|
+
if (mode === "right") return `${base} pr-8 text-right`;
|
|
2988
|
+
if (mode === "alternate") {
|
|
2989
|
+
return position === "left" ? `${base} pr-8 text-right flex flex-row-reverse` : `${base} pl-8 flex`;
|
|
2912
2990
|
}
|
|
2913
|
-
|
|
2914
|
-
classes.push("pb-0");
|
|
2915
|
-
}
|
|
2916
|
-
return classes.join(" ");
|
|
2991
|
+
return `${base} pl-8`;
|
|
2917
2992
|
}
|
|
2918
|
-
function getTimelineTailClasses(mode,
|
|
2919
|
-
if (isLast)
|
|
2920
|
-
|
|
2921
|
-
}
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
classes.push("left-0 -translate-x-1/2 top-[10px] bottom-0");
|
|
2925
|
-
} else if (mode === "right") {
|
|
2926
|
-
classes.push("right-0 translate-x-1/2 top-[10px] bottom-0");
|
|
2927
|
-
} else if (mode === "alternate") {
|
|
2928
|
-
classes.push("left-1/2 -translate-x-1/2 top-[10px] bottom-0");
|
|
2929
|
-
}
|
|
2930
|
-
return classes.join(" ");
|
|
2993
|
+
function getTimelineTailClasses(mode, _position, isLast = false) {
|
|
2994
|
+
if (isLast) return "hidden";
|
|
2995
|
+
const span = `${timelineTailClasses} ${TAIL_TOP} ${TAIL_BOTTOM}`;
|
|
2996
|
+
if (mode === "right") return `${span} right-0 translate-x-1/2`;
|
|
2997
|
+
if (mode === "alternate") return `${span} left-1/2 -translate-x-1/2`;
|
|
2998
|
+
return `${span} left-0 -translate-x-1/2`;
|
|
2931
2999
|
}
|
|
2932
3000
|
function getTimelineHeadClasses(mode, _position) {
|
|
2933
|
-
|
|
2934
|
-
if (mode === "
|
|
2935
|
-
|
|
2936
|
-
} else if (mode === "right") {
|
|
2937
|
-
classes.push("right-0 top-0 translate-x-1/2");
|
|
2938
|
-
} else if (mode === "alternate") {
|
|
2939
|
-
classes.push("left-1/2 -translate-x-1/2 top-0");
|
|
2940
|
-
}
|
|
2941
|
-
return classes.join(" ");
|
|
3001
|
+
if (mode === "right") return `${timelineHeadClasses} right-0 ${HEAD_TOP} translate-x-1/2`;
|
|
3002
|
+
if (mode === "alternate") return `${timelineHeadClasses} left-1/2 -translate-x-1/2 ${HEAD_TOP}`;
|
|
3003
|
+
return `${timelineHeadClasses} left-0 ${HEAD_TOP} -translate-x-1/2`;
|
|
2942
3004
|
}
|
|
2943
3005
|
function getTimelineDotClasses(color, isCustom = false) {
|
|
2944
|
-
if (isCustom)
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
const classes = [timelineDotClasses];
|
|
2948
|
-
if (color) {
|
|
2949
|
-
return classes.join(" ").replace(timelineDotBgClass, "");
|
|
2950
|
-
}
|
|
2951
|
-
return classes.join(" ");
|
|
3006
|
+
if (isCustom) return timelineCustomDotClasses;
|
|
3007
|
+
if (color) return timelineDotClasses.replace(dotBg, "");
|
|
3008
|
+
return timelineDotClasses;
|
|
2952
3009
|
}
|
|
2953
3010
|
function getTimelineContentClasses(mode, position) {
|
|
2954
|
-
|
|
2955
|
-
if (mode === "
|
|
2956
|
-
|
|
2957
|
-
} else if (mode === "right") {
|
|
2958
|
-
classes.push("pr-2");
|
|
2959
|
-
} else if (mode === "alternate") {
|
|
2960
|
-
if (position === "left") {
|
|
2961
|
-
classes.push("pr-8");
|
|
2962
|
-
} else {
|
|
2963
|
-
classes.push("pl-8");
|
|
2964
|
-
}
|
|
3011
|
+
if (mode === "right") return `${timelineContentClasses} pr-2`;
|
|
3012
|
+
if (mode === "alternate") {
|
|
3013
|
+
return position === "left" ? `${timelineContentClasses} pr-8` : `${timelineContentClasses} pl-8`;
|
|
2965
3014
|
}
|
|
2966
|
-
return
|
|
3015
|
+
return `${timelineContentClasses} pl-2`;
|
|
2967
3016
|
}
|
|
2968
3017
|
function getPendingDotClasses() {
|
|
2969
3018
|
return "w-2.5 h-2.5 rounded-full border-2 border-white bg-[var(--tiger-primary,#2563eb)] animate-pulse";
|
|
@@ -3744,7 +3793,7 @@ function getStepItemClasses(direction, isLast, simple) {
|
|
|
3744
3793
|
if (direction === "vertical") {
|
|
3745
3794
|
return `${baseClasses} flex flex-row ${!isLast ? "pb-6" : ""}`;
|
|
3746
3795
|
}
|
|
3747
|
-
return `${baseClasses} flex flex-col flex-1
|
|
3796
|
+
return `${baseClasses} flex flex-col flex-1 items-center`;
|
|
3748
3797
|
}
|
|
3749
3798
|
function getStepIconClasses(status, size, simple, isCustomIcon) {
|
|
3750
3799
|
const baseClasses = "tiger-step-icon flex items-center justify-center rounded-full border-2 transition-all duration-200";
|
|
@@ -3777,7 +3826,7 @@ function getStepContentClasses(direction, simple) {
|
|
|
3777
3826
|
if (direction === "vertical") {
|
|
3778
3827
|
return `${baseClasses} ml-4 flex-1`;
|
|
3779
3828
|
}
|
|
3780
|
-
return `${baseClasses} mt-2
|
|
3829
|
+
return `${baseClasses} mt-2 text-center`;
|
|
3781
3830
|
}
|
|
3782
3831
|
function getStepTitleClasses(status, size, clickable) {
|
|
3783
3832
|
const baseClasses = "tiger-step-title font-medium transition-colors duration-200 bg-transparent border-0 p-0";
|
|
@@ -5630,6 +5679,167 @@ function applyFloatingStyles(element, result) {
|
|
|
5630
5679
|
element.style.top = `${result.y}px`;
|
|
5631
5680
|
}
|
|
5632
5681
|
|
|
5682
|
+
// src/utils/chat-window-utils.ts
|
|
5683
|
+
var defaultChatMessageStatusInfo = {
|
|
5684
|
+
sending: { text: "\u53D1\u9001\u4E2D", className: "text-[var(--tiger-text-muted,#6b7280)]" },
|
|
5685
|
+
sent: { text: "\u5DF2\u9001\u8FBE", className: "text-[var(--tiger-text-muted,#6b7280)]" },
|
|
5686
|
+
failed: { text: "\u53D1\u9001\u5931\u8D25", className: "text-[var(--tiger-danger,#ef4444)]" }
|
|
5687
|
+
};
|
|
5688
|
+
function getChatMessageStatusInfo(status, statusMap = defaultChatMessageStatusInfo) {
|
|
5689
|
+
return statusMap[status] || defaultChatMessageStatusInfo[status];
|
|
5690
|
+
}
|
|
5691
|
+
|
|
5692
|
+
// src/utils/activity-feed-utils.ts
|
|
5693
|
+
var formatActivityTime = (value) => {
|
|
5694
|
+
if (value == null || value === "") return "";
|
|
5695
|
+
if (value instanceof Date) return value.toLocaleString();
|
|
5696
|
+
if (typeof value === "number") return new Date(value).toLocaleString();
|
|
5697
|
+
return value;
|
|
5698
|
+
};
|
|
5699
|
+
var sortActivityGroups = (groups, groupOrder) => {
|
|
5700
|
+
if (!groupOrder || groupOrder.length === 0) return groups;
|
|
5701
|
+
const orderMap = new Map(groupOrder.map((key, index) => [key, index]));
|
|
5702
|
+
return [...groups].sort((a, b) => {
|
|
5703
|
+
const aKey = String(a.key ?? a.title ?? "");
|
|
5704
|
+
const bKey = String(b.key ?? b.title ?? "");
|
|
5705
|
+
const aIndex = orderMap.has(aKey) ? orderMap.get(aKey) : Number.POSITIVE_INFINITY;
|
|
5706
|
+
const bIndex = orderMap.has(bKey) ? orderMap.get(bKey) : Number.POSITIVE_INFINITY;
|
|
5707
|
+
if (aIndex === bIndex) return 0;
|
|
5708
|
+
return aIndex - bIndex;
|
|
5709
|
+
});
|
|
5710
|
+
};
|
|
5711
|
+
var buildActivityGroups = (items, groups, groupBy, groupOrder) => {
|
|
5712
|
+
if (groups && groups.length > 0) {
|
|
5713
|
+
return sortActivityGroups(groups, groupOrder);
|
|
5714
|
+
}
|
|
5715
|
+
if (!items || items.length === 0) return [];
|
|
5716
|
+
if (groupBy) {
|
|
5717
|
+
const groupMap = /* @__PURE__ */ new Map();
|
|
5718
|
+
items.forEach((item) => {
|
|
5719
|
+
const key = groupBy(item) || "\u5176\u4ED6";
|
|
5720
|
+
const bucket = groupMap.get(key) ?? [];
|
|
5721
|
+
bucket.push(item);
|
|
5722
|
+
groupMap.set(key, bucket);
|
|
5723
|
+
});
|
|
5724
|
+
const mappedGroups = Array.from(groupMap.entries()).map(([title, groupItems]) => ({
|
|
5725
|
+
key: title,
|
|
5726
|
+
title,
|
|
5727
|
+
items: groupItems
|
|
5728
|
+
}));
|
|
5729
|
+
return sortActivityGroups(mappedGroups, groupOrder);
|
|
5730
|
+
}
|
|
5731
|
+
return [{ key: "default", title: "", items }];
|
|
5732
|
+
};
|
|
5733
|
+
var toActivityTimelineItems = (items) => {
|
|
5734
|
+
return items.map((item, index) => ({
|
|
5735
|
+
key: item.id ?? index,
|
|
5736
|
+
activity: item
|
|
5737
|
+
}));
|
|
5738
|
+
};
|
|
5739
|
+
|
|
5740
|
+
// src/utils/notification-center-utils.ts
|
|
5741
|
+
var sortNotificationGroups = (groups, groupOrder) => {
|
|
5742
|
+
if (!groupOrder || groupOrder.length === 0) {
|
|
5743
|
+
return groups;
|
|
5744
|
+
}
|
|
5745
|
+
const orderMap = /* @__PURE__ */ new Map();
|
|
5746
|
+
groupOrder.forEach((key, index) => {
|
|
5747
|
+
orderMap.set(String(key), index);
|
|
5748
|
+
});
|
|
5749
|
+
return [...groups].sort((a, b) => {
|
|
5750
|
+
const aKey = String(a.key ?? a.title);
|
|
5751
|
+
const bKey = String(b.key ?? b.title);
|
|
5752
|
+
const aIndex = orderMap.get(aKey);
|
|
5753
|
+
const bIndex = orderMap.get(bKey);
|
|
5754
|
+
if (aIndex === void 0 && bIndex === void 0) return 0;
|
|
5755
|
+
if (aIndex === void 0) return 1;
|
|
5756
|
+
if (bIndex === void 0) return -1;
|
|
5757
|
+
return aIndex - bIndex;
|
|
5758
|
+
});
|
|
5759
|
+
};
|
|
5760
|
+
var buildNotificationGroups = (items = [], groups, groupBy, groupOrder) => {
|
|
5761
|
+
if (groups && groups.length > 0) {
|
|
5762
|
+
return sortNotificationGroups(groups, groupOrder);
|
|
5763
|
+
}
|
|
5764
|
+
if (!items || items.length === 0) {
|
|
5765
|
+
return [];
|
|
5766
|
+
}
|
|
5767
|
+
const groupFn = groupBy ?? ((item) => String(item.type ?? "default"));
|
|
5768
|
+
const groupMap = /* @__PURE__ */ new Map();
|
|
5769
|
+
items.forEach((item) => {
|
|
5770
|
+
const key = groupFn(item);
|
|
5771
|
+
if (!groupMap.has(key)) {
|
|
5772
|
+
groupMap.set(key, []);
|
|
5773
|
+
}
|
|
5774
|
+
groupMap.get(key)?.push(item);
|
|
5775
|
+
});
|
|
5776
|
+
const mappedGroups = Array.from(groupMap.entries()).map(([key, groupItems]) => ({
|
|
5777
|
+
key,
|
|
5778
|
+
title: key,
|
|
5779
|
+
items: groupItems
|
|
5780
|
+
}));
|
|
5781
|
+
return sortNotificationGroups(mappedGroups, groupOrder);
|
|
5782
|
+
};
|
|
5783
|
+
|
|
5784
|
+
// src/utils/comment-thread-utils.ts
|
|
5785
|
+
var buildCommentTree = (items = []) => {
|
|
5786
|
+
if (!items || items.length === 0) return [];
|
|
5787
|
+
const nodeMap = /* @__PURE__ */ new Map();
|
|
5788
|
+
const order = [];
|
|
5789
|
+
items.forEach((item) => {
|
|
5790
|
+
nodeMap.set(item.id, {
|
|
5791
|
+
...item,
|
|
5792
|
+
children: []
|
|
5793
|
+
});
|
|
5794
|
+
order.push(item.id);
|
|
5795
|
+
});
|
|
5796
|
+
const roots = [];
|
|
5797
|
+
order.forEach((id) => {
|
|
5798
|
+
const node = nodeMap.get(id);
|
|
5799
|
+
if (!node) return;
|
|
5800
|
+
if (node.parentId === void 0 || node.parentId === null) {
|
|
5801
|
+
roots.push(node);
|
|
5802
|
+
return;
|
|
5803
|
+
}
|
|
5804
|
+
const parent = nodeMap.get(node.parentId);
|
|
5805
|
+
if (!parent) {
|
|
5806
|
+
roots.push(node);
|
|
5807
|
+
return;
|
|
5808
|
+
}
|
|
5809
|
+
if (!parent.children) parent.children = [];
|
|
5810
|
+
parent.children.push(node);
|
|
5811
|
+
});
|
|
5812
|
+
return roots;
|
|
5813
|
+
};
|
|
5814
|
+
var clipCommentTreeDepth = (nodes = [], maxDepth = 3) => {
|
|
5815
|
+
if (!nodes || nodes.length === 0) return [];
|
|
5816
|
+
if (maxDepth <= 0) return [];
|
|
5817
|
+
const cloneNode = (node, depth) => {
|
|
5818
|
+
const next = { ...node };
|
|
5819
|
+
if (node.children && node.children.length > 0 && depth < maxDepth) {
|
|
5820
|
+
next.children = node.children.map((child) => cloneNode(child, depth + 1));
|
|
5821
|
+
} else {
|
|
5822
|
+
next.children = [];
|
|
5823
|
+
}
|
|
5824
|
+
return next;
|
|
5825
|
+
};
|
|
5826
|
+
return nodes.map((node) => cloneNode(node, 1));
|
|
5827
|
+
};
|
|
5828
|
+
|
|
5829
|
+
// src/utils/composite-time-utils.ts
|
|
5830
|
+
var formatChatTime = (value) => {
|
|
5831
|
+
if (!value) return "";
|
|
5832
|
+
if (value instanceof Date) return value.toLocaleTimeString();
|
|
5833
|
+
if (typeof value === "number") return new Date(value).toLocaleTimeString();
|
|
5834
|
+
return value;
|
|
5835
|
+
};
|
|
5836
|
+
var formatCommentTime = (value) => {
|
|
5837
|
+
if (value == null || value === "") return "";
|
|
5838
|
+
if (value instanceof Date) return value.toLocaleString();
|
|
5839
|
+
if (typeof value === "number") return new Date(value).toLocaleString();
|
|
5840
|
+
return value;
|
|
5841
|
+
};
|
|
5842
|
+
|
|
5633
5843
|
// src/theme/colors.ts
|
|
5634
5844
|
var defaultThemeColors = {
|
|
5635
5845
|
primary: {
|
|
@@ -6200,6 +6410,9 @@ export {
|
|
|
6200
6410
|
breadcrumbItemBaseClasses,
|
|
6201
6411
|
breadcrumbLinkClasses,
|
|
6202
6412
|
breadcrumbSeparatorBaseClasses,
|
|
6413
|
+
buildActivityGroups,
|
|
6414
|
+
buildCommentTree,
|
|
6415
|
+
buildNotificationGroups,
|
|
6203
6416
|
buttonBaseClasses,
|
|
6204
6417
|
buttonDisabledClasses,
|
|
6205
6418
|
buttonSizeClasses,
|
|
@@ -6251,6 +6464,7 @@ export {
|
|
|
6251
6464
|
clampSlideIndex,
|
|
6252
6465
|
classNames,
|
|
6253
6466
|
clearFieldErrors,
|
|
6467
|
+
clipCommentTreeDepth,
|
|
6254
6468
|
clockSolidIcon20PathD,
|
|
6255
6469
|
closeIconPathD,
|
|
6256
6470
|
closeIconPathStrokeLinecap,
|
|
@@ -6307,6 +6521,7 @@ export {
|
|
|
6307
6521
|
datePickerNavButtonClasses,
|
|
6308
6522
|
defaultAlertThemeColors,
|
|
6309
6523
|
defaultBadgeThemeColors,
|
|
6524
|
+
defaultChatMessageStatusInfo,
|
|
6310
6525
|
defaultExpandIcon,
|
|
6311
6526
|
defaultIndeterminateIcon,
|
|
6312
6527
|
defaultLinkThemeColors,
|
|
@@ -6351,7 +6566,10 @@ export {
|
|
|
6351
6566
|
focusFirst,
|
|
6352
6567
|
focusRingClasses,
|
|
6353
6568
|
focusRingInsetClasses,
|
|
6569
|
+
formatActivityTime,
|
|
6354
6570
|
formatBadgeContent,
|
|
6571
|
+
formatChatTime,
|
|
6572
|
+
formatCommentTime,
|
|
6355
6573
|
formatDate,
|
|
6356
6574
|
formatFileSize,
|
|
6357
6575
|
formatMonthYear,
|
|
@@ -6398,6 +6616,7 @@ export {
|
|
|
6398
6616
|
getChartEntranceTransform,
|
|
6399
6617
|
getChartGridLineDasharray,
|
|
6400
6618
|
getChartInnerRect,
|
|
6619
|
+
getChatMessageStatusInfo,
|
|
6401
6620
|
getCheckboxCellClasses,
|
|
6402
6621
|
getCheckboxClasses,
|
|
6403
6622
|
getCheckboxLabelClasses,
|
|
@@ -6451,6 +6670,13 @@ export {
|
|
|
6451
6670
|
getFlexClasses,
|
|
6452
6671
|
getFocusTrapNavigation,
|
|
6453
6672
|
getFocusableElements,
|
|
6673
|
+
getFormItemAsteriskClasses,
|
|
6674
|
+
getFormItemAsteriskStyle,
|
|
6675
|
+
getFormItemClasses,
|
|
6676
|
+
getFormItemContentClasses,
|
|
6677
|
+
getFormItemErrorClasses,
|
|
6678
|
+
getFormItemFieldClasses,
|
|
6679
|
+
getFormItemLabelClasses,
|
|
6454
6680
|
getGridColumnClasses,
|
|
6455
6681
|
getGutterStyles,
|
|
6456
6682
|
getInitials,
|
|
@@ -6811,10 +7037,12 @@ export {
|
|
|
6811
7037
|
sliderThumbClasses,
|
|
6812
7038
|
sliderTooltipClasses,
|
|
6813
7039
|
sliderTrackClasses,
|
|
7040
|
+
sortActivityGroups,
|
|
6814
7041
|
sortAscIcon16PathD,
|
|
6815
7042
|
sortBothIcon16PathD,
|
|
6816
7043
|
sortData,
|
|
6817
7044
|
sortDescIcon16PathD,
|
|
7045
|
+
sortNotificationGroups,
|
|
6818
7046
|
stackSeriesData,
|
|
6819
7047
|
statusErrorIconPath,
|
|
6820
7048
|
statusIconPaths,
|
|
@@ -6899,6 +7127,7 @@ export {
|
|
|
6899
7127
|
timelineTailClasses,
|
|
6900
7128
|
to12HourFormat,
|
|
6901
7129
|
to24HourFormat,
|
|
7130
|
+
toActivityTimelineItems,
|
|
6902
7131
|
toggleKey,
|
|
6903
7132
|
togglePanelKey,
|
|
6904
7133
|
treeBaseClasses,
|