@donotdev/ui 0.0.10 → 0.0.11
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/crud/components/EntityCardList.d.ts +16 -0
- package/dist/crud/components/EntityCardList.d.ts.map +1 -0
- package/dist/crud/components/EntityCardList.js +175 -0
- package/dist/crud/components/EntityDisplayRenderer.d.ts +13 -21
- package/dist/crud/components/EntityDisplayRenderer.d.ts.map +1 -1
- package/dist/crud/components/EntityDisplayRenderer.js +138 -23
- package/dist/crud/components/EntityFormRenderer.d.ts +18 -0
- package/dist/crud/components/EntityFormRenderer.d.ts.map +1 -0
- package/dist/crud/components/EntityFormRenderer.js +275 -0
- package/dist/crud/components/EntityList.d.ts +14 -0
- package/dist/crud/components/EntityList.d.ts.map +1 -0
- package/dist/crud/components/EntityList.js +201 -0
- package/dist/crud/components/index.d.ts +7 -5
- package/dist/crud/components/index.d.ts.map +1 -1
- package/dist/crud/components/index.js +6 -5
- package/dist/dndev.css +179 -0
- package/dist/index.js +4 -64
- package/dist/internal/layout/components/AutoMetaTags.d.ts.map +1 -1
- package/dist/internal/layout/components/AutoMetaTags.js +36 -6
- package/dist/internal/layout/components/NextJsAutoMetaTags.d.ts.map +1 -1
- package/dist/internal/layout/components/NextJsAutoMetaTags.js +38 -10
- package/dist/internal/layout/components/footer/FooterBranding.js +2 -2
- package/dist/styles/index.css +179 -0
- package/package.json +12 -12
- package/dist/crud/components/DisplayFieldRenderer.d.ts +0 -26
- package/dist/crud/components/DisplayFieldRenderer.d.ts.map +0 -1
- package/dist/crud/components/DisplayFieldRenderer.js +0 -107
- package/dist/crud/components/fields/display/AvatarFieldDisplay.d.ts +0 -23
- package/dist/crud/components/fields/display/AvatarFieldDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/AvatarFieldDisplay.js +0 -38
- package/dist/crud/components/fields/display/BadgeFieldDisplay.d.ts +0 -21
- package/dist/crud/components/fields/display/BadgeFieldDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/BadgeFieldDisplay.js +0 -31
- package/dist/crud/components/fields/display/ButtonFieldDisplay.d.ts +0 -29
- package/dist/crud/components/fields/display/ButtonFieldDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/ButtonFieldDisplay.js +0 -12
- package/dist/crud/components/fields/display/CheckboxFieldDisplay.d.ts +0 -21
- package/dist/crud/components/fields/display/CheckboxFieldDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/CheckboxFieldDisplay.js +0 -27
- package/dist/crud/components/fields/display/DateFieldDisplay.d.ts +0 -24
- package/dist/crud/components/fields/display/DateFieldDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/DateFieldDisplay.js +0 -41
- package/dist/crud/components/fields/display/DropdownDisplay.d.ts +0 -21
- package/dist/crud/components/fields/display/DropdownDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/DropdownDisplay.js +0 -25
- package/dist/crud/components/fields/display/FileFieldDisplay.d.ts +0 -21
- package/dist/crud/components/fields/display/FileFieldDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/FileFieldDisplay.js +0 -25
- package/dist/crud/components/fields/display/GeoPointFieldDisplay.d.ts +0 -25
- package/dist/crud/components/fields/display/GeoPointFieldDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/GeoPointFieldDisplay.js +0 -25
- package/dist/crud/components/fields/display/HiddenFieldDisplay.d.ts +0 -30
- package/dist/crud/components/fields/display/HiddenFieldDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/HiddenFieldDisplay.js +0 -12
- package/dist/crud/components/fields/display/ImageFieldDisplay.d.ts +0 -24
- package/dist/crud/components/fields/display/ImageFieldDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/ImageFieldDisplay.js +0 -38
- package/dist/crud/components/fields/display/LinkFieldDisplay.d.ts +0 -22
- package/dist/crud/components/fields/display/LinkFieldDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/LinkFieldDisplay.js +0 -48
- package/dist/crud/components/fields/display/MapFieldDisplay.d.ts +0 -25
- package/dist/crud/components/fields/display/MapFieldDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/MapFieldDisplay.js +0 -25
- package/dist/crud/components/fields/display/MultiDropdownDisplay.d.ts +0 -22
- package/dist/crud/components/fields/display/MultiDropdownDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/MultiDropdownDisplay.js +0 -25
- package/dist/crud/components/fields/display/MultiInputTextFieldDisplay.d.ts +0 -22
- package/dist/crud/components/fields/display/MultiInputTextFieldDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/MultiInputTextFieldDisplay.js +0 -25
- package/dist/crud/components/fields/display/NumberFieldDisplay.d.ts +0 -24
- package/dist/crud/components/fields/display/NumberFieldDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/NumberFieldDisplay.js +0 -28
- package/dist/crud/components/fields/display/PasswordFieldDisplay.d.ts +0 -24
- package/dist/crud/components/fields/display/PasswordFieldDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/PasswordFieldDisplay.js +0 -31
- package/dist/crud/components/fields/display/PhoneNumberDisplay.d.ts +0 -22
- package/dist/crud/components/fields/display/PhoneNumberDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/PhoneNumberDisplay.js +0 -25
- package/dist/crud/components/fields/display/RadioFieldDisplay.d.ts +0 -22
- package/dist/crud/components/fields/display/RadioFieldDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/RadioFieldDisplay.js +0 -25
- package/dist/crud/components/fields/display/RangeFieldDisplay.d.ts +0 -22
- package/dist/crud/components/fields/display/RangeFieldDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/RangeFieldDisplay.js +0 -25
- package/dist/crud/components/fields/display/ReferenceFieldDisplay.d.ts +0 -22
- package/dist/crud/components/fields/display/ReferenceFieldDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/ReferenceFieldDisplay.js +0 -26
- package/dist/crud/components/fields/display/RichTextDisplay.d.ts +0 -25
- package/dist/crud/components/fields/display/RichTextDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/RichTextDisplay.js +0 -104
- package/dist/crud/components/fields/display/TextAreaDisplay.d.ts +0 -22
- package/dist/crud/components/fields/display/TextAreaDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/TextAreaDisplay.js +0 -25
- package/dist/crud/components/fields/display/TextFieldDisplay.d.ts +0 -42
- package/dist/crud/components/fields/display/TextFieldDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/TextFieldDisplay.js +0 -97
- package/dist/crud/components/fields/display/TimestampFieldDisplay.d.ts +0 -22
- package/dist/crud/components/fields/display/TimestampFieldDisplay.d.ts.map +0 -1
- package/dist/crud/components/fields/display/TimestampFieldDisplay.js +0 -33
- package/dist/crud/components/fields/display/index.d.ts +0 -32
- package/dist/crud/components/fields/display/index.d.ts.map +0 -1
- package/dist/crud/components/fields/display/index.js +0 -32
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// packages/ui/src/crud/components/fields/display/MultiDropdownDisplay.tsx
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview MultiDropdownDisplay component
|
|
5
|
-
* @description Displays multiselect values as multiple badges
|
|
6
|
-
*
|
|
7
|
-
* @version 0.0.1
|
|
8
|
-
* @since 0.0.1
|
|
9
|
-
* @author AMBROISE PARK Consulting
|
|
10
|
-
*/
|
|
11
|
-
import { Badge, BADGE_VARIANT, Text, Stack } from '@donotdev/components';
|
|
12
|
-
/**
|
|
13
|
-
* MultiDropdownDisplay - Displays multiselect values as multiple badges
|
|
14
|
-
*
|
|
15
|
-
* @version 0.0.1
|
|
16
|
-
* @since 0.0.1
|
|
17
|
-
* @author AMBROISE PARK Consulting
|
|
18
|
-
*/
|
|
19
|
-
export const MultiDropdownDisplay = ({ config, value, t, className, }) => {
|
|
20
|
-
if (!value || !Array.isArray(value) || value.length === 0) {
|
|
21
|
-
return (_jsx(Text, { as: "span", variant: "muted", className: className, children: "-" }));
|
|
22
|
-
}
|
|
23
|
-
return (_jsx(Stack, { direction: "row", wrap: "wrap", gap: "medium", className: className, children: value.map((item, index) => (_jsx(Badge, { variant: BADGE_VARIANT.OUTLINE, children: String(item) }, index))) }));
|
|
24
|
-
};
|
|
25
|
-
export default MultiDropdownDisplay;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { EntityField } from '@donotdev/core';
|
|
2
|
-
import type { ComponentType } from 'react';
|
|
3
|
-
export interface MultiInputTextFieldDisplayProps {
|
|
4
|
-
/** Field configuration */
|
|
5
|
-
config: EntityField<'array'>;
|
|
6
|
-
/** Value to display */
|
|
7
|
-
value: any[];
|
|
8
|
-
/** Translation function */
|
|
9
|
-
t: (key: string, options?: Record<string, any>) => string;
|
|
10
|
-
/** Additional CSS classes */
|
|
11
|
-
className?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* MultiInputTextFieldDisplay - Displays array values as multiple badges
|
|
15
|
-
*
|
|
16
|
-
* @version 0.0.1
|
|
17
|
-
* @since 0.0.1
|
|
18
|
-
* @author AMBROISE PARK Consulting
|
|
19
|
-
*/
|
|
20
|
-
export declare const MultiInputTextFieldDisplay: ComponentType<MultiInputTextFieldDisplayProps>;
|
|
21
|
-
export default MultiInputTextFieldDisplay;
|
|
22
|
-
//# sourceMappingURL=MultiInputTextFieldDisplay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MultiInputTextFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/crud/components/fields/display/MultiInputTextFieldDisplay.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,WAAW,+BAA+B;IAC9C,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,uBAAuB;IACvB,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,2BAA2B;IAC3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,EAAE,aAAa,CACpD,+BAA+B,CAmBhC,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// packages/ui/src/crud/components/fields/display/MultiInputTextFieldDisplay.tsx
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview MultiInputTextFieldDisplay component
|
|
5
|
-
* @description Displays array values as multiple badges
|
|
6
|
-
*
|
|
7
|
-
* @version 0.0.1
|
|
8
|
-
* @since 0.0.1
|
|
9
|
-
* @author AMBROISE PARK Consulting
|
|
10
|
-
*/
|
|
11
|
-
import { Badge, BADGE_VARIANT, Text, Stack } from '@donotdev/components';
|
|
12
|
-
/**
|
|
13
|
-
* MultiInputTextFieldDisplay - Displays array values as multiple badges
|
|
14
|
-
*
|
|
15
|
-
* @version 0.0.1
|
|
16
|
-
* @since 0.0.1
|
|
17
|
-
* @author AMBROISE PARK Consulting
|
|
18
|
-
*/
|
|
19
|
-
export const MultiInputTextFieldDisplay = ({ config, value, t, className }) => {
|
|
20
|
-
if (!value || !Array.isArray(value) || value.length === 0) {
|
|
21
|
-
return (_jsx(Text, { as: "span", variant: "muted", className: className, children: "-" }));
|
|
22
|
-
}
|
|
23
|
-
return (_jsx(Stack, { direction: "row", wrap: "wrap", gap: "medium", className: className, children: value.map((item, index) => (_jsx(Badge, { variant: BADGE_VARIANT.OUTLINE, children: String(item) }, index))) }));
|
|
24
|
-
};
|
|
25
|
-
export default MultiInputTextFieldDisplay;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { EntityField } from '@donotdev/core';
|
|
2
|
-
import type { ComponentType } from 'react';
|
|
3
|
-
export interface NumberFieldDisplayProps {
|
|
4
|
-
/** Field configuration */
|
|
5
|
-
config: EntityField<'number' | 'range'>;
|
|
6
|
-
/** Value to display */
|
|
7
|
-
value: number;
|
|
8
|
-
/** Translation function */
|
|
9
|
-
t: (key: string, options?: Record<string, any>) => string;
|
|
10
|
-
/** Additional CSS classes */
|
|
11
|
-
className?: string;
|
|
12
|
-
/** Whether the field is loading */
|
|
13
|
-
loading?: boolean;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* NumberFieldDisplay - Displays number values in read-only mode
|
|
17
|
-
*
|
|
18
|
-
* @version 0.0.1
|
|
19
|
-
* @since 0.0.1
|
|
20
|
-
* @author AMBROISE PARK Consulting
|
|
21
|
-
*/
|
|
22
|
-
export declare const NumberFieldDisplay: ComponentType<NumberFieldDisplayProps>;
|
|
23
|
-
export default NumberFieldDisplay;
|
|
24
|
-
//# sourceMappingURL=NumberFieldDisplay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NumberFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/crud/components/fields/display/NumberFieldDisplay.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,WAAW,uBAAuB;IACtC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,QAAQ,GAAG,OAAO,CAAC,CAAC;IACxC,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,aAAa,CAAC,uBAAuB,CAwBrE,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// packages/ui/src/crud/components/fields/display/NumberFieldDisplay.tsx
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview NumberFieldDisplay component
|
|
5
|
-
* @description Displays number values in read-only mode
|
|
6
|
-
*
|
|
7
|
-
* @version 0.0.1
|
|
8
|
-
* @since 0.0.1
|
|
9
|
-
* @author AMBROISE PARK Consulting
|
|
10
|
-
*/
|
|
11
|
-
import { Text, Spinner } from '@donotdev/components';
|
|
12
|
-
/**
|
|
13
|
-
* NumberFieldDisplay - Displays number values in read-only mode
|
|
14
|
-
*
|
|
15
|
-
* @version 0.0.1
|
|
16
|
-
* @since 0.0.1
|
|
17
|
-
* @author AMBROISE PARK Consulting
|
|
18
|
-
*/
|
|
19
|
-
export const NumberFieldDisplay = ({ config, value, t, className, loading = false, }) => {
|
|
20
|
-
if (loading) {
|
|
21
|
-
return _jsx(Spinner, { className: className });
|
|
22
|
-
}
|
|
23
|
-
if (value === null || value === undefined) {
|
|
24
|
-
return (_jsx(Text, { as: "span", variant: "muted", className: className, children: "-" }));
|
|
25
|
-
}
|
|
26
|
-
return (_jsx(Text, { as: "span", className: `font-mono ${className || ''}`, children: value.toLocaleString() }));
|
|
27
|
-
};
|
|
28
|
-
export default NumberFieldDisplay;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { EntityField } from '@donotdev/core';
|
|
2
|
-
import type { ComponentType } from 'react';
|
|
3
|
-
export interface PasswordFieldDisplayProps {
|
|
4
|
-
/** Field configuration */
|
|
5
|
-
config: EntityField<'password'>;
|
|
6
|
-
/** Value to display */
|
|
7
|
-
value: string;
|
|
8
|
-
/** Translation function */
|
|
9
|
-
t: (key: string, options?: Record<string, any>) => string;
|
|
10
|
-
/** Additional CSS classes */
|
|
11
|
-
className?: string;
|
|
12
|
-
/** Whether the field is loading */
|
|
13
|
-
loading?: boolean;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* PasswordFieldDisplay - Displays password values with show/hide toggle and copy functionality
|
|
17
|
-
*
|
|
18
|
-
* @version 0.0.1
|
|
19
|
-
* @since 0.0.1
|
|
20
|
-
* @author AMBROISE PARK Consulting
|
|
21
|
-
*/
|
|
22
|
-
export declare const PasswordFieldDisplay: ComponentType<PasswordFieldDisplayProps>;
|
|
23
|
-
export default PasswordFieldDisplay;
|
|
24
|
-
//# sourceMappingURL=PasswordFieldDisplay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/crud/components/fields/display/PasswordFieldDisplay.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,WAAW,yBAAyB;IACxC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IAChC,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAE,aAAa,CAAC,yBAAyB,CAwCzE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// packages/ui/src/crud/components/fields/display/PasswordFieldDisplay.tsx
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview PasswordFieldDisplay component
|
|
5
|
-
* @description Displays password values with show/hide toggle and copy functionality
|
|
6
|
-
*
|
|
7
|
-
* @version 0.0.1
|
|
8
|
-
* @since 0.0.1
|
|
9
|
-
* @author AMBROISE PARK Consulting
|
|
10
|
-
*/
|
|
11
|
-
import { Eye, EyeOff } from 'lucide-react';
|
|
12
|
-
import { useState } from 'react';
|
|
13
|
-
import { Skeleton, Button, CopyToClipboard, Stack } from '@donotdev/components';
|
|
14
|
-
/**
|
|
15
|
-
* PasswordFieldDisplay - Displays password values with show/hide toggle and copy functionality
|
|
16
|
-
*
|
|
17
|
-
* @version 0.0.1
|
|
18
|
-
* @since 0.0.1
|
|
19
|
-
* @author AMBROISE PARK Consulting
|
|
20
|
-
*/
|
|
21
|
-
export const PasswordFieldDisplay = ({ config, value, t, className, loading = false, }) => {
|
|
22
|
-
const [isVisible, setIsVisible] = useState(false);
|
|
23
|
-
if (loading) {
|
|
24
|
-
return _jsx(Skeleton, { className: className });
|
|
25
|
-
}
|
|
26
|
-
if (!value) {
|
|
27
|
-
return _jsx("div", { style: { color: 'var(--muted-foreground)' }, children: "-" });
|
|
28
|
-
}
|
|
29
|
-
return (_jsxs(Stack, { direction: "row", align: "center", gap: "medium", className: className, children: [_jsx("span", { style: { fontFamily: 'monospace' }, children: isVisible ? value : '••••••••' }), _jsxs(Stack, { direction: "row", align: "center", gap: "tight", children: [_jsx(Button, { type: "button", onClick: () => setIsVisible(!isVisible), "aria-label": isVisible ? 'Hide password' : 'Show password', children: isVisible ? _jsx(EyeOff, {}) : _jsx(Eye, {}) }), _jsx(CopyToClipboard, { text: value, tooltipText: t('copyToClipboard') || 'Copy to clipboard', copiedTooltipText: t('copied') || 'Copied!', ariaLabel: t('copyPassword') || 'Copy password' })] })] }));
|
|
30
|
-
};
|
|
31
|
-
export default PasswordFieldDisplay;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { EntityField } from '@donotdev/core';
|
|
2
|
-
import type { ComponentType } from 'react';
|
|
3
|
-
export interface PhoneNumberDisplayProps {
|
|
4
|
-
/** Field configuration */
|
|
5
|
-
config: EntityField<'tel'>;
|
|
6
|
-
/** Value to display */
|
|
7
|
-
value: string;
|
|
8
|
-
/** Translation function */
|
|
9
|
-
t: (key: string, options?: Record<string, any>) => string;
|
|
10
|
-
/** Additional CSS classes */
|
|
11
|
-
className?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* PhoneNumberDisplay - Displays phone number values as clickable links
|
|
15
|
-
*
|
|
16
|
-
* @version 0.0.1
|
|
17
|
-
* @since 0.0.1
|
|
18
|
-
* @author AMBROISE PARK Consulting
|
|
19
|
-
*/
|
|
20
|
-
export declare const PhoneNumberDisplay: ComponentType<PhoneNumberDisplayProps>;
|
|
21
|
-
export default PhoneNumberDisplay;
|
|
22
|
-
//# sourceMappingURL=PhoneNumberDisplay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PhoneNumberDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/crud/components/fields/display/PhoneNumberDisplay.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,WAAW,uBAAuB;IACtC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAC3B,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,aAAa,CAAC,uBAAuB,CA0BrE,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// packages/ui/src/crud/components/fields/display/PhoneNumberDisplay.tsx
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview PhoneNumberDisplay component
|
|
5
|
-
* @description Displays phone number values as clickable links
|
|
6
|
-
*
|
|
7
|
-
* @version 0.0.1
|
|
8
|
-
* @since 0.0.1
|
|
9
|
-
* @author AMBROISE PARK Consulting
|
|
10
|
-
*/
|
|
11
|
-
import { Text } from '@donotdev/components';
|
|
12
|
-
/**
|
|
13
|
-
* PhoneNumberDisplay - Displays phone number values as clickable links
|
|
14
|
-
*
|
|
15
|
-
* @version 0.0.1
|
|
16
|
-
* @since 0.0.1
|
|
17
|
-
* @author AMBROISE PARK Consulting
|
|
18
|
-
*/
|
|
19
|
-
export const PhoneNumberDisplay = ({ config, value, t, className, }) => {
|
|
20
|
-
if (!value) {
|
|
21
|
-
return (_jsx(Text, { as: "span", variant: "muted", className: className, children: "-" }));
|
|
22
|
-
}
|
|
23
|
-
return (_jsx("a", { href: `tel:${value}`, className: className || '', style: { color: 'var(--primary)', textDecoration: 'none' }, onMouseEnter: (e) => (e.currentTarget.style.textDecoration = 'underline'), onMouseLeave: (e) => (e.currentTarget.style.textDecoration = 'none'), "aria-label": t('common.callNumber', { number: value }), children: value }));
|
|
24
|
-
};
|
|
25
|
-
export default PhoneNumberDisplay;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { EntityField } from '@donotdev/core';
|
|
2
|
-
import type { ComponentType } from 'react';
|
|
3
|
-
export interface RadioFieldDisplayProps {
|
|
4
|
-
/** Field configuration */
|
|
5
|
-
config: EntityField<'radio'>;
|
|
6
|
-
/** Value to display */
|
|
7
|
-
value: string;
|
|
8
|
-
/** Translation function */
|
|
9
|
-
t: (key: string, options?: Record<string, any>) => string;
|
|
10
|
-
/** Additional CSS classes */
|
|
11
|
-
className?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* RadioFieldDisplay - Displays radio values as badges
|
|
15
|
-
*
|
|
16
|
-
* @version 0.0.1
|
|
17
|
-
* @since 0.0.1
|
|
18
|
-
* @author AMBROISE PARK Consulting
|
|
19
|
-
*/
|
|
20
|
-
export declare const RadioFieldDisplay: ComponentType<RadioFieldDisplayProps>;
|
|
21
|
-
export default RadioFieldDisplay;
|
|
22
|
-
//# sourceMappingURL=RadioFieldDisplay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RadioFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/crud/components/fields/display/RadioFieldDisplay.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,WAAW,sBAAsB;IACrC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,aAAa,CAAC,sBAAsB,CAmBnE,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// packages/ui/src/crud/components/fields/display/RadioFieldDisplay.tsx
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview RadioFieldDisplay component
|
|
5
|
-
* @description Displays radio values as badges
|
|
6
|
-
*
|
|
7
|
-
* @version 0.0.1
|
|
8
|
-
* @since 0.0.1
|
|
9
|
-
* @author AMBROISE PARK Consulting
|
|
10
|
-
*/
|
|
11
|
-
import { Badge, BADGE_VARIANT, Text } from '@donotdev/components';
|
|
12
|
-
/**
|
|
13
|
-
* RadioFieldDisplay - Displays radio values as badges
|
|
14
|
-
*
|
|
15
|
-
* @version 0.0.1
|
|
16
|
-
* @since 0.0.1
|
|
17
|
-
* @author AMBROISE PARK Consulting
|
|
18
|
-
*/
|
|
19
|
-
export const RadioFieldDisplay = ({ config, value, t, className, }) => {
|
|
20
|
-
if (!value) {
|
|
21
|
-
return (_jsx(Text, { as: "span", variant: "muted", className: className, children: "-" }));
|
|
22
|
-
}
|
|
23
|
-
return (_jsx(Badge, { variant: BADGE_VARIANT.OUTLINE, className: className, children: value }));
|
|
24
|
-
};
|
|
25
|
-
export default RadioFieldDisplay;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { EntityField } from '@donotdev/core';
|
|
2
|
-
import type { ComponentType } from 'react';
|
|
3
|
-
export interface RangeFieldDisplayProps {
|
|
4
|
-
/** Field configuration */
|
|
5
|
-
config: EntityField<'range'>;
|
|
6
|
-
/** Value to display */
|
|
7
|
-
value: number;
|
|
8
|
-
/** Translation function */
|
|
9
|
-
t: (key: string, options?: Record<string, any>) => string;
|
|
10
|
-
/** Additional CSS classes */
|
|
11
|
-
className?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* RangeFieldDisplay - Displays range values in read-only mode
|
|
15
|
-
*
|
|
16
|
-
* @version 0.0.1
|
|
17
|
-
* @since 0.0.1
|
|
18
|
-
* @author AMBROISE PARK Consulting
|
|
19
|
-
*/
|
|
20
|
-
export declare const RangeFieldDisplay: ComponentType<RangeFieldDisplayProps>;
|
|
21
|
-
export default RangeFieldDisplay;
|
|
22
|
-
//# sourceMappingURL=RangeFieldDisplay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RangeFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/crud/components/fields/display/RangeFieldDisplay.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,WAAW,sBAAsB;IACrC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,aAAa,CAAC,sBAAsB,CAmBnE,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// packages/ui/src/crud/components/fields/display/RangeFieldDisplay.tsx
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview RangeFieldDisplay component
|
|
5
|
-
* @description Displays range values in read-only mode
|
|
6
|
-
*
|
|
7
|
-
* @version 0.0.1
|
|
8
|
-
* @since 0.0.1
|
|
9
|
-
* @author AMBROISE PARK Consulting
|
|
10
|
-
*/
|
|
11
|
-
import { Text } from '@donotdev/components';
|
|
12
|
-
/**
|
|
13
|
-
* RangeFieldDisplay - Displays range values in read-only mode
|
|
14
|
-
*
|
|
15
|
-
* @version 0.0.1
|
|
16
|
-
* @since 0.0.1
|
|
17
|
-
* @author AMBROISE PARK Consulting
|
|
18
|
-
*/
|
|
19
|
-
export const RangeFieldDisplay = ({ config, value, t, className, }) => {
|
|
20
|
-
if (value === null || value === undefined) {
|
|
21
|
-
return (_jsx(Text, { as: "span", variant: "muted", className: className, children: "-" }));
|
|
22
|
-
}
|
|
23
|
-
return (_jsx(Text, { as: "span", className: `font-mono ${className || ''}`, children: value }));
|
|
24
|
-
};
|
|
25
|
-
export default RangeFieldDisplay;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { EntityField } from '@donotdev/core';
|
|
2
|
-
import type { ComponentType } from 'react';
|
|
3
|
-
export interface ReferenceFieldDisplayProps {
|
|
4
|
-
/** Field configuration */
|
|
5
|
-
config: EntityField<'reference'>;
|
|
6
|
-
/** Value to display */
|
|
7
|
-
value: any;
|
|
8
|
-
/** Translation function */
|
|
9
|
-
t: (key: string, options?: Record<string, any>) => string;
|
|
10
|
-
/** Additional CSS classes */
|
|
11
|
-
className?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* ReferenceFieldDisplay - Displays reference values as badges
|
|
15
|
-
*
|
|
16
|
-
* @version 0.0.1
|
|
17
|
-
* @since 0.0.1
|
|
18
|
-
* @author AMBROISE PARK Consulting
|
|
19
|
-
*/
|
|
20
|
-
export declare const ReferenceFieldDisplay: ComponentType<ReferenceFieldDisplayProps>;
|
|
21
|
-
export default ReferenceFieldDisplay;
|
|
22
|
-
//# sourceMappingURL=ReferenceFieldDisplay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ReferenceFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/crud/components/fields/display/ReferenceFieldDisplay.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,WAAW,0BAA0B;IACzC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IACjC,uBAAuB;IACvB,KAAK,EAAE,GAAG,CAAC;IACX,2BAA2B;IAC3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAC/C,0BAA0B,CAiB3B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// packages/ui/src/crud/components/fields/display/ReferenceFieldDisplay.tsx
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview ReferenceFieldDisplay component
|
|
5
|
-
* @description Displays reference values as badges
|
|
6
|
-
*
|
|
7
|
-
* @version 0.0.1
|
|
8
|
-
* @since 0.0.1
|
|
9
|
-
* @author AMBROISE PARK Consulting
|
|
10
|
-
*/
|
|
11
|
-
import { Badge, BADGE_VARIANT, Text } from '@donotdev/components';
|
|
12
|
-
/**
|
|
13
|
-
* ReferenceFieldDisplay - Displays reference values as badges
|
|
14
|
-
*
|
|
15
|
-
* @version 0.0.1
|
|
16
|
-
* @since 0.0.1
|
|
17
|
-
* @author AMBROISE PARK Consulting
|
|
18
|
-
*/
|
|
19
|
-
export const ReferenceFieldDisplay = ({ config, value, t, className }) => {
|
|
20
|
-
if (!value) {
|
|
21
|
-
return (_jsx(Text, { as: "span", variant: "muted", className: className, children: "-" }));
|
|
22
|
-
}
|
|
23
|
-
const displayValue = value.displayName || value.name || value.id || value;
|
|
24
|
-
return (_jsx(Badge, { variant: BADGE_VARIANT.OUTLINE, className: className, children: String(displayValue) }));
|
|
25
|
-
};
|
|
26
|
-
export default ReferenceFieldDisplay;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { EntityField } from '@donotdev/core';
|
|
2
|
-
import type { ComponentType } from 'react';
|
|
3
|
-
export interface RichTextDisplayProps {
|
|
4
|
-
/** Field configuration */
|
|
5
|
-
config: EntityField<'richtext'>;
|
|
6
|
-
/** HTML value to display */
|
|
7
|
-
value: string;
|
|
8
|
-
/** Translation function */
|
|
9
|
-
t: (key: string, options?: Record<string, any>) => string;
|
|
10
|
-
/** Additional CSS classes */
|
|
11
|
-
className?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* RichTextDisplay - Displays rich text/HTML content in read-only mode
|
|
15
|
-
*
|
|
16
|
-
* Renders HTML with styling that matches Tiptap editor output.
|
|
17
|
-
* Safe to use with HTML from Tiptap (sanitized by Tiptap).
|
|
18
|
-
*
|
|
19
|
-
* @version 0.0.1
|
|
20
|
-
* @since 0.0.1
|
|
21
|
-
* @author AMBROISE PARK Consulting
|
|
22
|
-
*/
|
|
23
|
-
export declare const RichTextDisplay: ComponentType<RichTextDisplayProps>;
|
|
24
|
-
export default RichTextDisplay;
|
|
25
|
-
//# sourceMappingURL=RichTextDisplay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/crud/components/fields/display/RichTextDisplay.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,WAAW,oBAAoB;IACnC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IAChC,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,EAAE,aAAa,CAAC,oBAAoB,CAmG/D,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// packages/ui/src/crud/components/fields/display/RichTextDisplay.tsx
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview RichTextDisplay component
|
|
5
|
-
* @description Displays rich text/HTML content in read-only mode
|
|
6
|
-
*
|
|
7
|
-
* Renders HTML content from Tiptap editor with proper styling.
|
|
8
|
-
* Uses dangerouslySetInnerHTML for lightweight rendering (no parser needed).
|
|
9
|
-
*
|
|
10
|
-
* @version 0.0.1
|
|
11
|
-
* @since 0.0.1
|
|
12
|
-
* @author AMBROISE PARK Consulting
|
|
13
|
-
*/
|
|
14
|
-
import { Text } from '@donotdev/components';
|
|
15
|
-
/**
|
|
16
|
-
* RichTextDisplay - Displays rich text/HTML content in read-only mode
|
|
17
|
-
*
|
|
18
|
-
* Renders HTML with styling that matches Tiptap editor output.
|
|
19
|
-
* Safe to use with HTML from Tiptap (sanitized by Tiptap).
|
|
20
|
-
*
|
|
21
|
-
* @version 0.0.1
|
|
22
|
-
* @since 0.0.1
|
|
23
|
-
* @author AMBROISE PARK Consulting
|
|
24
|
-
*/
|
|
25
|
-
export const RichTextDisplay = ({ config, value, t, className, }) => {
|
|
26
|
-
if (!value || value.trim() === '') {
|
|
27
|
-
return (_jsx(Text, { as: "span", variant: "muted", className: className, children: "-" }));
|
|
28
|
-
}
|
|
29
|
-
return (_jsxs("div", { className: className, style: {
|
|
30
|
-
padding: 'var(--gap-md)',
|
|
31
|
-
backgroundColor: 'var(--muted)',
|
|
32
|
-
borderRadius: 'var(--radius-md)',
|
|
33
|
-
border: '1px solid var(--border)',
|
|
34
|
-
minHeight: '38px',
|
|
35
|
-
}, children: [_jsx("div", {
|
|
36
|
-
// Safe to use: HTML comes from Tiptap which sanitizes content
|
|
37
|
-
dangerouslySetInnerHTML: { __html: value }, style: {
|
|
38
|
-
// Match Tiptap editor styling
|
|
39
|
-
outline: 'none',
|
|
40
|
-
fontSize: 'var(--font-size-base)',
|
|
41
|
-
lineHeight: '1.6',
|
|
42
|
-
}, className: "prose prose-sm max-w-none" }), _jsx("style", { children: `
|
|
43
|
-
/* Match Tiptap ProseMirror styling */
|
|
44
|
-
.prose p {
|
|
45
|
-
margin: 0.5em 0;
|
|
46
|
-
}
|
|
47
|
-
.prose p:first-child {
|
|
48
|
-
margin-top: 0;
|
|
49
|
-
}
|
|
50
|
-
.prose p:last-child {
|
|
51
|
-
margin-bottom: 0;
|
|
52
|
-
}
|
|
53
|
-
.prose h1 {
|
|
54
|
-
font-size: var(--font-size-2xl);
|
|
55
|
-
font-weight: 600;
|
|
56
|
-
margin: 0.5em 0;
|
|
57
|
-
}
|
|
58
|
-
.prose h2 {
|
|
59
|
-
font-size: var(--font-size-xl);
|
|
60
|
-
font-weight: 600;
|
|
61
|
-
margin: 0.5em 0;
|
|
62
|
-
}
|
|
63
|
-
.prose h3 {
|
|
64
|
-
font-size: var(--font-size-lg);
|
|
65
|
-
font-weight: 600;
|
|
66
|
-
margin: 0.5em 0;
|
|
67
|
-
}
|
|
68
|
-
.prose ul, .prose ol {
|
|
69
|
-
padding-left: 1.5em;
|
|
70
|
-
margin: 0.5em 0;
|
|
71
|
-
}
|
|
72
|
-
.prose li {
|
|
73
|
-
margin: 0.25em 0;
|
|
74
|
-
}
|
|
75
|
-
.prose strong {
|
|
76
|
-
font-weight: 600;
|
|
77
|
-
}
|
|
78
|
-
.prose em {
|
|
79
|
-
font-style: italic;
|
|
80
|
-
}
|
|
81
|
-
.prose code {
|
|
82
|
-
background: var(--muted);
|
|
83
|
-
padding: 0.2em 0.4em;
|
|
84
|
-
border-radius: var(--radius-sm);
|
|
85
|
-
font-family: monospace;
|
|
86
|
-
font-size: 0.9em;
|
|
87
|
-
}
|
|
88
|
-
.prose blockquote {
|
|
89
|
-
border-left: 3px solid var(--border);
|
|
90
|
-
padding-left: 1em;
|
|
91
|
-
margin: 0.5em 0;
|
|
92
|
-
color: var(--muted-foreground);
|
|
93
|
-
font-style: italic;
|
|
94
|
-
}
|
|
95
|
-
.prose a {
|
|
96
|
-
color: var(--primary);
|
|
97
|
-
text-decoration: underline;
|
|
98
|
-
}
|
|
99
|
-
.prose a:hover {
|
|
100
|
-
color: var(--primary-hover);
|
|
101
|
-
}
|
|
102
|
-
` })] }));
|
|
103
|
-
};
|
|
104
|
-
export default RichTextDisplay;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { EntityField } from '@donotdev/core';
|
|
2
|
-
import type { ComponentType } from 'react';
|
|
3
|
-
export interface TextAreaDisplayProps {
|
|
4
|
-
/** Field configuration */
|
|
5
|
-
config: EntityField<'textarea'>;
|
|
6
|
-
/** Value to display */
|
|
7
|
-
value: string;
|
|
8
|
-
/** Translation function */
|
|
9
|
-
t: (key: string, options?: Record<string, any>) => string;
|
|
10
|
-
/** Additional CSS classes */
|
|
11
|
-
className?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* TextAreaDisplay - Displays textarea values in read-only mode
|
|
15
|
-
*
|
|
16
|
-
* @version 0.0.1
|
|
17
|
-
* @since 0.0.1
|
|
18
|
-
* @author AMBROISE PARK Consulting
|
|
19
|
-
*/
|
|
20
|
-
export declare const TextAreaDisplay: ComponentType<TextAreaDisplayProps>;
|
|
21
|
-
export default TextAreaDisplay;
|
|
22
|
-
//# sourceMappingURL=TextAreaDisplay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TextAreaDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/crud/components/fields/display/TextAreaDisplay.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,WAAW,oBAAoB;IACnC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IAChC,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;IAC1D,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,aAAa,CAAC,oBAAoB,CAuB/D,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// packages/ui/src/crud/components/fields/display/TextAreaDisplay.tsx
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview TextAreaDisplay component
|
|
5
|
-
* @description Displays textarea values in read-only mode
|
|
6
|
-
*
|
|
7
|
-
* @version 0.0.1
|
|
8
|
-
* @since 0.0.1
|
|
9
|
-
* @author AMBROISE PARK Consulting
|
|
10
|
-
*/
|
|
11
|
-
import { Text } from '@donotdev/components';
|
|
12
|
-
/**
|
|
13
|
-
* TextAreaDisplay - Displays textarea values in read-only mode
|
|
14
|
-
*
|
|
15
|
-
* @version 0.0.1
|
|
16
|
-
* @since 0.0.1
|
|
17
|
-
* @author AMBROISE PARK Consulting
|
|
18
|
-
*/
|
|
19
|
-
export const TextAreaDisplay = ({ config, value, t, className, }) => {
|
|
20
|
-
if (!value) {
|
|
21
|
-
return (_jsx(Text, { as: "span", variant: "muted", className: className, children: "-" }));
|
|
22
|
-
}
|
|
23
|
-
return (_jsx(Text, { as: "div", level: "small", className: `whitespace-pre-wrap ${className || ''}`, children: value }));
|
|
24
|
-
};
|
|
25
|
-
export default TextAreaDisplay;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { EntityField } from '@donotdev/core';
|
|
2
|
-
import type { ComponentType } from 'react';
|
|
3
|
-
export interface TextFieldDisplayProps {
|
|
4
|
-
/** Field configuration */
|
|
5
|
-
config: EntityField<'text' | 'email' | 'month' | 'week' | 'time'>;
|
|
6
|
-
/** Value to display */
|
|
7
|
-
value: string;
|
|
8
|
-
/** Translation function */
|
|
9
|
-
t: (key: string, options?: Record<string, any>) => string;
|
|
10
|
-
/** Additional CSS classes */
|
|
11
|
-
className?: string;
|
|
12
|
-
/** Whether the field is loading */
|
|
13
|
-
loading?: boolean;
|
|
14
|
-
/** Show copy button */
|
|
15
|
-
showCopy?: boolean;
|
|
16
|
-
/** Show as badge */
|
|
17
|
-
asBadge?: boolean;
|
|
18
|
-
/** Truncate long text */
|
|
19
|
-
truncate?: boolean;
|
|
20
|
-
/** Maximum length before truncation */
|
|
21
|
-
maxLength?: number;
|
|
22
|
-
/** Show field label */
|
|
23
|
-
showLabel?: boolean;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Enhanced TextFieldDisplay with modern UX features
|
|
27
|
-
*
|
|
28
|
-
* Features:
|
|
29
|
-
* - Smart formatting based on field type
|
|
30
|
-
* - Copy to clipboard functionality
|
|
31
|
-
* - Truncation with tooltips
|
|
32
|
-
* - Badge display option
|
|
33
|
-
* - Loading states
|
|
34
|
-
* - Responsive design
|
|
35
|
-
*
|
|
36
|
-
* @version 0.0.1
|
|
37
|
-
* @since 0.0.1
|
|
38
|
-
* @author AMBROISE PARK Consulting
|
|
39
|
-
*/
|
|
40
|
-
export declare const TextFieldDisplay: ComponentType<TextFieldDisplayProps>;
|
|
41
|
-
export default TextFieldDisplay;
|
|
42
|
-
//# sourceMappingURL=TextFieldDisplay.d.ts.map
|