@object-ui/plugin-detail 3.3.0 → 3.3.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/CHANGELOG.md +11 -0
- package/README.md +21 -1
- package/dist/AddressField-LgHnO2Lk.js +98 -0
- package/dist/AutoNumberField-xZCrU0eW.js +14 -0
- package/dist/{AvatarField-Xuieq0ZI.js → AvatarField-Dy2XGlPz.js} +16 -15
- package/dist/{BooleanField-DwfMKknK.js → BooleanField-C0Clfka5.js} +11 -10
- package/dist/CodeField-CHUa07B6.js +23 -0
- package/dist/ColorField-vxHqEhcS.js +38 -0
- package/dist/CurrencyField-DiWjYWDo.js +49 -0
- package/dist/DateField-DGaRPM4P.js +22 -0
- package/dist/DateTimeField-8QnpsI_h.js +30 -0
- package/dist/EmailField-CkVgMbpI.js +26 -0
- package/dist/FileField-5UPV7uek.js +149 -0
- package/dist/FormulaField-BUgt6-Pi.js +17 -0
- package/dist/GeolocationField-D9T_jgG6.js +118 -0
- package/dist/GridField-DE_HwiIN.js +49 -0
- package/dist/ImageField-Dswnqtzf.js +73 -0
- package/dist/LocationField-gjqbE6na.js +36 -0
- package/dist/LookupField-BcS3LRKc.js +901 -0
- package/dist/{MasterDetailField-B0HTmmD7.js → MasterDetailField-BF6_-X3A.js} +20 -19
- package/dist/NumberField-Dj2rYmrS.js +27 -0
- package/dist/ObjectField-BymIojwd.js +50 -0
- package/dist/{PasswordField-DVTimsc3.js → PasswordField-ED_Xgqz-.js} +8 -7
- package/dist/PercentField-D-JKOxKC.js +61 -0
- package/dist/PhoneField-DSCaGYq7.js +26 -0
- package/dist/QRCodeField-CtcOUapi.js +73 -0
- package/dist/{RatingField-rRi_P0N0.js → RatingField-BDnyQFWy.js} +10 -9
- package/dist/RichTextField-CH6LVZQA.js +33 -0
- package/dist/SelectField-DE4dpkMV.js +36 -0
- package/dist/{SignatureField-2CnhcWI0.js → SignatureField-B1wh3f5A.js} +18 -17
- package/dist/{SliderField-DEpMVXko.js → SliderField-zoTCKh9n.js} +2 -1
- package/dist/SummaryField-BeBVT6VN.js +22 -0
- package/dist/TextAreaField-rfUGrRxh.js +37 -0
- package/dist/TextField-C_yM7ATQ.js +30 -0
- package/dist/TimeField-BcQmBZi9.js +22 -0
- package/dist/UrlField-BakaF6NI.js +31 -0
- package/dist/UserField-zS7y3eKb.js +76 -0
- package/dist/VectorField-CTZ4myDM.js +34 -0
- package/dist/index.js +1912 -1728
- package/dist/index.umd.cjs +38 -47
- package/dist/packages/plugin-detail/src/DetailSection.d.ts.map +1 -1
- package/dist/packages/plugin-detail/src/DetailView.d.ts +24 -0
- package/dist/packages/plugin-detail/src/DetailView.d.ts.map +1 -1
- package/dist/packages/plugin-detail/src/RelatedList.d.ts +8 -0
- package/dist/packages/plugin-detail/src/RelatedList.d.ts.map +1 -1
- package/dist/packages/plugin-detail/src/useDetailTranslation.d.ts.map +1 -1
- package/dist/plugin-detail.css +1 -2
- package/dist/rolldown-runtime-DnwLefa7.js +23 -0
- package/dist/{src-C56Ly5uG.js → src-DyUKLvMN.js} +18271 -26636
- package/dist/{useFieldTranslation-CkxqyB82.js → useFieldTranslation-BRgjC1oq.js} +1 -1
- package/package.json +33 -11
- package/.turbo/turbo-build.log +0 -64
- package/dist/AddressField-CDLSeyNx.js +0 -93
- package/dist/AutoNumberField-CtE7suf5.js +0 -14
- package/dist/CodeField-CfwgRxx2.js +0 -22
- package/dist/ColorField-YKHA7dBD.js +0 -37
- package/dist/CurrencyField-tvS3fPAF.js +0 -51
- package/dist/DateField-BKqXpkOh.js +0 -21
- package/dist/DateTimeField-CR-nJCE7.js +0 -32
- package/dist/EmailField-CgvW1Qal.js +0 -28
- package/dist/FileField-BVAme2ML.js +0 -151
- package/dist/FormulaField-DamJ2VaG.js +0 -14
- package/dist/GeolocationField-C99z7ZBM.js +0 -113
- package/dist/GridField-C9JbpTx_.js +0 -51
- package/dist/ImageField-CDANtgVV.js +0 -75
- package/dist/LocationField-ZSyZ0O-h.js +0 -35
- package/dist/LookupField-B3hQJt95.js +0 -903
- package/dist/LookupField-D00z6gn_.js +0 -2
- package/dist/NumberField-DL2QAL7X.js +0 -26
- package/dist/ObjectField-JYvUnuRO.js +0 -52
- package/dist/PercentField-DjR6BSpw.js +0 -63
- package/dist/PhoneField-CX1JL-jp.js +0 -28
- package/dist/QRCodeField-CH_1pU6R.js +0 -72
- package/dist/RichTextField-CJqLWlrb.js +0 -32
- package/dist/SelectField-DGoDoRM_.js +0 -30
- package/dist/SelectField-XBVI50AD.js +0 -2
- package/dist/SummaryField-7ch9aqAu.js +0 -19
- package/dist/TextAreaField-Cmw1oXcw.js +0 -36
- package/dist/TextField-OTLa3p51.js +0 -29
- package/dist/TimeField-DKPoNWoR.js +0 -21
- package/dist/UrlField-CxbmzP9f.js +0 -33
- package/dist/UserField-ChvwUkMK.js +0 -78
- package/dist/VectorField-BVClL8Vw.js +0 -36
- package/src/ActivityTimeline.tsx +0 -184
- package/src/CommentAttachment.tsx +0 -194
- package/src/CommentInput.tsx +0 -81
- package/src/DetailSection.tsx +0 -340
- package/src/DetailTabs.tsx +0 -73
- package/src/DetailView.stories.tsx +0 -334
- package/src/DetailView.tsx +0 -823
- package/src/DiffView.tsx +0 -233
- package/src/FieldChangeItem.tsx +0 -46
- package/src/HeaderHighlight.tsx +0 -88
- package/src/InlineCreateRelated.tsx +0 -291
- package/src/MentionAutocomplete.tsx +0 -123
- package/src/PointInTimeRestore.tsx +0 -261
- package/src/ReactionPicker.tsx +0 -106
- package/src/RecordActivityTimeline.tsx +0 -433
- package/src/RecordChatterPanel.tsx +0 -209
- package/src/RecordComments.tsx +0 -217
- package/src/RecordNavigationEnhanced.tsx +0 -213
- package/src/RelatedList.tsx +0 -413
- package/src/RelationshipGraph.tsx +0 -286
- package/src/RichTextCommentInput.tsx +0 -350
- package/src/SectionGroup.tsx +0 -101
- package/src/SubscriptionToggle.tsx +0 -62
- package/src/ThreadedReplies.tsx +0 -163
- package/src/__tests__/ActivityTimeline.test.tsx +0 -119
- package/src/__tests__/ActivityTimelineFiltering.test.tsx +0 -143
- package/src/__tests__/CommentInput.test.tsx +0 -57
- package/src/__tests__/DetailSection.test.tsx +0 -490
- package/src/__tests__/DetailView.test.tsx +0 -694
- package/src/__tests__/FieldChangeItem.test.tsx +0 -119
- package/src/__tests__/HeaderHighlight.test.tsx +0 -213
- package/src/__tests__/MentionAutocomplete.test.tsx +0 -97
- package/src/__tests__/ReactionPicker.test.tsx +0 -113
- package/src/__tests__/RecordActivityTimeline.test.tsx +0 -395
- package/src/__tests__/RecordChatterPanel.test.tsx +0 -265
- package/src/__tests__/RecordComments.test.tsx +0 -96
- package/src/__tests__/RecordCommentsPinSearch.test.tsx +0 -133
- package/src/__tests__/RelatedList.test.tsx +0 -160
- package/src/__tests__/SectionGroup.test.tsx +0 -101
- package/src/__tests__/SubscriptionToggle.test.tsx +0 -84
- package/src/__tests__/ThreadedReplies.test.tsx +0 -212
- package/src/__tests__/autoLayout.test.ts +0 -228
- package/src/__tests__/phase12-features.test.tsx +0 -583
- package/src/__tests__/roadmap-features.test.tsx +0 -478
- package/src/autoLayout.ts +0 -128
- package/src/index.tsx +0 -149
- package/src/useDetailTranslation.ts +0 -183
- package/tsconfig.json +0 -18
- package/vite.config.ts +0 -57
- package/vitest.config.ts +0 -13
- package/vitest.setup.ts +0 -1
package/src/index.tsx
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ObjectUI
|
|
3
|
-
* Copyright (c) 2024-present ObjectStack Inc.
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the MIT license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { ComponentRegistry } from '@object-ui/core';
|
|
10
|
-
import { DetailView } from './DetailView';
|
|
11
|
-
import { DetailSection } from './DetailSection';
|
|
12
|
-
import { DetailTabs } from './DetailTabs';
|
|
13
|
-
import { RelatedList } from './RelatedList';
|
|
14
|
-
import type { DetailViewSchema } from '@object-ui/types';
|
|
15
|
-
|
|
16
|
-
export { DetailView, DetailSection, DetailTabs, RelatedList };
|
|
17
|
-
export { SectionGroup } from './SectionGroup';
|
|
18
|
-
export { HeaderHighlight } from './HeaderHighlight';
|
|
19
|
-
export { inferDetailColumns, isWideFieldType, applyAutoSpan, applyDetailAutoLayout } from './autoLayout';
|
|
20
|
-
export { useDetailTranslation, DETAIL_DEFAULT_TRANSLATIONS, createSafeTranslationHook } from './useDetailTranslation';
|
|
21
|
-
export { RecordComments } from './RecordComments';
|
|
22
|
-
export { ActivityTimeline } from './ActivityTimeline';
|
|
23
|
-
export { InlineCreateRelated } from './InlineCreateRelated';
|
|
24
|
-
export { RichTextCommentInput } from './RichTextCommentInput';
|
|
25
|
-
export { DiffView } from './DiffView';
|
|
26
|
-
export { RecordNavigationEnhanced } from './RecordNavigationEnhanced';
|
|
27
|
-
export { RelationshipGraph } from './RelationshipGraph';
|
|
28
|
-
export { CommentAttachment } from './CommentAttachment';
|
|
29
|
-
export { PointInTimeRestore } from './PointInTimeRestore';
|
|
30
|
-
export { RecordActivityTimeline } from './RecordActivityTimeline';
|
|
31
|
-
export { RecordChatterPanel } from './RecordChatterPanel';
|
|
32
|
-
export { CommentInput } from './CommentInput';
|
|
33
|
-
export { FieldChangeItem } from './FieldChangeItem';
|
|
34
|
-
export { MentionAutocomplete, createMentionFromSuggestion } from './MentionAutocomplete';
|
|
35
|
-
export { SubscriptionToggle } from './SubscriptionToggle';
|
|
36
|
-
export { ReactionPicker } from './ReactionPicker';
|
|
37
|
-
export { ThreadedReplies } from './ThreadedReplies';
|
|
38
|
-
export type { DetailViewProps } from './DetailView';
|
|
39
|
-
export type { DetailSectionProps, VirtualScrollOptions } from './DetailSection';
|
|
40
|
-
export type { DetailTabsProps } from './DetailTabs';
|
|
41
|
-
export type { RelatedListProps } from './RelatedList';
|
|
42
|
-
export type { SectionGroupProps } from './SectionGroup';
|
|
43
|
-
export type { HeaderHighlightProps } from './HeaderHighlight';
|
|
44
|
-
export type { RecordCommentsProps } from './RecordComments';
|
|
45
|
-
export type { ActivityTimelineProps, ActivityFilterType } from './ActivityTimeline';
|
|
46
|
-
export type { InlineCreateRelatedProps, RelatedFieldDefinition, RelatedRecordOption } from './InlineCreateRelated';
|
|
47
|
-
export type { RichTextCommentInputProps, MentionSuggestion } from './RichTextCommentInput';
|
|
48
|
-
export type { DiffViewProps, DiffFieldType, DiffMode, DiffLine } from './DiffView';
|
|
49
|
-
export type { RecordNavigationEnhancedProps } from './RecordNavigationEnhanced';
|
|
50
|
-
export type { RelationshipGraphProps, GraphNode } from './RelationshipGraph';
|
|
51
|
-
export type { CommentAttachmentProps, Attachment } from './CommentAttachment';
|
|
52
|
-
export type { PointInTimeRestoreProps, RevisionEntry } from './PointInTimeRestore';
|
|
53
|
-
export type { RecordActivityTimelineProps, FeedFilterMode } from './RecordActivityTimeline';
|
|
54
|
-
export type { RecordChatterPanelProps } from './RecordChatterPanel';
|
|
55
|
-
export type { CommentInputProps } from './CommentInput';
|
|
56
|
-
export type { FieldChangeItemProps } from './FieldChangeItem';
|
|
57
|
-
export type { MentionAutocompleteProps, MentionSuggestionItem } from './MentionAutocomplete';
|
|
58
|
-
export type { SubscriptionToggleProps } from './SubscriptionToggle';
|
|
59
|
-
export type { ReactionPickerProps } from './ReactionPicker';
|
|
60
|
-
export type { ThreadedRepliesProps } from './ThreadedReplies';
|
|
61
|
-
|
|
62
|
-
// Register DetailView component
|
|
63
|
-
ComponentRegistry.register('detail-view', DetailView, {
|
|
64
|
-
namespace: 'plugin-detail',
|
|
65
|
-
label: 'Detail View',
|
|
66
|
-
category: 'Views',
|
|
67
|
-
icon: 'FileText',
|
|
68
|
-
inputs: [
|
|
69
|
-
{ name: 'title', type: 'string', label: 'Title' },
|
|
70
|
-
{ name: 'objectName', type: 'string', label: 'Object Name' },
|
|
71
|
-
{ name: 'resourceId', type: 'string', label: 'Resource ID' },
|
|
72
|
-
{ name: 'api', type: 'string', label: 'API Endpoint' },
|
|
73
|
-
{ name: 'data', type: 'object', label: 'Data' },
|
|
74
|
-
{ name: 'layout', type: 'enum', label: 'Layout Mode', enum: ['vertical', 'horizontal', 'grid'] },
|
|
75
|
-
{ name: 'columns', type: 'number', label: 'Grid Columns' },
|
|
76
|
-
{ name: 'sections', type: 'array', label: 'Sections' },
|
|
77
|
-
{ name: 'fields', type: 'array', label: 'Fields' },
|
|
78
|
-
{ name: 'tabs', type: 'array', label: 'Tabs' },
|
|
79
|
-
{ name: 'related', type: 'array', label: 'Related Lists' },
|
|
80
|
-
{ name: 'actions', type: 'array', label: 'Actions' },
|
|
81
|
-
{ name: 'showBack', type: 'boolean', label: 'Show Back Button', defaultValue: true },
|
|
82
|
-
{ name: 'backUrl', type: 'string', label: 'Back URL' },
|
|
83
|
-
{ name: 'showEdit', type: 'boolean', label: 'Show Edit Button', defaultValue: false },
|
|
84
|
-
{ name: 'editUrl', type: 'string', label: 'Edit URL' },
|
|
85
|
-
{ name: 'showDelete', type: 'boolean', label: 'Show Delete Button', defaultValue: false },
|
|
86
|
-
{ name: 'deleteConfirmation', type: 'string', label: 'Delete Confirmation Message' },
|
|
87
|
-
{ name: 'loading', type: 'boolean', label: 'Show Loading State' },
|
|
88
|
-
{ name: 'header', type: 'object', label: 'Custom Header' },
|
|
89
|
-
{ name: 'footer', type: 'object', label: 'Custom Footer' },
|
|
90
|
-
],
|
|
91
|
-
defaultProps: {
|
|
92
|
-
title: 'Detail View',
|
|
93
|
-
showBack: true,
|
|
94
|
-
showEdit: false,
|
|
95
|
-
showDelete: false,
|
|
96
|
-
sections: [],
|
|
97
|
-
fields: [],
|
|
98
|
-
tabs: [],
|
|
99
|
-
related: [],
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
// Register DetailSection component
|
|
104
|
-
ComponentRegistry.register('detail-section', DetailSection, {
|
|
105
|
-
namespace: 'plugin-detail',
|
|
106
|
-
label: 'Detail Section',
|
|
107
|
-
category: 'Detail Components',
|
|
108
|
-
inputs: [
|
|
109
|
-
{ name: 'title', type: 'string', label: 'Title' },
|
|
110
|
-
{ name: 'description', type: 'string', label: 'Description' },
|
|
111
|
-
{ name: 'fields', type: 'array', label: 'Fields', required: true },
|
|
112
|
-
{ name: 'collapsible', type: 'boolean', label: 'Collapsible', defaultValue: false },
|
|
113
|
-
{ name: 'defaultCollapsed', type: 'boolean', label: 'Default Collapsed', defaultValue: false },
|
|
114
|
-
{ name: 'columns', type: 'number', label: 'Columns', defaultValue: 2 },
|
|
115
|
-
{ name: 'showBorder', type: 'boolean', label: 'Show Border', defaultValue: true },
|
|
116
|
-
{ name: 'headerColor', type: 'string', label: 'Header Color' },
|
|
117
|
-
],
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
// Register RelatedList component
|
|
121
|
-
ComponentRegistry.register('related-list', RelatedList, {
|
|
122
|
-
namespace: 'plugin-detail',
|
|
123
|
-
label: 'Related List',
|
|
124
|
-
category: 'Detail Components',
|
|
125
|
-
inputs: [
|
|
126
|
-
{ name: 'title', type: 'string', label: 'Title', required: true },
|
|
127
|
-
{ name: 'type', type: 'enum', label: 'Type', enum: [
|
|
128
|
-
{ label: 'List', value: 'list' },
|
|
129
|
-
{ label: 'Grid', value: 'grid' },
|
|
130
|
-
{ label: 'Table', value: 'table' }
|
|
131
|
-
], defaultValue: 'table' },
|
|
132
|
-
{ name: 'api', type: 'string', label: 'API Endpoint' },
|
|
133
|
-
{ name: 'data', type: 'array', label: 'Data' },
|
|
134
|
-
{ name: 'columns', type: 'array', label: 'Columns' },
|
|
135
|
-
],
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
// Alias for generic view
|
|
139
|
-
ComponentRegistry.register('detail', DetailView, {
|
|
140
|
-
namespace: 'view',
|
|
141
|
-
category: 'view',
|
|
142
|
-
label: 'Detail',
|
|
143
|
-
icon: 'FileText',
|
|
144
|
-
inputs: [
|
|
145
|
-
{ name: 'objectName', type: 'string', label: 'Object Name', required: true },
|
|
146
|
-
{ name: 'recordId', type: 'string', label: 'Record ID' },
|
|
147
|
-
{ name: 'fields', type: 'array', label: 'Fields' },
|
|
148
|
-
]
|
|
149
|
-
});
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ObjectUI
|
|
3
|
-
* Copyright (c) 2024-present ObjectStack Inc.
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the MIT license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { useObjectTranslation } from '@object-ui/react';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Create a safe translation hook with fallback to defaults.
|
|
13
|
-
* Follows the same pattern as useGridTranslation / useListViewTranslation.
|
|
14
|
-
*
|
|
15
|
-
* @param defaults - Fallback English translations keyed by i18n key
|
|
16
|
-
* @param testKey - A key to test if i18n is properly configured
|
|
17
|
-
*/
|
|
18
|
-
export function createSafeTranslationHook(
|
|
19
|
-
defaults: Record<string, string>,
|
|
20
|
-
testKey: string,
|
|
21
|
-
) {
|
|
22
|
-
return function useSafeTranslation() {
|
|
23
|
-
try {
|
|
24
|
-
const result = useObjectTranslation();
|
|
25
|
-
const testValue = result.t(testKey);
|
|
26
|
-
if (testValue === testKey) {
|
|
27
|
-
return {
|
|
28
|
-
t: (key: string, options?: Record<string, unknown>) => {
|
|
29
|
-
let value = defaults[key] || key;
|
|
30
|
-
if (options) {
|
|
31
|
-
for (const [k, v] of Object.entries(options)) {
|
|
32
|
-
value = value.replace(`{{${k}}}`, String(v));
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return value;
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
return { t: result.t };
|
|
40
|
-
} catch {
|
|
41
|
-
return {
|
|
42
|
-
t: (key: string, options?: Record<string, unknown>) => {
|
|
43
|
-
let value = defaults[key] || key;
|
|
44
|
-
if (options) {
|
|
45
|
-
for (const [k, v] of Object.entries(options)) {
|
|
46
|
-
value = value.replace(`{{${k}}}`, String(v));
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return value;
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Default English translations for detail view components.
|
|
58
|
-
* Used as fallback when no I18nProvider is available.
|
|
59
|
-
*/
|
|
60
|
-
export const DETAIL_DEFAULT_TRANSLATIONS: Record<string, string> = {
|
|
61
|
-
'detail.back': 'Back',
|
|
62
|
-
'detail.edit': 'Edit',
|
|
63
|
-
'detail.editInline': 'Edit inline',
|
|
64
|
-
'detail.save': 'Save',
|
|
65
|
-
'detail.saveChanges': 'Save changes',
|
|
66
|
-
'detail.editFieldsInline': 'Edit fields inline',
|
|
67
|
-
'detail.share': 'Share',
|
|
68
|
-
'detail.duplicate': 'Duplicate',
|
|
69
|
-
'detail.export': 'Export',
|
|
70
|
-
'detail.viewHistory': 'View history',
|
|
71
|
-
'detail.delete': 'Delete',
|
|
72
|
-
'detail.moreActions': 'More actions',
|
|
73
|
-
'detail.addToFavorites': 'Add to favorites',
|
|
74
|
-
'detail.removeFromFavorites': 'Remove from favorites',
|
|
75
|
-
'detail.previousRecord': 'Previous record',
|
|
76
|
-
'detail.nextRecord': 'Next record',
|
|
77
|
-
'detail.recordOf': '{{current}} of {{total}}',
|
|
78
|
-
'detail.recordNotFound': 'Record not found',
|
|
79
|
-
'detail.recordNotFoundDescription': 'The record you are looking for does not exist or may have been deleted.',
|
|
80
|
-
'detail.goBack': 'Go back',
|
|
81
|
-
'detail.details': 'Details',
|
|
82
|
-
'detail.related': 'Related',
|
|
83
|
-
'detail.relatedRecords': '{{count}} records',
|
|
84
|
-
'detail.relatedRecordOne': '{{count}} record',
|
|
85
|
-
'detail.noRelatedRecords': 'No related records found',
|
|
86
|
-
'detail.loading': 'Loading...',
|
|
87
|
-
'detail.copyToClipboard': 'Copy to clipboard',
|
|
88
|
-
'detail.copied': 'Copied!',
|
|
89
|
-
'detail.deleteConfirmation': 'Are you sure you want to delete this record?',
|
|
90
|
-
'detail.editRecord': 'Edit record',
|
|
91
|
-
'detail.viewAll': 'View All',
|
|
92
|
-
'detail.new': 'New',
|
|
93
|
-
'detail.emptyValue': '—',
|
|
94
|
-
'detail.activity': 'Activity',
|
|
95
|
-
'detail.editRow': 'Edit',
|
|
96
|
-
'detail.deleteRow': 'Delete',
|
|
97
|
-
'detail.deleteRowConfirmation': 'Are you sure you want to delete this record?',
|
|
98
|
-
'detail.actions': 'Actions',
|
|
99
|
-
'detail.previousPage': 'Previous',
|
|
100
|
-
'detail.nextPage': 'Next',
|
|
101
|
-
'detail.pageOf': 'Page {{current}} of {{total}}',
|
|
102
|
-
'detail.sortBy': 'Sort by',
|
|
103
|
-
'detail.filterPlaceholder': 'Filter...',
|
|
104
|
-
'detail.highlightFields': 'Key Fields',
|
|
105
|
-
// Comments
|
|
106
|
-
'detail.comments': 'Comments',
|
|
107
|
-
'detail.searchComments': 'Search comments…',
|
|
108
|
-
'detail.addCommentPlaceholder': 'Add a comment… (Ctrl+Enter to submit)',
|
|
109
|
-
'detail.noMatchingComments': 'No matching comments',
|
|
110
|
-
'detail.noCommentsYet': 'No comments yet',
|
|
111
|
-
'detail.pinned': 'Pinned',
|
|
112
|
-
'detail.pin': 'Pin',
|
|
113
|
-
'detail.unpin': 'Unpin',
|
|
114
|
-
'detail.justNow': 'just now',
|
|
115
|
-
'detail.minutesAgo': '{{count}}m ago',
|
|
116
|
-
'detail.hoursAgo': '{{count}}h ago',
|
|
117
|
-
'detail.daysAgo': '{{count}}d ago',
|
|
118
|
-
// Attachments
|
|
119
|
-
'detail.dropFilesToUpload': 'Drop files here or click to upload',
|
|
120
|
-
'detail.attachmentCount': '{{count}} attachment',
|
|
121
|
-
'detail.attachmentCountPlural': '{{count}} attachments',
|
|
122
|
-
'detail.removeAttachment': 'Remove attachment',
|
|
123
|
-
// Diff
|
|
124
|
-
'detail.unifiedDiff': 'Unified diff',
|
|
125
|
-
'detail.sideBySideDiff': 'Side-by-side diff',
|
|
126
|
-
'detail.noChanges': 'No changes',
|
|
127
|
-
'detail.previousVersion': 'Previous',
|
|
128
|
-
'detail.currentVersion': 'Current',
|
|
129
|
-
// Discussion
|
|
130
|
-
'detail.discussion': 'Discussion',
|
|
131
|
-
'detail.showDiscussion': 'Show Discussion ({{count}})',
|
|
132
|
-
'detail.hideDiscussion': 'Hide discussion',
|
|
133
|
-
// Rich text editor
|
|
134
|
-
'detail.bold': 'Bold (Ctrl+B)',
|
|
135
|
-
'detail.italic': 'Italic (Ctrl+I)',
|
|
136
|
-
'detail.listFormat': 'List',
|
|
137
|
-
'detail.inlineCode': 'Inline code',
|
|
138
|
-
'detail.mentionSomeone': 'Mention someone',
|
|
139
|
-
'detail.preview': 'Preview',
|
|
140
|
-
'detail.submitComment': 'Submit (Ctrl+Enter)',
|
|
141
|
-
'detail.writeComment': 'Write a comment…',
|
|
142
|
-
// Subscription
|
|
143
|
-
'detail.subscribedTooltip': 'Subscribed — click to unsubscribe',
|
|
144
|
-
'detail.unsubscribedTooltip': 'Subscribe to notifications',
|
|
145
|
-
// Navigation
|
|
146
|
-
'detail.firstRecord': 'First record (Home)',
|
|
147
|
-
'detail.previousRecordKey': 'Previous record (←)',
|
|
148
|
-
'detail.nextRecordKey': 'Next record (→)',
|
|
149
|
-
'detail.lastRecord': 'Last record (End)',
|
|
150
|
-
'detail.noRecords': 'No records',
|
|
151
|
-
'detail.searchWhileNavigating': 'Search while navigating',
|
|
152
|
-
'detail.searchRecords': 'Search records…',
|
|
153
|
-
// Activity timeline
|
|
154
|
-
'detail.allActivity': 'All Activity',
|
|
155
|
-
'detail.commentsOnly': 'Comments Only',
|
|
156
|
-
'detail.fieldChangesFilter': 'Field Changes',
|
|
157
|
-
'detail.tasksOnly': 'Tasks Only',
|
|
158
|
-
'detail.leaveCommentPlaceholder': 'Leave a comment… (Ctrl+Enter to submit)',
|
|
159
|
-
'detail.noActivity': 'No activity recorded',
|
|
160
|
-
'detail.loadMore': 'Load more',
|
|
161
|
-
'detail.edited': '(edited)',
|
|
162
|
-
'detail.via': 'via {{source}}',
|
|
163
|
-
// Replies
|
|
164
|
-
'detail.replyCount': '{{count}} reply',
|
|
165
|
-
'detail.replyCountPlural': '{{count}} replies',
|
|
166
|
-
'detail.replyPlaceholder': 'Reply…',
|
|
167
|
-
// Aria labels
|
|
168
|
-
'detail.filterActivity': 'Filter activity',
|
|
169
|
-
'detail.openDiscussion': 'Open discussion panel',
|
|
170
|
-
'detail.closeDiscussion': 'Close discussion panel',
|
|
171
|
-
'detail.subscribeAriaLabel': 'Subscribe to notifications',
|
|
172
|
-
'detail.unsubscribeAriaLabel': 'Unsubscribe from notifications',
|
|
173
|
-
'detail.clearSearch': 'Clear search',
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* Translation hook for detail view components.
|
|
178
|
-
* Falls back to DETAIL_DEFAULT_TRANSLATIONS when no I18nProvider is available.
|
|
179
|
-
*/
|
|
180
|
-
export const useDetailTranslation = createSafeTranslationHook(
|
|
181
|
-
DETAIL_DEFAULT_TRANSLATIONS,
|
|
182
|
-
'detail.back',
|
|
183
|
-
);
|
package/tsconfig.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "dist",
|
|
5
|
-
"jsx": "react-jsx",
|
|
6
|
-
"baseUrl": ".",
|
|
7
|
-
"paths": {
|
|
8
|
-
"@/*": ["src/*"]
|
|
9
|
-
},
|
|
10
|
-
"noEmit": false,
|
|
11
|
-
"declaration": true,
|
|
12
|
-
"composite": true,
|
|
13
|
-
"declarationMap": true,
|
|
14
|
-
"skipLibCheck": true
|
|
15
|
-
},
|
|
16
|
-
"include": ["src"],
|
|
17
|
-
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.test.tsx"]
|
|
18
|
-
}
|
package/vite.config.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vite';
|
|
2
|
-
import react from '@vitejs/plugin-react';
|
|
3
|
-
import dts from 'vite-plugin-dts';
|
|
4
|
-
import { resolve } from 'path';
|
|
5
|
-
|
|
6
|
-
export default defineConfig({
|
|
7
|
-
plugins: [
|
|
8
|
-
react(),
|
|
9
|
-
dts({
|
|
10
|
-
insertTypesEntry: true,
|
|
11
|
-
compilerOptions: { rootDir: resolve(__dirname, '../..') },
|
|
12
|
-
outDir: 'dist',
|
|
13
|
-
tsconfigPath: './tsconfig.json',
|
|
14
|
-
}),
|
|
15
|
-
],
|
|
16
|
-
resolve: {
|
|
17
|
-
alias: {
|
|
18
|
-
'@': resolve(__dirname, './src'),
|
|
19
|
-
'@object-ui/core': resolve(__dirname, '../core/src'),
|
|
20
|
-
'@object-ui/types': resolve(__dirname, '../types/src'),
|
|
21
|
-
'@object-ui/react': resolve(__dirname, '../react/src'),
|
|
22
|
-
'@object-ui/components': resolve(__dirname, '../components/src'),
|
|
23
|
-
'@object-ui/fields': resolve(__dirname, '../fields/src'),
|
|
24
|
-
'@object-ui/plugin-dashboard': resolve(__dirname, '../plugin-dashboard/src'),
|
|
25
|
-
'@object-ui/plugin-grid': resolve(__dirname, '../plugin-grid/src'),
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
build: {
|
|
29
|
-
lib: {
|
|
30
|
-
entry: resolve(__dirname, 'src/index.tsx'),
|
|
31
|
-
name: 'ObjectUIPluginDetail',
|
|
32
|
-
formats: ['es', 'umd'],
|
|
33
|
-
fileName: (format) => `index.${format === 'es' ? 'js' : 'umd.cjs'}`,
|
|
34
|
-
},
|
|
35
|
-
rollupOptions: {
|
|
36
|
-
external: ['react', 'react-dom', 'react/jsx-runtime'],
|
|
37
|
-
output: {
|
|
38
|
-
globals: {
|
|
39
|
-
react: 'React',
|
|
40
|
-
'react-dom': 'ReactDOM',
|
|
41
|
-
'react/jsx-runtime': 'jsxRuntime',
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
test: {
|
|
47
|
-
globals: true,
|
|
48
|
-
environment: 'happy-dom',
|
|
49
|
-
setupFiles: ['../../vitest.setup.tsx'],
|
|
50
|
-
passWithNoTests: true,
|
|
51
|
-
css: {
|
|
52
|
-
modules: {
|
|
53
|
-
classNameStrategy: 'non-scoped',
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
});
|
package/vitest.config.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="vitest" />
|
|
2
|
-
import { defineConfig } from 'vite';
|
|
3
|
-
import react from '@vitejs/plugin-react';
|
|
4
|
-
import path from 'path';
|
|
5
|
-
|
|
6
|
-
export default defineConfig({
|
|
7
|
-
plugins: [react()],
|
|
8
|
-
test: {
|
|
9
|
-
environment: 'happy-dom',
|
|
10
|
-
globals: true,
|
|
11
|
-
setupFiles: ['./vitest.setup.ts'],
|
|
12
|
-
},
|
|
13
|
-
});
|
package/vitest.setup.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@testing-library/jest-dom';
|