@contember/create 2.0.0-alpha.9 → 2.0.0-beta.2
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/development/run.cjs +0 -2
- package/dist/development/run.cjs.map +1 -1
- package/dist/development/run.js +0 -2
- package/dist/development/run.js.map +1 -1
- package/dist/development/src/commands/WorkspaceCreateCommand.cjs.map +1 -1
- package/dist/development/src/commands/WorkspaceCreateCommand.js.map +1 -1
- package/dist/development/src/lib/FileSystem.cjs.map +1 -1
- package/dist/development/src/lib/FileSystem.js.map +1 -1
- package/dist/development/src/lib/TemplateInstaller.cjs +1 -8
- package/dist/development/src/lib/TemplateInstaller.cjs.map +1 -1
- package/dist/development/src/lib/TemplateInstaller.js +2 -9
- package/dist/development/src/lib/TemplateInstaller.js.map +1 -1
- package/dist/development/src/lib/version.cjs.map +1 -1
- package/dist/development/src/paths.cjs +3 -1
- package/dist/development/src/paths.cjs.map +1 -1
- package/dist/development/src/paths.js +4 -2
- package/dist/development/src/paths.js.map +1 -1
- package/dist/production/run.cjs +0 -2
- package/dist/production/run.cjs.map +1 -1
- package/dist/production/run.js +0 -2
- package/dist/production/run.js.map +1 -1
- package/dist/production/src/commands/WorkspaceCreateCommand.cjs.map +1 -1
- package/dist/production/src/commands/WorkspaceCreateCommand.js.map +1 -1
- package/dist/production/src/lib/FileSystem.cjs.map +1 -1
- package/dist/production/src/lib/FileSystem.js.map +1 -1
- package/dist/production/src/lib/TemplateInstaller.cjs +1 -8
- package/dist/production/src/lib/TemplateInstaller.cjs.map +1 -1
- package/dist/production/src/lib/TemplateInstaller.js +2 -9
- package/dist/production/src/lib/TemplateInstaller.js.map +1 -1
- package/dist/production/src/lib/version.cjs.map +1 -1
- package/dist/production/src/paths.cjs +3 -1
- package/dist/production/src/paths.cjs.map +1 -1
- package/dist/production/src/paths.js +4 -2
- package/dist/production/src/paths.js.map +1 -1
- package/dist/types/lib/TemplateInstaller.d.ts +1 -3
- package/dist/types/lib/TemplateInstaller.d.ts.map +1 -1
- package/dist/types/paths.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -31
- package/resources/templates/template-workspace/.github/scripts/setup-actions-variables.sh +36 -0
- package/resources/templates/template-workspace/.github/workflows/deploy.yaml +23 -0
- package/resources/templates/template-workspace/admin/lib/binding/binding.tsx +12 -2
- package/resources/templates/template-workspace/admin/lib/binding/delete.tsx +34 -23
- package/resources/templates/template-workspace/admin/lib/binding/hooks.tsx +5 -6
- package/resources/templates/template-workspace/admin/lib/binding/identity.tsx +34 -3
- package/resources/templates/template-workspace/admin/lib/binding/navigation-guard-dialog.tsx +39 -0
- package/resources/templates/template-workspace/admin/lib/binding/persist.tsx +10 -60
- package/resources/templates/template-workspace/admin/lib/block-repeater/block-repeater.tsx +109 -39
- package/resources/templates/template-workspace/admin/lib/buttons/link-back-button.tsx +1 -1
- package/resources/templates/template-workspace/admin/lib/datagrid/cells.tsx +90 -10
- package/resources/templates/template-workspace/admin/lib/datagrid/column-header.tsx +12 -4
- package/resources/templates/template-workspace/admin/lib/datagrid/column-leaf.tsx +21 -0
- package/resources/templates/template-workspace/admin/lib/datagrid/columns.tsx +367 -36
- package/resources/templates/template-workspace/admin/lib/datagrid/elements.tsx +6 -0
- package/resources/templates/template-workspace/admin/lib/datagrid/export.tsx +9 -0
- package/resources/templates/template-workspace/admin/lib/datagrid/filters/boolean.tsx +22 -5
- package/resources/templates/template-workspace/admin/lib/datagrid/filters/common.tsx +3 -0
- package/resources/templates/template-workspace/admin/lib/datagrid/filters/date.tsx +25 -2
- package/resources/templates/template-workspace/admin/lib/datagrid/filters/defined.tsx +103 -0
- package/resources/templates/template-workspace/admin/lib/datagrid/filters/enum.tsx +83 -27
- package/resources/templates/template-workspace/admin/lib/datagrid/filters/index.ts +1 -1
- package/resources/templates/template-workspace/admin/lib/datagrid/filters/mobile.tsx +0 -1
- package/resources/templates/template-workspace/admin/lib/datagrid/filters/number.tsx +21 -5
- package/resources/templates/template-workspace/admin/lib/datagrid/filters/relation.tsx +170 -43
- package/resources/templates/template-workspace/admin/lib/datagrid/filters/text.tsx +48 -5
- package/resources/templates/template-workspace/admin/lib/datagrid/grid.tsx +97 -25
- package/resources/templates/template-workspace/admin/lib/datagrid/index.ts +30 -4
- package/resources/templates/template-workspace/admin/lib/datagrid/labels.tsx +31 -0
- package/resources/templates/template-workspace/admin/lib/datagrid/layout-switcher.tsx +3 -0
- package/resources/templates/template-workspace/admin/lib/datagrid/loader.tsx +44 -2
- package/resources/templates/template-workspace/admin/lib/datagrid/pagination.tsx +8 -0
- package/resources/templates/template-workspace/admin/lib/datagrid/table.tsx +15 -1
- package/resources/templates/template-workspace/admin/lib/datagrid/tiles.tsx +13 -0
- package/resources/templates/template-workspace/admin/lib/datagrid/toolbar.tsx +27 -2
- package/resources/templates/template-workspace/admin/lib/dict.ts +54 -5
- package/resources/templates/template-workspace/admin/lib/dimensions/dimensions.tsx +1 -1
- package/resources/templates/template-workspace/admin/lib/editor/common/editor-canvas.tsx +2 -2
- package/resources/templates/template-workspace/admin/lib/editor/index.ts +1 -0
- package/resources/templates/template-workspace/admin/lib/editor/rich-text-view.tsx +17 -0
- package/resources/templates/template-workspace/admin/lib/field/formatted-field.tsx +10 -0
- package/resources/templates/template-workspace/admin/lib/field/index.ts +1 -0
- package/resources/templates/template-workspace/admin/lib/form/container.tsx +43 -45
- package/resources/templates/template-workspace/admin/lib/form/index.ts +1 -0
- package/resources/templates/template-workspace/admin/lib/form/inputs.tsx +56 -23
- package/resources/templates/template-workspace/admin/lib/form/select.tsx +61 -30
- package/resources/templates/template-workspace/admin/lib/form/ui.tsx +11 -2
- package/resources/templates/template-workspace/admin/lib/form/upload-repeaters.tsx +188 -0
- package/resources/templates/template-workspace/admin/lib/form/upload.tsx +57 -242
- package/resources/templates/template-workspace/admin/lib/formatting/formatting.ts +23 -0
- package/resources/templates/template-workspace/admin/lib/labels/enum-labels.ts +9 -0
- package/resources/templates/template-workspace/admin/lib/labels/field-labels.ts +7 -0
- package/resources/templates/template-workspace/admin/lib/labels/index.ts +2 -0
- package/resources/templates/template-workspace/admin/lib/layout/layout.tsx +3 -3
- package/resources/templates/template-workspace/admin/lib/repeater/repeater.tsx +97 -64
- package/resources/templates/template-workspace/admin/lib/select/filter.tsx +3 -2
- package/resources/templates/template-workspace/admin/lib/select/index.ts +0 -1
- package/resources/templates/template-workspace/admin/lib/select/list.tsx +78 -26
- package/resources/templates/template-workspace/admin/lib/select/multi-select.tsx +12 -19
- package/resources/templates/template-workspace/admin/lib/select/select.tsx +40 -23
- package/resources/templates/template-workspace/admin/lib/select/sortable-select.tsx +23 -18
- package/resources/templates/template-workspace/admin/lib/select/ui.tsx +3 -0
- package/resources/templates/template-workspace/admin/lib/tenant/forms/invite.tsx +5 -3
- package/resources/templates/template-workspace/admin/lib/tenant/forms/memberships-control.tsx +28 -16
- package/resources/templates/template-workspace/admin/lib/tenant/forms/password-reset.tsx +9 -6
- package/resources/templates/template-workspace/admin/lib/tenant/forms/passwordless-signin-init.tsx +31 -0
- package/resources/templates/template-workspace/admin/lib/tenant/forms/passwordless-signin.tsx +59 -0
- package/resources/templates/template-workspace/admin/lib/tenant/forms/update-project-member.tsx +5 -3
- package/resources/templates/template-workspace/admin/lib/tenant/hooks/useInvite.ts +1 -1
- package/resources/templates/template-workspace/admin/lib/tenant/listing/member-list.tsx +6 -5
- package/resources/templates/template-workspace/admin/lib/tenant/listing/person-list.tsx +2 -1
- package/resources/templates/template-workspace/admin/lib/ui/alert-dialog.tsx +2 -1
- package/resources/templates/template-workspace/admin/lib/ui/collapsible.tsx +9 -0
- package/resources/templates/template-workspace/admin/lib/ui/dialog.tsx +2 -1
- package/resources/templates/template-workspace/admin/lib/ui/dropdown.tsx +2 -1
- package/resources/templates/template-workspace/admin/lib/ui/input.tsx +14 -10
- package/resources/templates/template-workspace/admin/lib/ui/menu.tsx +2 -3
- package/resources/templates/template-workspace/admin/lib/ui/popover.tsx +2 -1
- package/resources/templates/template-workspace/admin/lib/ui/property-list.tsx +33 -0
- package/resources/templates/template-workspace/admin/lib/ui/select.tsx +80 -0
- package/resources/templates/template-workspace/admin/lib/ui/sheet.tsx +3 -2
- package/resources/templates/template-workspace/admin/lib/ui/textarea.tsx +9 -1
- package/resources/templates/template-workspace/admin/lib/upload/view.tsx +160 -165
- package/resources/templates/template-workspace/admin/lib/utils/createComponentOpenHooks.tsx +38 -0
- package/resources/templates/template-workspace/admin/lib/utils/uic.tsx +3 -3
- package/resources/templates/template-workspace/admin/package.json +21 -20
- package/resources/templates/template-workspace/package.json +3 -3
- package/src/lib/TemplateInstaller.ts +2 -9
- package/src/paths.ts +4 -3
- package/src/run.ts +0 -2
- package/tsconfig.settings.json +0 -4
- package/dist/development/src/lib/PackageDownloader.cjs +0 -33
- package/dist/development/src/lib/PackageDownloader.cjs.map +0 -1
- package/dist/development/src/lib/PackageDownloader.js +0 -33
- package/dist/development/src/lib/PackageDownloader.js.map +0 -1
- package/dist/production/src/lib/PackageDownloader.cjs +0 -33
- package/dist/production/src/lib/PackageDownloader.cjs.map +0 -1
- package/dist/production/src/lib/PackageDownloader.js +0 -33
- package/dist/production/src/lib/PackageDownloader.js.map +0 -1
- package/dist/types/lib/PackageDownloader.d.ts +0 -7
- package/dist/types/lib/PackageDownloader.d.ts.map +0 -1
- package/resources/templates/template-workspace/admin/.env.production +0 -3
- package/resources/templates/template-workspace/admin/lib/select/pagination.tsx +0 -48
- package/src/lib/PackageDownloader.ts +0 -33
- package/types/download-tarball/index.d.ts +0 -7
- package/types/get-package-json-from-registry/index.d.ts +0 -3
- package/types/registry-info/index.d.ts +0 -7
|
@@ -1,139 +1,141 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
-
import { ComponentType, ReactNode } from 'react'
|
|
3
|
-
import { Component, Field,
|
|
4
|
-
import {
|
|
2
|
+
import { ComponentType, ReactElement, ReactNode } from 'react'
|
|
3
|
+
import { Component, Field, FieldView, StaticRender, SugaredRelativeSingleEntity, SugaredRelativeSingleField } from '@contember/interface'
|
|
4
|
+
import {
|
|
5
|
+
AudioFileDataExtractorProps,
|
|
6
|
+
FileUrlDataExtractorProps,
|
|
7
|
+
GenericFileMetadataExtractorProps,
|
|
8
|
+
ImageFileDataExtractorProps,
|
|
9
|
+
UploaderBase,
|
|
10
|
+
VideoFileDataExtractorProps,
|
|
11
|
+
} from '@contember/react-uploader'
|
|
5
12
|
import { formatBytes, formatDate, formatDuration } from '../formatting'
|
|
6
13
|
import { Button } from '../ui/button'
|
|
7
|
-
import { FileIcon, InfoIcon, TrashIcon } from 'lucide-react'
|
|
14
|
+
import { EditIcon, FileIcon, InfoIcon, TrashIcon } from 'lucide-react'
|
|
8
15
|
import { Popover, PopoverContent, PopoverTrigger } from '../ui/popover'
|
|
9
16
|
import { formatImageResizeUrl } from '../images'
|
|
10
17
|
|
|
18
|
+
export type BaseFileViewProps = {
|
|
19
|
+
baseField?: SugaredRelativeSingleEntity['field']
|
|
20
|
+
actions?: ReactNode
|
|
21
|
+
edit?: ReactNode
|
|
22
|
+
noDestroy?: boolean
|
|
23
|
+
DestroyAction?: ComponentType<{ children: ReactElement }>
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
11
27
|
export type UploadedImageViewProps =
|
|
12
28
|
& FileUrlDataExtractorProps
|
|
13
29
|
& GenericFileMetadataExtractorProps
|
|
14
30
|
& ImageFileDataExtractorProps
|
|
15
|
-
&
|
|
16
|
-
DestroyAction?: ComponentType<{ children: ReactNode }>
|
|
17
|
-
}
|
|
31
|
+
& BaseFileViewProps
|
|
18
32
|
|
|
19
|
-
export const UploadedImageView = Component<UploadedImageViewProps>(({ DestroyAction, ...props }) =>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
})
|
|
33
|
+
export const UploadedImageView = Component<UploadedImageViewProps>(({ DestroyAction, edit, actions, baseField, ...props }) => (
|
|
34
|
+
<div className="flex items-center justify-center h-40 rounded-md group relative">
|
|
35
|
+
<UploaderBase baseField={baseField}>
|
|
36
|
+
<ImagePreview urlField={props.urlField} />
|
|
37
|
+
</UploaderBase>
|
|
38
|
+
<FileActions baseField={baseField} DestroyAction={DestroyAction} metadata={<ImageMetadata {...props} />} edit={edit} actions={actions} />
|
|
39
|
+
</div>
|
|
40
|
+
))
|
|
41
|
+
|
|
42
|
+
const ImagePreview = Component((props: FileUrlDataExtractorProps) => (
|
|
43
|
+
<FieldView<string> field={props.urlField} render={({ value: url }) => (
|
|
44
|
+
!url ? null : <img src={formatImageResizeUrl(url, { width: 400 })} className="max-w-full max-h-full" />
|
|
45
|
+
)} />
|
|
46
|
+
))
|
|
47
|
+
|
|
48
|
+
const ImageMetadata = Component(({ heightField, widthField, ...props }: UploadedImageViewProps) => (
|
|
49
|
+
<Metadata {...props}>
|
|
50
|
+
<DimensionsMeta widthField={widthField} heightField={heightField} />
|
|
51
|
+
</Metadata>
|
|
52
|
+
))
|
|
35
53
|
|
|
36
|
-
const ImageMetadata = Component(({ heightField, widthField, ...props }: UploadedImageViewProps) => {
|
|
37
|
-
return (
|
|
38
|
-
<Metadata {...props}>
|
|
39
|
-
<DimensionsMeta widthField={widthField} heightField={heightField} />
|
|
40
|
-
</Metadata>
|
|
41
|
-
)
|
|
42
|
-
})
|
|
43
54
|
|
|
44
55
|
|
|
45
56
|
export type UploadedAudioViewProps =
|
|
46
57
|
& FileUrlDataExtractorProps
|
|
47
58
|
& GenericFileMetadataExtractorProps
|
|
48
59
|
& AudioFileDataExtractorProps
|
|
49
|
-
&
|
|
50
|
-
DestroyAction?: ComponentType<{ children: ReactNode }>
|
|
51
|
-
}
|
|
60
|
+
& BaseFileViewProps
|
|
52
61
|
|
|
53
|
-
export const UploadedAudioView = Component<UploadedAudioViewProps>(({ DestroyAction, ...props }) =>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
<
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
export const UploadedAudioView = Component<UploadedAudioViewProps>(({ DestroyAction, edit, actions, baseField, ...props }) => (
|
|
63
|
+
<div className="flex items-end justify-center h-40 max-w-80 rounded-md group">
|
|
64
|
+
<UploaderBase baseField={baseField}>
|
|
65
|
+
<AudioPreview urlField={props.urlField} />
|
|
66
|
+
</UploaderBase>
|
|
67
|
+
<FileActions baseField={baseField} DestroyAction={DestroyAction} metadata={<AudioMetadata {...props} />} edit={edit}
|
|
68
|
+
actions={actions} />
|
|
69
|
+
</div>
|
|
70
|
+
))
|
|
71
|
+
|
|
72
|
+
const AudioPreview = Component(({ urlField }: FileUrlDataExtractorProps) => (
|
|
73
|
+
<FieldView<string> field={urlField} render={({ value: url }) => (
|
|
74
|
+
!url ? null : <audio src={url} controls className="max-w-full max-h-full" controlsList="nodownload noremoteplayback noplaybackrate" />
|
|
75
|
+
)} />
|
|
76
|
+
))
|
|
77
|
+
|
|
78
|
+
const AudioMetadata = Component(({ durationField, ...props }: UploadedAudioViewProps) => (
|
|
79
|
+
<Metadata {...props}>
|
|
80
|
+
<MetaField field={durationField} label="Duration:" format={formatDuration} />
|
|
81
|
+
</Metadata>
|
|
82
|
+
))
|
|
69
83
|
|
|
70
|
-
const AudioMetadata = ({ durationField, ...props }: UploadedAudioViewProps) => {
|
|
71
|
-
return (
|
|
72
|
-
<Metadata {...props}>
|
|
73
|
-
<MetaField field={durationField} label="Duration:" format={formatDuration} />
|
|
74
|
-
</Metadata>
|
|
75
|
-
)
|
|
76
|
-
}
|
|
77
84
|
|
|
78
85
|
|
|
79
86
|
export type UploadedVideoViewProps =
|
|
80
87
|
& FileUrlDataExtractorProps
|
|
81
88
|
& GenericFileMetadataExtractorProps
|
|
82
89
|
& VideoFileDataExtractorProps
|
|
83
|
-
&
|
|
84
|
-
|
|
85
|
-
|
|
90
|
+
& BaseFileViewProps
|
|
91
|
+
|
|
92
|
+
export const UploadedVideoView = Component<UploadedVideoViewProps>(({ DestroyAction, edit, actions, baseField, ...props }) => (
|
|
93
|
+
<div className="flex items-center justify-center h-40 max-w-60 rounded-md group">
|
|
94
|
+
<UploaderBase baseField={baseField}>
|
|
95
|
+
<VideoPreview urlField={props.urlField} />
|
|
96
|
+
</UploaderBase>
|
|
97
|
+
<FileActions baseField={baseField} DestroyAction={DestroyAction} metadata={<VideoMetadata {...props} />} edit={edit} actions={actions} />
|
|
98
|
+
</div>
|
|
99
|
+
))
|
|
100
|
+
|
|
101
|
+
const VideoPreview = Component(({ urlField }: FileUrlDataExtractorProps) => (
|
|
102
|
+
<FieldView<string> field={urlField} render={({ value: url }) => (
|
|
103
|
+
!url ? null : <video src={url} controls className="max-w-full max-h-full" controlsList="nodownload noremoteplayback noplaybackrate" />
|
|
104
|
+
)} />
|
|
105
|
+
))
|
|
106
|
+
|
|
107
|
+
const VideoMetadata = Component(({ durationField, widthField, heightField, ...props }: UploadedVideoViewProps) => (
|
|
108
|
+
<Metadata {...props}>
|
|
109
|
+
<MetaField field={durationField} label="Duration:" format={formatDuration} />
|
|
110
|
+
<DimensionsMeta widthField={widthField} heightField={heightField} />
|
|
111
|
+
</Metadata>
|
|
112
|
+
))
|
|
86
113
|
|
|
87
|
-
export const UploadedVideoView = Component<UploadedVideoViewProps>(({ DestroyAction, ...props }) => {
|
|
88
|
-
const url = useField<string>(props.urlField).value
|
|
89
|
-
return (
|
|
90
|
-
<div className="flex items-center justify-center h-40 max-w-60 rounded-md group">
|
|
91
|
-
{url && <video src={url} controls className="max-w-full max-h-full" controlsList="nodownload noremoteplayback noplaybackrate" />}
|
|
92
|
-
<FileActions DestroyAction={DestroyAction}>
|
|
93
|
-
<VideoMetadata {...props} />
|
|
94
|
-
</FileActions>
|
|
95
|
-
</div>
|
|
96
|
-
)
|
|
97
|
-
}, props => {
|
|
98
|
-
return <>
|
|
99
|
-
<Field field={props.urlField} />
|
|
100
|
-
<VideoMetadata {...props} />
|
|
101
|
-
</>
|
|
102
|
-
})
|
|
103
114
|
|
|
104
|
-
const VideoMetadata = Component(({ durationField, widthField, heightField, ...props }: UploadedVideoViewProps) => {
|
|
105
|
-
return (
|
|
106
|
-
<Metadata {...props}>
|
|
107
|
-
<MetaField field={durationField} label="Duration:" format={formatDuration} />
|
|
108
|
-
<DimensionsMeta widthField={widthField} heightField={heightField} />
|
|
109
|
-
</Metadata>
|
|
110
|
-
)
|
|
111
|
-
})
|
|
112
115
|
|
|
113
116
|
export type UploadedAnyViewProps =
|
|
114
117
|
& FileUrlDataExtractorProps
|
|
115
118
|
& GenericFileMetadataExtractorProps
|
|
116
|
-
&
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
<
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
})
|
|
119
|
+
& BaseFileViewProps
|
|
120
|
+
|
|
121
|
+
export const UploadedAnyView = Component<UploadedAnyViewProps>(({ DestroyAction, edit, actions, baseField, ...props }) => (
|
|
122
|
+
<div className="flex h-40 w-40 rounded-md group">
|
|
123
|
+
<UploaderBase baseField={baseField}>
|
|
124
|
+
<AnyFilePreview {...props} />
|
|
125
|
+
</UploaderBase>
|
|
126
|
+
<FileActions baseField={baseField} DestroyAction={DestroyAction} metadata={<Metadata {...props} />} edit={edit} actions={actions} />
|
|
127
|
+
</div>
|
|
128
|
+
))
|
|
129
|
+
|
|
130
|
+
const AnyFilePreview = Component(({ urlField, fileNameField }: FileUrlDataExtractorProps & GenericFileMetadataExtractorProps) => <>
|
|
131
|
+
<FieldView<string> field={urlField} render={({ value: url }) => (
|
|
132
|
+
url ? <a href={url ?? '#'} target="_blank" rel="noreferrer"
|
|
133
|
+
className="text-blue-600 hover:text-blue-700 underline overflow-hidden whitespace-nowrap overflow-ellipsis flex flex-col group/anchor flex-1 items-center justify-center">
|
|
134
|
+
<FileIcon className="h-16 w-16 text-gray-400 group-hover/anchor:text-gray-500 transition-all" />
|
|
135
|
+
{fileNameField ? <span><Field field={fileNameField} /></span> : null}
|
|
136
|
+
</a> : null)} />
|
|
137
|
+
<StaticRender>{fileNameField ? <span><Field field={fileNameField} /></span> : null}</StaticRender>
|
|
138
|
+
</>)
|
|
137
139
|
|
|
138
140
|
|
|
139
141
|
type MetadataProps =
|
|
@@ -143,45 +145,33 @@ type MetadataProps =
|
|
|
143
145
|
children?: ReactNode
|
|
144
146
|
}
|
|
145
147
|
|
|
146
|
-
const Metadata = Component(({ children, urlField, fileSizeField, fileNameField, lastModifiedField, fileTypeField }: MetadataProps) =>
|
|
147
|
-
|
|
148
|
-
<
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
<
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
})
|
|
148
|
+
const Metadata = Component(({ children, urlField, fileSizeField, fileNameField, lastModifiedField, fileTypeField }: MetadataProps) => (
|
|
149
|
+
<div className="grid grid-cols-[6rem_1fr] gap-2">
|
|
150
|
+
<MetaField field={fileSizeField} label="Size:" format={formatBytes} />
|
|
151
|
+
<MetaField field={fileTypeField} label="Type:" />
|
|
152
|
+
<MetaField field={fileNameField} label="File name:" />
|
|
153
|
+
{children}
|
|
154
|
+
<MetaField field={lastModifiedField} label="Date:" format={formatDate} />
|
|
155
|
+
<MetaField field={urlField} label="URL:" format={url => (
|
|
156
|
+
<a href={url} target="_blank" rel="noreferrer"
|
|
157
|
+
className="text-blue-600 underline overflow-hidden whitespace-nowrap overflow-ellipsis">
|
|
158
|
+
{url.replace(/^(.{15}).*(.{15})$/, '$1…$2')}
|
|
159
|
+
</a>
|
|
160
|
+
)} />
|
|
161
|
+
</div>
|
|
162
|
+
))
|
|
162
163
|
|
|
163
164
|
const DimensionsMeta = Component(({ widthField, heightField }: {
|
|
164
165
|
widthField?: SugaredRelativeSingleField['field']
|
|
165
166
|
heightField?: SugaredRelativeSingleField['field']
|
|
166
167
|
}) => {
|
|
167
|
-
const entity = useEntity()
|
|
168
168
|
if (!widthField || !heightField) {
|
|
169
169
|
return null
|
|
170
170
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
<>
|
|
176
|
-
<span className="font-semibold text-right">Dimensions:</span>
|
|
177
|
-
<span>{width} x {height} px</span>
|
|
178
|
-
</>
|
|
179
|
-
)
|
|
180
|
-
}, ({ widthField, heightField }) => {
|
|
181
|
-
return <>
|
|
182
|
-
{widthField && <Field field={widthField} />}
|
|
183
|
-
{heightField && <Field field={heightField} />}
|
|
184
|
-
</>
|
|
171
|
+
return <FieldView<number, number> fields={[widthField, heightField]} render={(width, height) => <>
|
|
172
|
+
<span className="font-semibold text-right">Dimensions:</span>
|
|
173
|
+
<span>{width.value} x {height.value} px</span>
|
|
174
|
+
</>}/>
|
|
185
175
|
})
|
|
186
176
|
|
|
187
177
|
interface MetaFieldProps {
|
|
@@ -189,44 +179,49 @@ interface MetaFieldProps {
|
|
|
189
179
|
label: ReactNode
|
|
190
180
|
format?: (value: any) => ReactNode
|
|
191
181
|
}
|
|
192
|
-
const MetaField = Component<MetaFieldProps>(({ field, label, format = it => it }) =>
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
{format(entity.getField(field).value)}
|
|
199
|
-
</span>
|
|
200
|
-
</>
|
|
201
|
-
) : null
|
|
202
|
-
}, ({ field }) => {
|
|
203
|
-
return field ? <Field field={field} /> : null
|
|
204
|
-
})
|
|
182
|
+
const MetaField = Component<MetaFieldProps>(({ field, label, format = it => it }) => (
|
|
183
|
+
!field ? null : <FieldView<any> field={field} render={value => <>
|
|
184
|
+
<span className="font-semibold text-right">{label}</span>
|
|
185
|
+
<span>{format(value.value)}</span>
|
|
186
|
+
</>} />
|
|
187
|
+
))
|
|
205
188
|
|
|
206
189
|
|
|
207
|
-
const FileActions = ({ DestroyAction,
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}) => {
|
|
190
|
+
const FileActions = Component(({ DestroyAction, metadata, actions, edit, baseField, noDestroy }: {
|
|
191
|
+
metadata?: ReactNode
|
|
192
|
+
} & BaseFileViewProps) => {
|
|
211
193
|
return (
|
|
212
|
-
<div className="absolute -top-2 -right-1 p-0.5 bg-gray-200 border border-gray-300 rounded shadow flex gap-
|
|
213
|
-
|
|
194
|
+
<div className="absolute -top-2 -right-1 p-0.5 bg-gray-200 border border-gray-300 rounded shadow flex gap-2 opacity-0 transition-opacity group-hover:opacity-100">
|
|
195
|
+
{actions}
|
|
196
|
+
{edit && <Popover>
|
|
214
197
|
<PopoverTrigger asChild>
|
|
215
198
|
<Button variant={'ghost'} size={'sm'} className={'p-0.5 h-5 w-5'} onClick={e => e.stopPropagation()}>
|
|
216
|
-
<
|
|
199
|
+
<EditIcon className="h-4 w-4" />
|
|
217
200
|
</Button>
|
|
218
201
|
</PopoverTrigger>
|
|
219
202
|
<PopoverContent>
|
|
220
|
-
|
|
221
|
-
{children}
|
|
222
|
-
</div>
|
|
203
|
+
{edit}
|
|
223
204
|
</PopoverContent>
|
|
224
|
-
</Popover>
|
|
225
|
-
{
|
|
226
|
-
|
|
227
|
-
<
|
|
228
|
-
|
|
229
|
-
|
|
205
|
+
</Popover>}
|
|
206
|
+
<UploaderBase baseField={baseField}>
|
|
207
|
+
{metadata && <Popover>
|
|
208
|
+
<PopoverTrigger asChild>
|
|
209
|
+
<Button variant={'ghost'} size={'sm'} className={'p-0.5 h-5 w-5'} onClick={e => e.stopPropagation()}>
|
|
210
|
+
<InfoIcon className="h-4 w-4" />
|
|
211
|
+
</Button>
|
|
212
|
+
</PopoverTrigger>
|
|
213
|
+
<PopoverContent>
|
|
214
|
+
<div className="text-sm">
|
|
215
|
+
{metadata}
|
|
216
|
+
</div>
|
|
217
|
+
</PopoverContent>
|
|
218
|
+
</Popover>}
|
|
219
|
+
{!noDestroy && DestroyAction ? <DestroyAction>
|
|
220
|
+
<Button variant={'ghost'} size={'sm'} className={'p-0.5 h-5 w-5 text-red-500'}>
|
|
221
|
+
<TrashIcon className="h-4 w-4" />
|
|
222
|
+
</Button>
|
|
223
|
+
</DestroyAction> : null}
|
|
224
|
+
</UploaderBase>
|
|
230
225
|
</div>
|
|
231
226
|
)
|
|
232
|
-
}
|
|
227
|
+
})
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ComponentType, memo, SetStateAction, useCallback, useState } from 'react'
|
|
2
|
+
import { createRequiredContext } from '@contember/react-utils'
|
|
3
|
+
|
|
4
|
+
export const createComponentOpenHooks = <P extends {
|
|
5
|
+
open?: boolean
|
|
6
|
+
defaultOpen?: boolean
|
|
7
|
+
onOpenChange?(open: boolean): void
|
|
8
|
+
}>(Component: ComponentType<P>): {
|
|
9
|
+
Component: ComponentType<P>
|
|
10
|
+
useOpen: () => [boolean, (value: SetStateAction<boolean>) => void]
|
|
11
|
+
} => {
|
|
12
|
+
const [ctx, useOpen] = createRequiredContext<[boolean, (value: SetStateAction<boolean>) => void]>(`${Component.displayName ?? 'UnnamedComponent'}OpenContext`)
|
|
13
|
+
const WrappedComponent = memo<P>(({ open: openIn, defaultOpen, onOpenChange, ...props }) => {
|
|
14
|
+
const [open, setOpenInternal] = useState(openIn ?? defaultOpen ?? false)
|
|
15
|
+
if (openIn !== undefined && open !== openIn) {
|
|
16
|
+
setOpenInternal(openIn)
|
|
17
|
+
}
|
|
18
|
+
const setOpen = useCallback((value: SetStateAction<boolean>) => {
|
|
19
|
+
setOpenInternal(it => {
|
|
20
|
+
const newValue = typeof value === 'function' ? value(it) : value
|
|
21
|
+
onOpenChange?.(newValue)
|
|
22
|
+
return newValue
|
|
23
|
+
})
|
|
24
|
+
}, [onOpenChange])
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<ctx.Provider value={[open, setOpen]}>
|
|
28
|
+
<Component {...(props as P)} open={open} onOpenChange={setOpen} />
|
|
29
|
+
</ctx.Provider>
|
|
30
|
+
)
|
|
31
|
+
})
|
|
32
|
+
WrappedComponent.displayName = Component.displayName
|
|
33
|
+
|
|
34
|
+
return {
|
|
35
|
+
Component: WrappedComponent,
|
|
36
|
+
useOpen,
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -35,7 +35,7 @@ export const uiconfig = <T extends ConfigSchema | undefined>(config: Config<T, C
|
|
|
35
35
|
export type NoInfer<T> = T & { [K in keyof T]: T[K] }
|
|
36
36
|
|
|
37
37
|
export const uic = <El extends React.ElementType, Variants extends ConfigSchema | undefined = undefined>(Component: El, config: Config<Variants, NoInfer<El>>) => {
|
|
38
|
-
const cls = cva<any>(config?.baseClass, {
|
|
38
|
+
const cls = cva<any>(config?.baseClass as any, {
|
|
39
39
|
variants: config?.variants,
|
|
40
40
|
defaultVariants: config?.defaultVariants,
|
|
41
41
|
compoundVariants: config?.compoundVariants,
|
|
@@ -60,7 +60,7 @@ export const uic = <El extends React.ElementType, Variants extends ConfigSchema
|
|
|
60
60
|
}
|
|
61
61
|
let children = childrenBase
|
|
62
62
|
if (config?.wrapInner) {
|
|
63
|
-
children = React.createElement(config.wrapInner, props, children)
|
|
63
|
+
children = React.createElement(config.wrapInner, props as any, children)
|
|
64
64
|
}
|
|
65
65
|
if (config?.beforeChildren || config?.afterChildren) {
|
|
66
66
|
children = <>
|
|
@@ -71,7 +71,7 @@ export const uic = <El extends React.ElementType, Variants extends ConfigSchema
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
const innerEl = <Comp ref={ref} className={twMerge(clsx(cls(props), classNameProp))} {...(config.defaultProps ?? {})} {...rest}>{children}</Comp>
|
|
74
|
-
return config?.wrapOuter ? React.createElement(config.wrapOuter, props, innerEl) : innerEl
|
|
74
|
+
return config?.wrapOuter ? React.createElement(config.wrapOuter, props as any, innerEl) : innerEl
|
|
75
75
|
})
|
|
76
76
|
component.displayName = config?.displayName
|
|
77
77
|
|
|
@@ -36,28 +36,29 @@
|
|
|
36
36
|
"@contember/react-slots": "{version}",
|
|
37
37
|
"@contember/react-uploader": "{version}",
|
|
38
38
|
"@contember/react-uploader-dropzone": "{version}",
|
|
39
|
-
"@radix-ui/react-alert-dialog": "^1.
|
|
40
|
-
"@radix-ui/react-
|
|
41
|
-
"@radix-ui/react-dropdown-menu": "^2.
|
|
42
|
-
"@radix-ui/react-label": "^2.0
|
|
43
|
-
"@radix-ui/react-popover": "^1.
|
|
44
|
-
"@radix-ui/react-
|
|
45
|
-
"@radix-ui/react-progress": "^1.0
|
|
46
|
-
"@radix-ui/react-scroll-area": "^1.0
|
|
47
|
-
"@radix-ui/react-select": "^2.
|
|
48
|
-
"@radix-ui/react-
|
|
49
|
-
"@radix-ui/react-
|
|
50
|
-
"@radix-ui/react-
|
|
51
|
-
"@radix-ui/react-
|
|
52
|
-
"@radix-ui/react-
|
|
53
|
-
"@radix-ui/react-tooltip": "^1.
|
|
39
|
+
"@radix-ui/react-alert-dialog": "^1.1.2",
|
|
40
|
+
"@radix-ui/react-dialog": "^1.1.2",
|
|
41
|
+
"@radix-ui/react-dropdown-menu": "^2.1.2",
|
|
42
|
+
"@radix-ui/react-label": "^2.1.0",
|
|
43
|
+
"@radix-ui/react-popover": "^1.1.2",
|
|
44
|
+
"@radix-ui/react-portal": "^1.1.2",
|
|
45
|
+
"@radix-ui/react-progress": "^1.1.0",
|
|
46
|
+
"@radix-ui/react-scroll-area": "^1.2.0",
|
|
47
|
+
"@radix-ui/react-select": "^2.1.2",
|
|
48
|
+
"@radix-ui/react-slot": "^1.1.0",
|
|
49
|
+
"@radix-ui/react-switch": "^1.1.1",
|
|
50
|
+
"@radix-ui/react-toast": "^1.2.2",
|
|
51
|
+
"@radix-ui/react-toggle": "^1.1.0",
|
|
52
|
+
"@radix-ui/react-toggle-group": "^1.1.0",
|
|
53
|
+
"@radix-ui/react-tooltip": "^1.1.3",
|
|
54
54
|
"class-variance-authority": "^0.7.0",
|
|
55
|
-
"
|
|
55
|
+
"clsx": "^2.1.1",
|
|
56
|
+
"lucide-react": "^0.451.0",
|
|
56
57
|
"qrcode-generator": "^1.4.4",
|
|
57
|
-
"react": "^18.
|
|
58
|
-
"react-dom": "^18.
|
|
58
|
+
"react": "^18.3.1",
|
|
59
|
+
"react-dom": "^18.3.1",
|
|
59
60
|
"slate": "^0.103.0",
|
|
60
|
-
"slate-react": "^0.
|
|
61
|
-
"tailwind-merge": "^2.
|
|
61
|
+
"slate-react": "^0.110.0",
|
|
62
|
+
"tailwind-merge": "^2.5.3"
|
|
62
63
|
}
|
|
63
64
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": true,
|
|
3
3
|
"scripts": {
|
|
4
|
-
"contember": "docker
|
|
4
|
+
"contember": "docker compose run --rm contember-cli",
|
|
5
5
|
"start": "yarn run contember:start-engine && yarn run client:generate && yarn contember:start-admin",
|
|
6
6
|
"build": "yarn run ts:build && yarn run contember:build-admin \"$0\" && yarn run contember:build-api",
|
|
7
|
-
"deploy": "yarn run build \"$0\" && docker
|
|
8
|
-
"contember:start-engine": "docker
|
|
7
|
+
"deploy": "yarn run build \"$0\" && docker compose run --no-deps contember-cli deploy \"$@\" --root",
|
|
8
|
+
"contember:start-engine": "docker compose up --detach && yarn run contember migrations:execute --yes",
|
|
9
9
|
"contember:start-admin": "yarn workspace @app/admin dev",
|
|
10
10
|
"contember:build-admin": "tsc --project admin && yarn workspace @app/admin build \"$0\"",
|
|
11
11
|
"contember:build-api": "tsc --project api",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PackageDownloader } from './PackageDownloader'
|
|
1
|
+
import { join } from 'node:path'
|
|
3
2
|
import { FileSystem } from './FileSystem'
|
|
4
3
|
import jsyaml from 'js-yaml'
|
|
5
4
|
|
|
@@ -12,7 +11,6 @@ export class TemplateInstaller {
|
|
|
12
11
|
|
|
13
12
|
constructor(
|
|
14
13
|
private readonly resourceDir: string,
|
|
15
|
-
private readonly packageDownloader: PackageDownloader,
|
|
16
14
|
private readonly fs: FileSystem,
|
|
17
15
|
) {
|
|
18
16
|
}
|
|
@@ -27,12 +25,7 @@ export class TemplateInstaller {
|
|
|
27
25
|
if (this.localTemplates[template]) {
|
|
28
26
|
template = this.localTemplates[template]
|
|
29
27
|
}
|
|
30
|
-
|
|
31
|
-
template = await this.packageDownloader.downloadPackage(template)
|
|
32
|
-
removeTemplate = async () => {
|
|
33
|
-
await this.fs.unlink(template)
|
|
34
|
-
}
|
|
35
|
-
}
|
|
28
|
+
|
|
36
29
|
const templateConfigFile = join(template, 'contember.template.yaml')
|
|
37
30
|
if (!(await this.fs.pathExists(templateConfigFile))) {
|
|
38
31
|
throw `${template} is not a Contember template`
|
package/src/paths.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { dirname } from 'node:path'
|
|
1
|
+
import { findPackageRoot } from '@contember/cli-common'
|
|
2
|
+
import { dirname, join } from 'node:path'
|
|
3
3
|
import { fileURLToPath } from 'node:url'
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const currentFilePath = dirname(fileURLToPath(import.meta.url))
|
|
6
|
+
export const packageRoot = process.env.CONTEMBER_CLI_PACKAGE_ROOT || findPackageRoot(currentFilePath)
|
|
6
7
|
export const resourcesDir = join(packageRoot, './resources')
|
package/src/run.ts
CHANGED
|
@@ -3,14 +3,12 @@ import { Application, CommandManager } from '@contember/cli-common'
|
|
|
3
3
|
import { WorkspaceCreateCommand } from './commands'
|
|
4
4
|
import { TemplateInstaller } from './lib/TemplateInstaller'
|
|
5
5
|
import { resourcesDir } from './paths'
|
|
6
|
-
import { PackageDownloader } from './lib/PackageDownloader'
|
|
7
6
|
import { FileSystem } from './lib/FileSystem'
|
|
8
7
|
|
|
9
8
|
(async () => {
|
|
10
9
|
const commandManager = new CommandManager({
|
|
11
10
|
['workspace']: () => new WorkspaceCreateCommand(new TemplateInstaller(
|
|
12
11
|
resourcesDir,
|
|
13
|
-
new PackageDownloader(new FileSystem()),
|
|
14
12
|
new FileSystem(),
|
|
15
13
|
)),
|
|
16
14
|
})
|
package/tsconfig.settings.json
CHANGED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const npa = require("npm-package-arg");
|
|
4
|
-
const getRegistryInfo = require("registry-info");
|
|
5
|
-
const getPackageJson = require("get-package-json-from-registry");
|
|
6
|
-
const node_path = require("node:path");
|
|
7
|
-
const downloadTarball = require("download-tarball");
|
|
8
|
-
var __defProp = Object.defineProperty;
|
|
9
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "", value);
|
|
11
|
-
class PackageDownloader {
|
|
12
|
-
constructor(fs) {
|
|
13
|
-
this.fs = fs;
|
|
14
|
-
__publicField(this, "downloadPackage", async (pkgName) => {
|
|
15
|
-
const { scope } = npa(pkgName);
|
|
16
|
-
const { authorization } = getRegistryInfo(scope);
|
|
17
|
-
const headers = authorization ? { authorization } : {};
|
|
18
|
-
const pkg = await getPackageJson(pkgName);
|
|
19
|
-
const {
|
|
20
|
-
dist: { tarball }
|
|
21
|
-
} = pkg;
|
|
22
|
-
const tmpDir = await this.fs.createTempDir();
|
|
23
|
-
await downloadTarball({ url: tarball, gotOpts: { headers }, dir: tmpDir });
|
|
24
|
-
const dirContent = await this.fs.readDir(tmpDir);
|
|
25
|
-
if (dirContent.length !== 1 || dirContent[0] !== "package") {
|
|
26
|
-
throw "Invalid NPM package";
|
|
27
|
-
}
|
|
28
|
-
return node_path.join(tmpDir, "package");
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.PackageDownloader = PackageDownloader;
|
|
33
|
-
//# sourceMappingURL=PackageDownloader.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PackageDownloader.cjs","sources":["../../../../../packages/create/src/lib/PackageDownloader.ts"],"sourcesContent":["import npa from 'npm-package-arg'\nimport getRegistryInfo from 'registry-info'\nimport getPackageJson from 'get-package-json-from-registry'\nimport { join } from 'node:path'\nimport downloadTarball from 'download-tarball'\nimport { FileSystem } from './FileSystem'\n\nexport class PackageDownloader {\n\n\tconstructor(\n\t\tprivate readonly fs: FileSystem,\n\t) {\n\t}\n\n\tdownloadPackage = async (pkgName: string): Promise<string> => {\n\t\tconst { scope } = npa(pkgName)\n\t\tconst { authorization } = getRegistryInfo(scope)\n\t\tconst headers = authorization ? { authorization } : {}\n\n\t\tconst pkg = await getPackageJson(pkgName)\n\t\tconst {\n\t\t\tdist: { tarball },\n\t\t} = pkg\n\n\t\tconst tmpDir = await this.fs.createTempDir()\n\t\tawait downloadTarball({ url: tarball, gotOpts: { headers }, dir: tmpDir })\n\t\tconst dirContent = await this.fs.readDir(tmpDir)\n\t\tif (dirContent.length !== 1 || dirContent[0] !== 'package') {\n\t\t\tthrow 'Invalid NPM package'\n\t\t}\n\t\treturn join(tmpDir, 'package')\n\t}\n}\n"],"names":["join"],"mappings":";;;;;;;;;;AAOO,MAAM,kBAAkB;AAAA,EAE9B,YACkB,IAChB;AADgB,SAAA,KAAA;AAIlB,kBAAA,MAAA,mBAAkB,OAAO,YAAqC;AAC7D,YAAM,EAAE,MAAA,IAAU,IAAI,OAAO;AAC7B,YAAM,EAAE,cAAA,IAAkB,gBAAgB,KAAK;AAC/C,YAAM,UAAU,gBAAgB,EAAE,cAAA,IAAkB,CAAA;AAE9C,YAAA,MAAM,MAAM,eAAe,OAAO;AAClC,YAAA;AAAA,QACL,MAAM,EAAE,QAAQ;AAAA,MACb,IAAA;AAEJ,YAAM,SAAS,MAAM,KAAK,GAAG,cAAc;AACrC,YAAA,gBAAgB,EAAE,KAAK,SAAS,SAAS,EAAE,WAAW,KAAK,OAAA,CAAQ;AACzE,YAAM,aAAa,MAAM,KAAK,GAAG,QAAQ,MAAM;AAC/C,UAAI,WAAW,WAAW,KAAK,WAAW,CAAC,MAAM,WAAW;AACrD,cAAA;AAAA,MACP;AACO,aAAAA,UAAA,KAAK,QAAQ,SAAS;AAAA,IAAA,CAC9B;AAAA,EAnBA;AAoBD;;"}
|