@yimingliao/cms 0.0.141 → 0.0.143
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/ckeditor-editor.css +172 -0
- package/dist/export/client/index.js +3 -0
- package/dist/src/client/interfaces/components/resources/file/file-card.js +87 -0
- package/dist/src/client/interfaces/components/resources/file/file-list.js +159 -0
- package/dist/src/client/interfaces/components/resources/file/is-locked-buttons.js +71 -0
- package/dist/src/client/interfaces/components/resources/file/type-buttons.js +62 -0
- package/dist/src/client/interfaces/components/ui/blocks/list-cards-container/list-cards-container.js +11 -0
- package/dist/src/client/interfaces/components/ui/blocks/list-cards-container/page-size-selector.js +12 -1
- package/dist/src/client/interfaces/components/ui/cards/action-buttons-card.js +2 -2
- package/dist/src/client/interfaces/components/ui/features/smart-image.js +2 -2
- package/dist/src/client/interfaces/components/ui/form/control-fields/control-fields-display.js +0 -17
- package/dist/src/client/interfaces/components/ui/form/control-fields/control-fields-input.js +0 -17
- package/dist/src/client/interfaces/components/ui/form/index-field.js +0 -14
- package/dist/src/client/interfaces/components/ui/form/slug-field.js +1 -15
- package/dist/src/client/interfaces/components/ui/inputs/editor/base/base-editor.js +143 -0
- package/dist/src/client/interfaces/components/ui/inputs/editor/base/built-in-plugins.js +71 -0
- package/dist/src/client/interfaces/components/ui/inputs/editor/base/configs/heading.config.js +41 -0
- package/dist/src/client/interfaces/components/ui/inputs/editor/base/configs/image.config.js +32 -0
- package/dist/src/client/interfaces/components/ui/inputs/editor/base/configs/table.config.js +15 -0
- package/dist/src/client/interfaces/components/ui/inputs/editor/editor.js +112 -0
- package/dist/src/client/interfaces/components/ui/inputs/editor/plugins/asset-manager/asset-manager.js +24 -0
- package/dist/src/client/interfaces/components/ui/inputs/editor/plugins/asset-manager/use-control-asset-mamager.js +26 -0
- package/dist/src/client/interfaces/components/ui/inputs/editor/plugins/word-count-display/icons.js +17 -0
- package/dist/src/client/interfaces/components/ui/inputs/editor/plugins/word-count-display/word-count-display.js +81 -0
- package/dist/src/client/interfaces/components/ui/inputs/editor/use-init-editor/use-init-editor.js +50 -0
- package/dist/src/client/interfaces/pages/auth/change-password/page.js +5 -2
- package/dist/src/client/interfaces/pages/auth/email-unverified/page.js +3 -0
- package/dist/src/client/interfaces/pages/auth/forgot-password/page.js +5 -2
- package/dist/src/client/interfaces/pages/auth/layout.js +3 -0
- package/dist/src/client/interfaces/pages/auth/reset-password/page.js +5 -2
- package/dist/src/client/interfaces/pages/auth/sign-in/page.js +5 -2
- package/dist/src/client/interfaces/pages/dashboard/layout.js +3 -0
- package/dist/src/shared/list-items.js +3 -0
- package/dist/src/shared/utils/debounce.js +14 -0
- package/dist/types/export/client/index.d.ts +1 -1
- package/dist/types/export/client/index.d.ts.map +1 -1
- package/dist/types/src/client/index.d.ts +1 -1
- package/dist/types/src/client/index.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/index.d.ts +2 -1
- package/dist/types/src/client/interfaces/components/index.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/resources/file/file-card.d.ts +16 -0
- package/dist/types/src/client/interfaces/components/resources/file/file-card.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/file/file-list.d.ts +23 -0
- package/dist/types/src/client/interfaces/components/resources/file/file-list.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/file/index.d.ts +3 -0
- package/dist/types/src/client/interfaces/components/resources/file/index.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/file/is-locked-buttons.d.ts +8 -0
- package/dist/types/src/client/interfaces/components/resources/file/is-locked-buttons.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/file/type-buttons.d.ts +9 -0
- package/dist/types/src/client/interfaces/components/resources/file/type-buttons.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/resources/index.d.ts +2 -0
- package/dist/types/src/client/interfaces/components/resources/index.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/cards/resource-card/resource-card.d.ts +1 -1
- package/dist/types/src/client/interfaces/components/ui/cards/resource-card/resource-card.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/ui/features/smart-image.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/ui/form/index-field.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/ui/form/slug-field.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/ui/index.d.ts +1 -1
- package/dist/types/src/client/interfaces/components/ui/index.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/base/base-editor.d.ts +7 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/base/base-editor.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/base/built-in-plugins.d.ts +26 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/base/built-in-plugins.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/base/configs/heading.config.d.ts +34 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/base/configs/heading.config.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/base/configs/image.config.d.ts +16 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/base/configs/image.config.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/base/configs/index.d.ts +4 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/base/configs/index.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/base/configs/table.config.d.ts +4 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/base/configs/table.config.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/base/index.d.ts +2 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/base/index.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/editor.d.ts +26 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/editor.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/index.d.ts +2 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/index.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/plugins/asset-manager/asset-manager.d.ts +8 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/plugins/asset-manager/asset-manager.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/plugins/asset-manager/index.d.ts +3 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/plugins/asset-manager/index.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/plugins/asset-manager/use-control-asset-mamager.d.ts +14 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/plugins/asset-manager/use-control-asset-mamager.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/plugins/file-repository/index.d.ts +2 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/plugins/file-repository/index.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/plugins/file-repository/upload-adapter.d.ts +28 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/plugins/file-repository/upload-adapter.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/plugins/word-count-display/icons.d.ts +4 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/plugins/word-count-display/icons.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/plugins/word-count-display/index.d.ts +2 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/plugins/word-count-display/index.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/plugins/word-count-display/word-count-display.d.ts +11 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/plugins/word-count-display/word-count-display.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/use-init-editor/index.d.ts +3 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/use-init-editor/index.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/use-init-editor/types.d.ts +14 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/use-init-editor/types.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/use-init-editor/use-init-editor.d.ts +4 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/editor/use-init-editor/use-init-editor.d.ts.map +1 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/index.d.ts +1 -0
- package/dist/types/src/client/interfaces/components/ui/inputs/index.d.ts.map +1 -1
- package/dist/types/src/client/interfaces/index.d.ts +1 -1
- package/dist/types/src/client/interfaces/index.d.ts.map +1 -1
- package/dist/types/src/shared/index.d.ts +1 -1
- package/dist/types/src/shared/index.d.ts.map +1 -1
- package/dist/types/src/shared/utils/debounce.d.ts +7 -0
- package/dist/types/src/shared/utils/debounce.d.ts.map +1 -0
- package/dist/types/src/shared/utils/index.d.ts +1 -0
- package/dist/types/src/shared/utils/index.d.ts.map +1 -1
- package/package.json +8 -2
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
@import "ckeditor5/ckeditor5-editor.css";
|
|
2
|
+
|
|
3
|
+
/*============================================================
|
|
4
|
+
| Basic
|
|
5
|
+
============================================================*/
|
|
6
|
+
.ck-editor {
|
|
7
|
+
min-width: 100% !important;
|
|
8
|
+
}
|
|
9
|
+
.ck-powered-by-balloon,
|
|
10
|
+
.ck-powered-by {
|
|
11
|
+
display: none !important;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/*====== Editable Area & Source Editing Area ======*/
|
|
15
|
+
.ck-editor__main > .ck-editor__editable,
|
|
16
|
+
.ck-editor__main > .ck-source-editing-area,
|
|
17
|
+
.ck-editor__main > .ck-source-editing-area > textarea {
|
|
18
|
+
min-height: calc(var(--spacing) * 64) !important;
|
|
19
|
+
border-bottom-right-radius: var(--radius-lg) !important;
|
|
20
|
+
border-bottom-left-radius: var(--radius-lg) !important;
|
|
21
|
+
background-color: var(--color-background) !important;
|
|
22
|
+
color: var(--color-primary) !important;
|
|
23
|
+
border-style: none !important;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/*====== Nested Editable (Table, Image Widget) ======*/
|
|
27
|
+
.ck-editor__nested-editable {
|
|
28
|
+
border-color: var(--color-ring) !important;
|
|
29
|
+
min-height: calc(var(--spacing) * 0) !important;
|
|
30
|
+
overflow-x: hidden !important;
|
|
31
|
+
border-radius: 0 !important;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/*====== Table ======*/
|
|
35
|
+
.ck-insert-table-dropdown-grid-box {
|
|
36
|
+
border-color: var(--color-ring) !important;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/*====== Sticky Panel (Toolbar) ======*/
|
|
40
|
+
.ck-sticky-panel__content {
|
|
41
|
+
border-color: transparent !important;
|
|
42
|
+
border-bottom-width: 1px !important;
|
|
43
|
+
border-bottom-color: var(--color-border) !important;
|
|
44
|
+
}
|
|
45
|
+
.ck-rounded-corners .ck.ck-toolbar,
|
|
46
|
+
.ck.ck-toolbar.ck-rounded-corners {
|
|
47
|
+
border-radius: var(--radius-lg);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/*====== Hide Duplicated Editor (In dev mode) ======*/
|
|
51
|
+
.ck-editor + .ck-editor {
|
|
52
|
+
display: none !important;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/*====== Word Count Display ======*/
|
|
56
|
+
.ck .word-count-display {
|
|
57
|
+
border-style: none !important;
|
|
58
|
+
}
|
|
59
|
+
.ck .word-count-display-html {
|
|
60
|
+
margin-left: auto;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/*============================================================
|
|
64
|
+
| CKEditor Interface Variables
|
|
65
|
+
============================================================*/
|
|
66
|
+
:root {
|
|
67
|
+
/*====== color ======*/
|
|
68
|
+
--ck-content-font-color: currentColor;
|
|
69
|
+
/*====== border-radius ======*/
|
|
70
|
+
--ck-border-radius: 4px;
|
|
71
|
+
/*====== font-size-base ======*/
|
|
72
|
+
--ck-font-size-base: 13px;
|
|
73
|
+
|
|
74
|
+
/*====== custom color variables ======*/
|
|
75
|
+
--ck-custom-background: var(--color-background);
|
|
76
|
+
--ck-custom-foreground: var(--color-primary);
|
|
77
|
+
--ck-custom-secondary: var(--color-secondary);
|
|
78
|
+
--ck-custom-border: var(--color-ring);
|
|
79
|
+
--ck-custom-white: hsl(0, 0%, 100%);
|
|
80
|
+
|
|
81
|
+
/*====== generic colors ======*/
|
|
82
|
+
--ck-color-base-background: var(--ck-custom-foreground);
|
|
83
|
+
--ck-color-base-foreground: var(--ck-custom-background);
|
|
84
|
+
--ck-color-focus-border: var(--ck-custom-border);
|
|
85
|
+
--ck-color-text: var(--ck-custom-foreground);
|
|
86
|
+
--ck-color-shadow-drop: hsla(0, 0%, 0%, 0.2);
|
|
87
|
+
--ck-color-shadow-inner: hsla(0, 0%, 0%, 0.1);
|
|
88
|
+
--ck-color-base-border: transparent;
|
|
89
|
+
|
|
90
|
+
/*====== [.ck-toolbar] toolbar ======*/
|
|
91
|
+
--ck-color-toolbar-background: var(--ck-custom-background);
|
|
92
|
+
--ck-color-toolbar-border: var(--ck-custom-border);
|
|
93
|
+
|
|
94
|
+
/*====== [.ck-tooltip] tooltip ======*/
|
|
95
|
+
--ck-color-tooltip-background: hsl(252, 7%, 30%);
|
|
96
|
+
--ck-color-tooltip-text: var(--ck-custom-white);
|
|
97
|
+
|
|
98
|
+
/*====== [.ck-button] button-default ======*/
|
|
99
|
+
--ck-color-button-default-background: var(--ck-custom-background);
|
|
100
|
+
--ck-color-button-default-hover-background: var(--ck-custom-secondary);
|
|
101
|
+
--ck-color-button-default-active-background: none;
|
|
102
|
+
--ck-color-button-default-active-shadow: hsl(270, 2%, 23%);
|
|
103
|
+
--ck-color-button-default-disabled-background: var(--ck-custom-background);
|
|
104
|
+
|
|
105
|
+
/*====== [.ck-button] button-on ======*/
|
|
106
|
+
--ck-color-button-on-color: var(--color-success); /* Active text */
|
|
107
|
+
--ck-color-button-on-background: var(--ck-custom-secondary);
|
|
108
|
+
--ck-color-button-on-hover-background: var(--ck-custom-secondary);
|
|
109
|
+
--ck-color-button-on-active-background: var(--ck-custom-secondary);
|
|
110
|
+
--ck-color-button-on-active-shadow: hsl(240, 3%, 19%);
|
|
111
|
+
--ck-color-button-on-disabled-background: var(--ck-custom-secondary);
|
|
112
|
+
|
|
113
|
+
/*====== [.ck-button] button-action ======*/
|
|
114
|
+
--ck-color-button-action-background: hsl(168, 76%, 42%);
|
|
115
|
+
--ck-color-button-action-hover-background: hsl(168, 76%, 38%);
|
|
116
|
+
--ck-color-button-action-active-background: hsl(168, 76%, 36%);
|
|
117
|
+
--ck-color-button-action-active-shadow: hsl(168, 75%, 34%);
|
|
118
|
+
--ck-color-button-action-disabled-background: hsl(168, 76%, 42%);
|
|
119
|
+
--ck-color-button-action-text: var(--ck-custom-white);
|
|
120
|
+
|
|
121
|
+
/*====== [.ck-button] button-save, button-cancel ======*/
|
|
122
|
+
--ck-color-button-save: var(--color-success);
|
|
123
|
+
--ck-color-button-cancel: var(--color-error);
|
|
124
|
+
|
|
125
|
+
/*====== [.ck-dropdown] dropdown ======*/
|
|
126
|
+
--ck-color-dropdown-panel-background: var(--ck-custom-background);
|
|
127
|
+
--ck-color-dropdown-panel-border: var(--ck-custom-border);
|
|
128
|
+
|
|
129
|
+
/*====== [.ck-dialog] dialog ======*/
|
|
130
|
+
--ck-color-dialog-background: var(--ck-custom-background);
|
|
131
|
+
--ck-color-dialog-form-header-border: var(--ck-custom-border);
|
|
132
|
+
|
|
133
|
+
/*====== [.ck-splitbutton] split-button ======*/
|
|
134
|
+
--ck-color-split-button-hover-background: var(
|
|
135
|
+
--ck-color-button-default-hover-background
|
|
136
|
+
);
|
|
137
|
+
--ck-color-split-button-hover-border: var(--ck-custom-border);
|
|
138
|
+
|
|
139
|
+
/*====== [.ck-input] input ======*/
|
|
140
|
+
--ck-color-input-background: var(--ck-custom-background);
|
|
141
|
+
--ck-color-input-border: hsl(257, 3%, 43%);
|
|
142
|
+
--ck-color-input-text: hsl(0, 0%, 98%);
|
|
143
|
+
--ck-color-input-disabled-background: hsl(255, 4%, 21%);
|
|
144
|
+
--ck-color-input-disabled-border: hsl(250, 3%, 38%);
|
|
145
|
+
--ck-color-input-disabled-text: hsl(0, 0%, 78%);
|
|
146
|
+
|
|
147
|
+
/*====== [.ck-labeled-field-view] labeled-field ======*/
|
|
148
|
+
--ck-color-labeled-field-label-background: var(--ck-custom-background);
|
|
149
|
+
|
|
150
|
+
/*====== [.ck-list] list ======*/
|
|
151
|
+
--ck-color-list-background: var(--ck-custom-background);
|
|
152
|
+
--ck-color-list-button-hover-background: var(--ck-color-base-foreground);
|
|
153
|
+
--ck-color-list-button-on-background: var(--ck-color-base-active);
|
|
154
|
+
--ck-color-list-button-on-background-focus: var(--ck-color-base-active-focus);
|
|
155
|
+
--ck-color-list-button-on-text: var(--ck-color-base-background);
|
|
156
|
+
|
|
157
|
+
/*====== [.ck-balloon-panel] panel ======*/
|
|
158
|
+
--ck-color-panel-background: var(--ck-custom-background);
|
|
159
|
+
--ck-color-panel-border: var(--ck-custom-border);
|
|
160
|
+
|
|
161
|
+
/*====== [ckeditor5-image] image ======*/
|
|
162
|
+
/* --ck-color-image-caption-background: hsl(0, 0%, 97%);
|
|
163
|
+
--ck-color-image-caption-text: hsl(0, 0%, 20%); */
|
|
164
|
+
|
|
165
|
+
/*====== [ ckeditor5-widget] widget ======*/
|
|
166
|
+
--ck-color-widget-blurred-border: hsl(0, 0%, 87%);
|
|
167
|
+
--ck-color-widget-hover-border: hsl(43, 100%, 68%);
|
|
168
|
+
--ck-color-widget-editable-focus-background: var(--ck-custom-white);
|
|
169
|
+
|
|
170
|
+
/*====== [ckeditor5-link] link ======*/
|
|
171
|
+
--ck-color-link-default: var(--color-info);
|
|
172
|
+
}
|
|
@@ -40,6 +40,7 @@ export { SideFields } from '../../src/client/interfaces/components/ui/form/conta
|
|
|
40
40
|
export { IndexField } from '../../src/client/interfaces/components/ui/form/index-field.js';
|
|
41
41
|
export { SlugField } from '../../src/client/interfaces/components/ui/form/slug-field.js';
|
|
42
42
|
export { ControlFields } from '../../src/client/interfaces/components/ui/form/control-fields/control-fields.js';
|
|
43
|
+
export { createEditor } from '../../src/client/interfaces/components/ui/inputs/editor/editor.js';
|
|
43
44
|
export { ArrayInput } from '../../src/client/interfaces/components/ui/inputs/array-input.js';
|
|
44
45
|
export { Checkbox } from '../../src/client/interfaces/components/ui/inputs/checkbox.js';
|
|
45
46
|
export { Input } from '../../src/client/interfaces/components/ui/inputs/input.js';
|
|
@@ -75,6 +76,8 @@ import '@radix-ui/react-tooltip';
|
|
|
75
76
|
export { createNavbar } from '../../src/client/interfaces/components/ui/layouts/navbar/navbar.js';
|
|
76
77
|
export { createI18nSelector } from '../../src/client/interfaces/components/ui/layouts/navbar/i18n-selector.js';
|
|
77
78
|
export { createSignOutButton } from '../../src/client/interfaces/components/ui/layouts/navbar/sign-out-button.js';
|
|
79
|
+
export { createFileCard } from '../../src/client/interfaces/components/resources/file/file-card.js';
|
|
80
|
+
export { createFileList } from '../../src/client/interfaces/components/resources/file/file-list.js';
|
|
78
81
|
export { createSignInPage } from '../../src/client/interfaces/pages/auth/sign-in/page.js';
|
|
79
82
|
export { createVerifyEmailPage } from '../../src/client/interfaces/pages/auth/verify-email/page.js';
|
|
80
83
|
export { createEmailUnverifiedPage } from '../../src/client/interfaces/pages/auth/email-unverified/page.js';
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { useTranslator } from 'intor/react';
|
|
4
|
+
import { Lock, Trash2 } from 'lucide-react';
|
|
5
|
+
import { PATHS } from '../../../../../constants/paths/index.js';
|
|
6
|
+
import '../../../../../constants/redirect-paths.js';
|
|
7
|
+
import '../../../../../domain/resources/admin/constants.js';
|
|
8
|
+
import { isFileLocked } from '../../../../../domain/resources/file/utils/is-file-locked.js';
|
|
9
|
+
import 'mime-types';
|
|
10
|
+
import { findTranslation } from '../../../../../shared/translation/find-translation.js';
|
|
11
|
+
import { joinUrl } from '../../../../../shared/utils/join-url.js';
|
|
12
|
+
import 'react';
|
|
13
|
+
import 'ua-parser-js';
|
|
14
|
+
import { cn } from '../../../../applications/shadcn/utils.js';
|
|
15
|
+
import 'next/navigation';
|
|
16
|
+
import '@radix-ui/react-avatar';
|
|
17
|
+
import '../../shadcn/badge.js';
|
|
18
|
+
import '../../shadcn/button.js';
|
|
19
|
+
import '@radix-ui/react-collapsible';
|
|
20
|
+
import '@radix-ui/react-dialog';
|
|
21
|
+
import '@radix-ui/react-dropdown-menu';
|
|
22
|
+
import '../../shadcn/input-group.js';
|
|
23
|
+
import '@radix-ui/react-label';
|
|
24
|
+
import '@radix-ui/react-select';
|
|
25
|
+
import '@radix-ui/react-separator';
|
|
26
|
+
import '../../shadcn/sidebar.js';
|
|
27
|
+
import '@radix-ui/react-tooltip';
|
|
28
|
+
import 'next/link';
|
|
29
|
+
import { ResourceCard } from '../../ui/cards/resource-card/resource-card.js';
|
|
30
|
+
import 'next/image';
|
|
31
|
+
import 'ckeditor5';
|
|
32
|
+
import 'ckeditor5/translations/en.js';
|
|
33
|
+
import 'ckeditor5/translations/zh.js';
|
|
34
|
+
import '../../../../infrastructure/contexts/admin.js';
|
|
35
|
+
import 'next-themes';
|
|
36
|
+
import '@tanstack/react-query';
|
|
37
|
+
import 'sonner';
|
|
38
|
+
import 'intor/next';
|
|
39
|
+
|
|
40
|
+
const WIDTH = 160;
|
|
41
|
+
const HEIGHT = 160;
|
|
42
|
+
function createFileCard({
|
|
43
|
+
SmartImage,
|
|
44
|
+
storageUrl
|
|
45
|
+
}) {
|
|
46
|
+
return function FileCard({
|
|
47
|
+
file,
|
|
48
|
+
// link
|
|
49
|
+
openNewTab = false,
|
|
50
|
+
anchorProps,
|
|
51
|
+
// base
|
|
52
|
+
className = ""
|
|
53
|
+
}) {
|
|
54
|
+
const { locale } = useTranslator();
|
|
55
|
+
const isImage = file?.type === "IMAGE";
|
|
56
|
+
const isVideo = file?.type === "VIDEO";
|
|
57
|
+
const isLocked = isFileLocked(file);
|
|
58
|
+
const isTrash = file?.deletedAt;
|
|
59
|
+
const translation = findTranslation(file?.translations, locale);
|
|
60
|
+
return /* @__PURE__ */ jsx(
|
|
61
|
+
ResourceCard,
|
|
62
|
+
{
|
|
63
|
+
className,
|
|
64
|
+
style: { width: `${WIDTH}px`, height: `${HEIGHT}px` },
|
|
65
|
+
href: `${PATHS.resources.file.path}/${file?.id}`,
|
|
66
|
+
openNewTab,
|
|
67
|
+
anchorProps,
|
|
68
|
+
cardStatusBarProps: {
|
|
69
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex w-full justify-between", children: [
|
|
70
|
+
isLocked && /* @__PURE__ */ jsx(Lock, { className: "size-5" }),
|
|
71
|
+
isTrash && /* @__PURE__ */ jsx(Trash2, { className: "text-error size-5" })
|
|
72
|
+
] })
|
|
73
|
+
},
|
|
74
|
+
cardTextContentProps: { title: translation?.name },
|
|
75
|
+
children: /* @__PURE__ */ jsx(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
className: cn("flex-center flex-1", "overflow-hidden", "transition"),
|
|
79
|
+
children: isImage ? /* @__PURE__ */ jsx(SmartImage, { fileKey: file.key, width: WIDTH, height: HEIGHT }) : isVideo ? /* @__PURE__ */ jsx("video", { src: joinUrl(storageUrl, file.key), autoPlay: true, loop: true, muted: true }) : /* @__PURE__ */ jsx("span", { className: cn("scale-[3]", "transition"), children: "\u{1F4C4}" })
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export { createFileCard };
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { useState, useMemo, useEffect } from 'react';
|
|
4
|
+
import '../../../../../constants/paths/auth.js';
|
|
5
|
+
import '../../../../../constants/paths/main.js';
|
|
6
|
+
import '../../../../../constants/paths/resources.js';
|
|
7
|
+
import { CACHE_KEYS } from '../../../../../constants/cache-keys.js';
|
|
8
|
+
import '../../../../../constants/redirect-paths.js';
|
|
9
|
+
import 'mime-types';
|
|
10
|
+
import { debounce } from '../../../../../shared/utils/debounce.js';
|
|
11
|
+
import { ensureArray } from '../../../../../shared/utils/ensure-array.js';
|
|
12
|
+
import { DO_NOT_FETCH_KEY } from '../../../../../shared/list-items.js';
|
|
13
|
+
import 'ua-parser-js';
|
|
14
|
+
import { cn } from '../../../../applications/shadcn/utils.js';
|
|
15
|
+
import 'next/navigation';
|
|
16
|
+
import '@radix-ui/react-avatar';
|
|
17
|
+
import '../../shadcn/badge.js';
|
|
18
|
+
import '../../shadcn/button.js';
|
|
19
|
+
import '@radix-ui/react-collapsible';
|
|
20
|
+
import '@radix-ui/react-dialog';
|
|
21
|
+
import 'lucide-react';
|
|
22
|
+
import '@radix-ui/react-dropdown-menu';
|
|
23
|
+
import '../../shadcn/input-group.js';
|
|
24
|
+
import '@radix-ui/react-label';
|
|
25
|
+
import '@radix-ui/react-select';
|
|
26
|
+
import { Separator } from '../../shadcn/separator.js';
|
|
27
|
+
import '../../shadcn/sidebar.js';
|
|
28
|
+
import '@radix-ui/react-tooltip';
|
|
29
|
+
import 'intor/react';
|
|
30
|
+
import { ListCardsContainer } from '../../ui/blocks/list-cards-container/list-cards-container.js';
|
|
31
|
+
import 'next/link';
|
|
32
|
+
import '../../../../../domain/resources/admin/constants.js';
|
|
33
|
+
import 'next/image';
|
|
34
|
+
import { Tick } from '../../ui/features/tick.js';
|
|
35
|
+
import 'ckeditor5';
|
|
36
|
+
import 'ckeditor5/translations/en.js';
|
|
37
|
+
import 'ckeditor5/translations/zh.js';
|
|
38
|
+
import '../../../../infrastructure/contexts/admin.js';
|
|
39
|
+
import 'next-themes';
|
|
40
|
+
import '@tanstack/react-query';
|
|
41
|
+
import 'sonner';
|
|
42
|
+
import 'intor/next';
|
|
43
|
+
import { IsLockedButtons } from './is-locked-buttons.js';
|
|
44
|
+
import { TypeButtons } from './type-buttons.js';
|
|
45
|
+
|
|
46
|
+
function createFileList({
|
|
47
|
+
useQuery,
|
|
48
|
+
fileFindListCardsAction,
|
|
49
|
+
FileCard
|
|
50
|
+
}) {
|
|
51
|
+
return function FileList({
|
|
52
|
+
setItemStates,
|
|
53
|
+
// search
|
|
54
|
+
folderId,
|
|
55
|
+
// Use in File Manager, Folder page
|
|
56
|
+
isDeleted,
|
|
57
|
+
// Use in Trash Page
|
|
58
|
+
fileIds,
|
|
59
|
+
// link
|
|
60
|
+
openNewTab = false,
|
|
61
|
+
// pick
|
|
62
|
+
pickedItems,
|
|
63
|
+
handleClick
|
|
64
|
+
}) {
|
|
65
|
+
const [page, setPage] = useState(1);
|
|
66
|
+
const [pageSize, setPageSize] = useState(20);
|
|
67
|
+
const [searchString, setSearchString] = useState("");
|
|
68
|
+
const debouncedSetSearchString = useMemo(
|
|
69
|
+
() => debounce((v) => setSearchString(v), 300),
|
|
70
|
+
[]
|
|
71
|
+
);
|
|
72
|
+
const [type, setType] = useState(null);
|
|
73
|
+
const [isLocked, setIsLocked] = useState(null);
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
setPage(1);
|
|
76
|
+
}, [setPage, type, isLocked]);
|
|
77
|
+
const { data, isFetching, refetch } = useQuery(
|
|
78
|
+
() => fileFindListCardsAction({
|
|
79
|
+
page,
|
|
80
|
+
pageSize,
|
|
81
|
+
searchString,
|
|
82
|
+
type,
|
|
83
|
+
isLocked,
|
|
84
|
+
...folderId && { folderId },
|
|
85
|
+
...isDeleted && { isDeleted },
|
|
86
|
+
// Use in Trash
|
|
87
|
+
...fileIds && { fileIds }
|
|
88
|
+
}),
|
|
89
|
+
[
|
|
90
|
+
CACHE_KEYS.findListCards("file"),
|
|
91
|
+
page,
|
|
92
|
+
pageSize,
|
|
93
|
+
searchString,
|
|
94
|
+
type,
|
|
95
|
+
isLocked,
|
|
96
|
+
folderId,
|
|
97
|
+
isDeleted,
|
|
98
|
+
JSON.stringify(fileIds)
|
|
99
|
+
],
|
|
100
|
+
{ enabled: folderId !== DO_NOT_FETCH_KEY }
|
|
101
|
+
// Use in File Manager
|
|
102
|
+
);
|
|
103
|
+
const files = useMemo(() => ensureArray(data?.items), [data?.items]);
|
|
104
|
+
useEffect(() => {
|
|
105
|
+
setItemStates?.({
|
|
106
|
+
items: files,
|
|
107
|
+
count: data?.total ?? 0,
|
|
108
|
+
isFetching,
|
|
109
|
+
refetch
|
|
110
|
+
});
|
|
111
|
+
}, [files, data?.total, isFetching, setItemStates]);
|
|
112
|
+
return /* @__PURE__ */ jsx(
|
|
113
|
+
ListCardsContainer,
|
|
114
|
+
{
|
|
115
|
+
page,
|
|
116
|
+
setPage,
|
|
117
|
+
pageSize,
|
|
118
|
+
setPageSize,
|
|
119
|
+
total: data?.total ?? 0,
|
|
120
|
+
searchString,
|
|
121
|
+
setSearchString: debouncedSetSearchString,
|
|
122
|
+
isFetching,
|
|
123
|
+
headerChildren: /* @__PURE__ */ jsxs("div", { className: "flex gap-4", children: [
|
|
124
|
+
/* @__PURE__ */ jsx(TypeButtons, { type: type || null, setType }),
|
|
125
|
+
/* @__PURE__ */ jsx("div", { className: "py-1", children: /* @__PURE__ */ jsx(Separator, { orientation: "vertical" }) }),
|
|
126
|
+
/* @__PURE__ */ jsx(IsLockedButtons, { isLocked, setIsLocked })
|
|
127
|
+
] }),
|
|
128
|
+
children: files.map((file) => {
|
|
129
|
+
const isPicked = pickedItems?.some((item) => item.id === file.id);
|
|
130
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative w-fit", children: [
|
|
131
|
+
/* @__PURE__ */ jsx(
|
|
132
|
+
FileCard,
|
|
133
|
+
{
|
|
134
|
+
file,
|
|
135
|
+
openNewTab,
|
|
136
|
+
className: cn(pickedItems && !isPicked && "opacity-50"),
|
|
137
|
+
anchorProps: handleClick && {
|
|
138
|
+
onClick: (e) => {
|
|
139
|
+
e.preventDefault();
|
|
140
|
+
handleClick(file);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
),
|
|
145
|
+
pickedItems && /* @__PURE__ */ jsx(
|
|
146
|
+
Tick,
|
|
147
|
+
{
|
|
148
|
+
isPicked: isPicked ?? false,
|
|
149
|
+
className: "absolute top-2 right-2"
|
|
150
|
+
}
|
|
151
|
+
)
|
|
152
|
+
] }, file.id);
|
|
153
|
+
})
|
|
154
|
+
}
|
|
155
|
+
);
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export { createFileList };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useTranslator } from 'intor/react';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'ua-parser-js';
|
|
5
|
+
import { cn } from '../../../../applications/shadcn/utils.js';
|
|
6
|
+
import 'next/navigation';
|
|
7
|
+
import 'lucide-react';
|
|
8
|
+
import '@radix-ui/react-avatar';
|
|
9
|
+
import '../../shadcn/badge.js';
|
|
10
|
+
import '../../shadcn/button.js';
|
|
11
|
+
import '@radix-ui/react-collapsible';
|
|
12
|
+
import '@radix-ui/react-dialog';
|
|
13
|
+
import '@radix-ui/react-dropdown-menu';
|
|
14
|
+
import '../../shadcn/input-group.js';
|
|
15
|
+
import '@radix-ui/react-label';
|
|
16
|
+
import '@radix-ui/react-select';
|
|
17
|
+
import '@radix-ui/react-separator';
|
|
18
|
+
import '../../shadcn/sidebar.js';
|
|
19
|
+
import '@radix-ui/react-tooltip';
|
|
20
|
+
import { Button } from '../../ui/buttons/button.js';
|
|
21
|
+
import 'next/link';
|
|
22
|
+
import '../../../../../constants/paths/auth.js';
|
|
23
|
+
import '../../../../../constants/paths/main.js';
|
|
24
|
+
import '../../../../../constants/paths/resources.js';
|
|
25
|
+
import '../../../../../constants/redirect-paths.js';
|
|
26
|
+
import 'mime-types';
|
|
27
|
+
import '../../../../../domain/resources/admin/constants.js';
|
|
28
|
+
import 'next/image';
|
|
29
|
+
import 'ckeditor5';
|
|
30
|
+
import 'ckeditor5/translations/en.js';
|
|
31
|
+
import 'ckeditor5/translations/zh.js';
|
|
32
|
+
import '../../../../infrastructure/contexts/admin.js';
|
|
33
|
+
import 'next-themes';
|
|
34
|
+
import '@tanstack/react-query';
|
|
35
|
+
import 'sonner';
|
|
36
|
+
import 'intor/next';
|
|
37
|
+
|
|
38
|
+
function IsLockedButtons({
|
|
39
|
+
isLocked,
|
|
40
|
+
setIsLocked
|
|
41
|
+
}) {
|
|
42
|
+
const { t } = useTranslator();
|
|
43
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex h-fit gap-3", children: [
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
|
+
Button,
|
|
46
|
+
{
|
|
47
|
+
type: "button",
|
|
48
|
+
size: "sm",
|
|
49
|
+
variant: "secondary",
|
|
50
|
+
onClick: () => {
|
|
51
|
+
setIsLocked(isLocked === true ? null : true);
|
|
52
|
+
},
|
|
53
|
+
className: cn(isLocked !== true ? "opacity-35" : "shadow"),
|
|
54
|
+
children: t("resources.file.locked.text")
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
/* @__PURE__ */ jsx(
|
|
58
|
+
Button,
|
|
59
|
+
{
|
|
60
|
+
type: "button",
|
|
61
|
+
size: "sm",
|
|
62
|
+
variant: "secondary",
|
|
63
|
+
onClick: () => setIsLocked(isLocked === false ? null : false),
|
|
64
|
+
className: cn(isLocked !== false ? "opacity-35" : "shadow"),
|
|
65
|
+
children: t("resources.file.not-locked.text")
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
] });
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { IsLockedButtons };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useTranslator } from 'intor/react';
|
|
3
|
+
import '../../../../../domain/resources/admin/constants.js';
|
|
4
|
+
import { FILE_TYPES } from '../../../../../domain/resources/file/props.js';
|
|
5
|
+
import 'react';
|
|
6
|
+
import 'ua-parser-js';
|
|
7
|
+
import { cn } from '../../../../applications/shadcn/utils.js';
|
|
8
|
+
import 'next/navigation';
|
|
9
|
+
import 'lucide-react';
|
|
10
|
+
import '@radix-ui/react-avatar';
|
|
11
|
+
import '../../shadcn/badge.js';
|
|
12
|
+
import '../../shadcn/button.js';
|
|
13
|
+
import '@radix-ui/react-collapsible';
|
|
14
|
+
import '@radix-ui/react-dialog';
|
|
15
|
+
import '@radix-ui/react-dropdown-menu';
|
|
16
|
+
import '../../shadcn/input-group.js';
|
|
17
|
+
import '@radix-ui/react-label';
|
|
18
|
+
import '@radix-ui/react-select';
|
|
19
|
+
import '@radix-ui/react-separator';
|
|
20
|
+
import '../../shadcn/sidebar.js';
|
|
21
|
+
import '@radix-ui/react-tooltip';
|
|
22
|
+
import { Button } from '../../ui/buttons/button.js';
|
|
23
|
+
import 'next/link';
|
|
24
|
+
import '../../../../../constants/paths/auth.js';
|
|
25
|
+
import '../../../../../constants/paths/main.js';
|
|
26
|
+
import '../../../../../constants/paths/resources.js';
|
|
27
|
+
import '../../../../../constants/redirect-paths.js';
|
|
28
|
+
import 'mime-types';
|
|
29
|
+
import 'next/image';
|
|
30
|
+
import 'ckeditor5';
|
|
31
|
+
import 'ckeditor5/translations/en.js';
|
|
32
|
+
import 'ckeditor5/translations/zh.js';
|
|
33
|
+
import '../../../../infrastructure/contexts/admin.js';
|
|
34
|
+
import 'next-themes';
|
|
35
|
+
import '@tanstack/react-query';
|
|
36
|
+
import 'sonner';
|
|
37
|
+
import 'intor/next';
|
|
38
|
+
|
|
39
|
+
function TypeButtons({ type, setType }) {
|
|
40
|
+
const { t } = useTranslator();
|
|
41
|
+
const handleClick = (fileType) => {
|
|
42
|
+
if (fileType === type) {
|
|
43
|
+
setType(null);
|
|
44
|
+
} else {
|
|
45
|
+
setType(fileType);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
return /* @__PURE__ */ jsx("div", { className: "flex h-fit gap-3", children: Object.values(FILE_TYPES).map((fileType) => /* @__PURE__ */ jsx(
|
|
49
|
+
Button,
|
|
50
|
+
{
|
|
51
|
+
type: "button",
|
|
52
|
+
size: "sm",
|
|
53
|
+
variant: "secondary",
|
|
54
|
+
onClick: () => handleClick(fileType),
|
|
55
|
+
className: cn(fileType !== type ? "opacity-35" : "shadow"),
|
|
56
|
+
children: t(`resources.file.file-type.${fileType.toLowerCase()}.text`)
|
|
57
|
+
},
|
|
58
|
+
fileType
|
|
59
|
+
)) });
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { TypeButtons };
|
package/dist/src/client/interfaces/components/ui/blocks/list-cards-container/list-cards-container.js
CHANGED
|
@@ -20,6 +20,17 @@ import '@radix-ui/react-separator';
|
|
|
20
20
|
import '../../../shadcn/sidebar.js';
|
|
21
21
|
import { Spinner } from '../../../shadcn/spinner.js';
|
|
22
22
|
import '@radix-ui/react-tooltip';
|
|
23
|
+
import 'next/link';
|
|
24
|
+
import '../../../../../../constants/paths/auth.js';
|
|
25
|
+
import '../../../../../../constants/paths/main.js';
|
|
26
|
+
import '../../../../../../constants/paths/resources.js';
|
|
27
|
+
import '../../../../../../constants/redirect-paths.js';
|
|
28
|
+
import 'mime-types';
|
|
29
|
+
import '../../../../../../domain/resources/admin/constants.js';
|
|
30
|
+
import 'next/image';
|
|
31
|
+
import 'ckeditor5';
|
|
32
|
+
import 'ckeditor5/translations/en.js';
|
|
33
|
+
import 'ckeditor5/translations/zh.js';
|
|
23
34
|
import { SearchInput } from '../../inputs/search-input.js';
|
|
24
35
|
import { PageSizeSelector } from './page-size-selector.js';
|
|
25
36
|
import { Pagination } from './pagination.js';
|
package/dist/src/client/interfaces/components/ui/blocks/list-cards-container/page-size-selector.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useTranslator } from 'intor/react';
|
|
4
|
-
import 'lucide-react';
|
|
5
4
|
import 'react';
|
|
6
5
|
import 'ua-parser-js';
|
|
7
6
|
import 'clsx';
|
|
8
7
|
import 'tailwind-merge';
|
|
9
8
|
import 'next/navigation';
|
|
9
|
+
import 'lucide-react';
|
|
10
10
|
import '@radix-ui/react-avatar';
|
|
11
11
|
import '../../../shadcn/badge.js';
|
|
12
12
|
import '../../../shadcn/button.js';
|
|
@@ -19,6 +19,17 @@ import '@radix-ui/react-select';
|
|
|
19
19
|
import '@radix-ui/react-separator';
|
|
20
20
|
import '../../../shadcn/sidebar.js';
|
|
21
21
|
import '@radix-ui/react-tooltip';
|
|
22
|
+
import 'next/link';
|
|
23
|
+
import '../../../../../../constants/paths/auth.js';
|
|
24
|
+
import '../../../../../../constants/paths/main.js';
|
|
25
|
+
import '../../../../../../constants/paths/resources.js';
|
|
26
|
+
import '../../../../../../constants/redirect-paths.js';
|
|
27
|
+
import 'mime-types';
|
|
28
|
+
import '../../../../../../domain/resources/admin/constants.js';
|
|
29
|
+
import 'next/image';
|
|
30
|
+
import 'ckeditor5';
|
|
31
|
+
import 'ckeditor5/translations/en.js';
|
|
32
|
+
import 'ckeditor5/translations/zh.js';
|
|
22
33
|
import { Select, Option } from '../../inputs/select.js';
|
|
23
34
|
|
|
24
35
|
function PageSizeSelector({
|
|
@@ -58,7 +58,7 @@ function ActionButtonsCard({
|
|
|
58
58
|
useConfirm: true,
|
|
59
59
|
useIcon: false,
|
|
60
60
|
replaceParent: true,
|
|
61
|
-
className: "
|
|
61
|
+
className: "min-w-[128px]",
|
|
62
62
|
...cancelButtonProps,
|
|
63
63
|
children: t("ui.button.cancel.text")
|
|
64
64
|
}
|
|
@@ -71,7 +71,7 @@ function ActionButtonsCard({
|
|
|
71
71
|
variant,
|
|
72
72
|
isLoading: isProcessing,
|
|
73
73
|
isDisabled: isInitializing,
|
|
74
|
-
className: "
|
|
74
|
+
className: "min-w-[126px]",
|
|
75
75
|
...actionButtonProps,
|
|
76
76
|
children
|
|
77
77
|
}
|
|
@@ -36,14 +36,14 @@ function createSmartImage(storageUrl) {
|
|
|
36
36
|
fill ? "relative size-full" : "relative inline-block",
|
|
37
37
|
className
|
|
38
38
|
),
|
|
39
|
-
children: /* @__PURE__ */ jsx(
|
|
39
|
+
children: resolvedSrc && /* @__PURE__ */ jsx(
|
|
40
40
|
Image,
|
|
41
41
|
{
|
|
42
42
|
sizes: resolvedSizes,
|
|
43
43
|
fill: !isFixedSize && fill,
|
|
44
44
|
...isFixedSize && { width, height },
|
|
45
45
|
...resolvedPlaceholder && { placeholder: resolvedPlaceholder },
|
|
46
|
-
src: resolvedSrc
|
|
46
|
+
src: resolvedSrc,
|
|
47
47
|
alt,
|
|
48
48
|
className: cn("size-full object-cover", imageClassName),
|
|
49
49
|
...props
|