@donotdev/ui 0.0.10 → 0.0.12
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/components/layout/GameContainer.d.ts +3 -1
- package/dist/components/layout/GameContainer.d.ts.map +1 -1
- package/dist/components/layout/GameContainer.js +3 -2
- package/dist/components/layout/PageContainer.d.ts +1 -1
- package/dist/components/layout/PageContainer.d.ts.map +1 -1
- 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 +286 -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 +203 -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 +287 -123
- 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/internal/layout/config/presets/game.d.ts.map +1 -1
- package/dist/internal/layout/config/presets/game.js +10 -5
- package/dist/styles/index.css +287 -123
- package/package.json +13 -13
- 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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ImageFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/crud/components/fields/display/ImageFieldDisplay.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,mCAAmC;IACnC,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,iBAAiB;IACjB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,aAAa,CAAC,sBAAsB,CAsCnE,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// packages/ui/src/crud/components/fields/display/ImageFieldDisplay.tsx
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview ImageFieldDisplay component
|
|
5
|
-
* @description Displays image values as avatars
|
|
6
|
-
*
|
|
7
|
-
* @version 0.0.1
|
|
8
|
-
* @since 0.0.1
|
|
9
|
-
* @author AMBROISE PARK Consulting
|
|
10
|
-
*/
|
|
11
|
-
import { Avatar, Text } from '@donotdev/components';
|
|
12
|
-
/**
|
|
13
|
-
* ImageFieldDisplay - Displays image values as avatars
|
|
14
|
-
*
|
|
15
|
-
* @version 0.0.1
|
|
16
|
-
* @since 0.0.1
|
|
17
|
-
* @author AMBROISE PARK Consulting
|
|
18
|
-
*/
|
|
19
|
-
export const ImageFieldDisplay = ({ config, value, t, className, size = 'md', }) => {
|
|
20
|
-
if (!value) {
|
|
21
|
-
return (_jsx(Text, { as: "span", variant: "muted", className: className, children: "-" }));
|
|
22
|
-
}
|
|
23
|
-
const sizeClasses = {
|
|
24
|
-
sm: 'size-touch',
|
|
25
|
-
md: 'size-touch',
|
|
26
|
-
lg: 'h-16 w-16',
|
|
27
|
-
};
|
|
28
|
-
const getInitials = (label) => {
|
|
29
|
-
return label
|
|
30
|
-
.split(' ')
|
|
31
|
-
.map((word) => word.charAt(0))
|
|
32
|
-
.slice(0, 2)
|
|
33
|
-
.join('')
|
|
34
|
-
.toUpperCase();
|
|
35
|
-
};
|
|
36
|
-
return (_jsx(Avatar, { src: value, alt: config.label || 'Image', fallback: getInitials(config.label || 'IMG'), className: `${sizeClasses[size]} ${className || ''}` }));
|
|
37
|
-
};
|
|
38
|
-
export default ImageFieldDisplay;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { EntityField } from '@donotdev/core';
|
|
2
|
-
import type { ComponentType } from 'react';
|
|
3
|
-
export interface LinkFieldDisplayProps {
|
|
4
|
-
/** Field configuration */
|
|
5
|
-
config: EntityField<'url' | 'email' | '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
|
-
* LinkFieldDisplay - Displays URL/email/tel 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 LinkFieldDisplay: ComponentType<LinkFieldDisplayProps>;
|
|
21
|
-
export default LinkFieldDisplay;
|
|
22
|
-
//# sourceMappingURL=LinkFieldDisplay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LinkFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/crud/components/fields/display/LinkFieldDisplay.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,WAAW,qBAAqB;IACpC,0BAA0B;IAC1B,MAAM,EAAE,WAAW,CAAC,KAAK,GAAG,OAAO,GAAG,KAAK,CAAC,CAAC;IAC7C,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,gBAAgB,EAAE,aAAa,CAAC,qBAAqB,CAkDjE,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// packages/ui/src/crud/components/fields/display/LinkFieldDisplay.tsx
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview LinkFieldDisplay component
|
|
5
|
-
* @description Displays URL/email/tel 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
|
-
* LinkFieldDisplay - Displays URL/email/tel values as clickable links
|
|
14
|
-
*
|
|
15
|
-
* @version 0.0.1
|
|
16
|
-
* @since 0.0.1
|
|
17
|
-
* @author AMBROISE PARK Consulting
|
|
18
|
-
*/
|
|
19
|
-
export const LinkFieldDisplay = ({ config, value, t, className, }) => {
|
|
20
|
-
if (!value) {
|
|
21
|
-
return (_jsx(Text, { as: "span", variant: "muted", className: className, children: "-" }));
|
|
22
|
-
}
|
|
23
|
-
const getLinkProps = () => {
|
|
24
|
-
switch (config.type) {
|
|
25
|
-
case 'email':
|
|
26
|
-
return {
|
|
27
|
-
href: `mailto:${value}`,
|
|
28
|
-
'aria-label': t('common.sendEmailTo', { email: value }),
|
|
29
|
-
};
|
|
30
|
-
case 'tel':
|
|
31
|
-
return {
|
|
32
|
-
href: `tel:${value}`,
|
|
33
|
-
'aria-label': t('common.callNumber', { number: value }),
|
|
34
|
-
};
|
|
35
|
-
case 'url':
|
|
36
|
-
default:
|
|
37
|
-
return {
|
|
38
|
-
href: value,
|
|
39
|
-
target: '_blank',
|
|
40
|
-
rel: 'noopener noreferrer',
|
|
41
|
-
'aria-label': t('common.openLink'),
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
const linkProps = getLinkProps();
|
|
46
|
-
return (_jsx("a", { ...linkProps, className: className || '', style: { color: 'var(--primary)', textDecoration: 'none' }, onMouseEnter: (e) => (e.currentTarget.style.textDecoration = 'underline'), onMouseLeave: (e) => (e.currentTarget.style.textDecoration = 'none'), children: value }));
|
|
47
|
-
};
|
|
48
|
-
export default LinkFieldDisplay;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { EntityField } from '@donotdev/core';
|
|
2
|
-
import type { ComponentType } from 'react';
|
|
3
|
-
export interface MapFieldDisplayProps {
|
|
4
|
-
/** Field configuration */
|
|
5
|
-
config: EntityField<'map'>;
|
|
6
|
-
/** Value to display */
|
|
7
|
-
value: {
|
|
8
|
-
lat: number;
|
|
9
|
-
lng: number;
|
|
10
|
-
} | null;
|
|
11
|
-
/** Translation function */
|
|
12
|
-
t: (key: string, options?: Record<string, any>) => string;
|
|
13
|
-
/** Additional CSS classes */
|
|
14
|
-
className?: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* MapFieldDisplay - Displays map values in read-only mode
|
|
18
|
-
*
|
|
19
|
-
* @version 0.0.1
|
|
20
|
-
* @since 0.0.1
|
|
21
|
-
* @author AMBROISE PARK Consulting
|
|
22
|
-
*/
|
|
23
|
-
export declare const MapFieldDisplay: ComponentType<MapFieldDisplayProps>;
|
|
24
|
-
export default MapFieldDisplay;
|
|
25
|
-
//# sourceMappingURL=MapFieldDisplay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MapFieldDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/crud/components/fields/display/MapFieldDisplay.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,KAAK,CAAC,CAAC;IAC3B,uBAAuB;IACvB,KAAK,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC3C,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,CAmB/D,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// packages/ui/src/crud/components/fields/display/MapFieldDisplay.tsx
|
|
3
|
-
/**
|
|
4
|
-
* @fileoverview MapFieldDisplay component
|
|
5
|
-
* @description Displays map 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
|
-
* MapFieldDisplay - Displays map 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 MapFieldDisplay = ({ config, value, t, className, }) => {
|
|
20
|
-
if (!value || (value.lat === undefined && value.lng === undefined)) {
|
|
21
|
-
return (_jsx(Text, { as: "span", variant: "muted", className: className, children: "-" }));
|
|
22
|
-
}
|
|
23
|
-
return (_jsxs(Text, { as: "div", level: "small", className: `font-mono ${className || ''}`, children: [value.lat?.toFixed(6), ", ", value.lng?.toFixed(6)] }));
|
|
24
|
-
};
|
|
25
|
-
export default MapFieldDisplay;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { EntityField } from '@donotdev/core';
|
|
2
|
-
import type { ComponentType } from 'react';
|
|
3
|
-
export interface MultiDropdownDisplayProps {
|
|
4
|
-
/** Field configuration */
|
|
5
|
-
config: EntityField<'multiselect'>;
|
|
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
|
-
* MultiDropdownDisplay - Displays multiselect 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 MultiDropdownDisplay: ComponentType<MultiDropdownDisplayProps>;
|
|
21
|
-
export default MultiDropdownDisplay;
|
|
22
|
-
//# sourceMappingURL=MultiDropdownDisplay.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MultiDropdownDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/crud/components/fields/display/MultiDropdownDisplay.tsx"],"names":[],"mappings":"AAYA,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,aAAa,CAAC,CAAC;IACnC,uBAAuB;IACvB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,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,oBAAoB,EAAE,aAAa,CAAC,yBAAyB,CAuBzE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -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;
|