@vira-ui/cli 3.0.0 → 9.0.0
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/index.js +12 -12
- package/dist/react/envExample.js +1 -1
- package/dist/react/envLocal.js +1 -1
- package/dist/react/indexHtml.js +1 -1
- package/dist/react/kanbanAppTsx.js +1 -1
- package/dist/react/kanbanBoard.js +1 -1
- package/dist/react/kanbanCard.js +3 -3
- package/dist/react/kanbanColumn.js +2 -2
- package/dist/react/viteConfig.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -901,7 +901,7 @@ function buildComponentBody(name, vrpConfig, props, hasProps, useViraUI) {
|
|
|
901
901
|
// import { watch, signal } from '@vira-ui/core';
|
|
902
902
|
// const [editValue, setEditValue] = signal('');
|
|
903
903
|
// watch(() => editValue(), (newValue) => {
|
|
904
|
-
// sendDiff({ [field]: newValue, updated_at:
|
|
904
|
+
// sendDiff({ [field]: newValue, updated_at: getLocalISOString() });
|
|
905
905
|
// }, { debounce: 500 });
|
|
906
906
|
|
|
907
907
|
return createElement('div', { className: '${name.toLowerCase()}' },
|
|
@@ -954,7 +954,7 @@ async function generateComponent(name, dir, config) {
|
|
|
954
954
|
if (vrpConfig) {
|
|
955
955
|
const typeName = vrpConfig.stateType.replace('State', '');
|
|
956
956
|
componentCode += `// TODO: Если у вас есть синхронизированные типы из backend, используйте их:
|
|
957
|
-
// import type { ${typeName} } from '
|
|
957
|
+
// import type { ${typeName} } from '@/vira-types';
|
|
958
958
|
// export type ${vrpConfig.stateType} = ${typeName};
|
|
959
959
|
|
|
960
960
|
export interface ${vrpConfig.stateType} {
|
|
@@ -1043,7 +1043,7 @@ import { createService, useService, batch } from '@vira-ui/core';
|
|
|
1043
1043
|
import { useViraState } from '@vira-ui/react';
|
|
1044
1044
|
import { v4 as uuid } from 'uuid';
|
|
1045
1045
|
// TODO: Если у вас есть синхронизированные типы из backend, используйте их:
|
|
1046
|
-
// import type { ${typeName} } from '
|
|
1046
|
+
// import type { ${typeName} } from '@/vira-types';
|
|
1047
1047
|
// export type ${vrpConfig.stateType} = ${typeName};
|
|
1048
1048
|
|
|
1049
1049
|
export interface ${vrpConfig.stateType} {
|
|
@@ -1091,12 +1091,12 @@ export function use${name}(id?: string) {
|
|
|
1091
1091
|
const newItem: ${vrpConfig.stateType} = {
|
|
1092
1092
|
...item,
|
|
1093
1093
|
id: itemId,
|
|
1094
|
-
created_at:
|
|
1095
|
-
updated_at:
|
|
1094
|
+
created_at: getLocalISOString(),
|
|
1095
|
+
updated_at: getLocalISOString(),
|
|
1096
1096
|
} as ${vrpConfig.stateType};
|
|
1097
1097
|
sendEvent('${lowerName}.created', {
|
|
1098
1098
|
...newItem,
|
|
1099
|
-
timestamp:
|
|
1099
|
+
timestamp: getLocalISOString()
|
|
1100
1100
|
});
|
|
1101
1101
|
},
|
|
1102
1102
|
// Update operations
|
|
@@ -1104,15 +1104,15 @@ export function use${name}(id?: string) {
|
|
|
1104
1104
|
sendDiff(updates);
|
|
1105
1105
|
sendEvent('${lowerName}.updated', {
|
|
1106
1106
|
...updates,
|
|
1107
|
-
updated_at:
|
|
1108
|
-
timestamp:
|
|
1107
|
+
updated_at: getLocalISOString(),
|
|
1108
|
+
timestamp: getLocalISOString()
|
|
1109
1109
|
});
|
|
1110
1110
|
},
|
|
1111
1111
|
// Delete operation
|
|
1112
1112
|
delete(itemId: string) {
|
|
1113
1113
|
sendEvent('${lowerName}.deleted', {
|
|
1114
1114
|
id: itemId,
|
|
1115
|
-
timestamp:
|
|
1115
|
+
timestamp: getLocalISOString()
|
|
1116
1116
|
});
|
|
1117
1117
|
},
|
|
1118
1118
|
sendEvent,
|
|
@@ -1137,8 +1137,8 @@ createService('${lowerName}Bulk', () => ({
|
|
|
1137
1137
|
sendEvent('${lowerName}.updated', {
|
|
1138
1138
|
id,
|
|
1139
1139
|
...payload,
|
|
1140
|
-
updated_at:
|
|
1141
|
-
timestamp:
|
|
1140
|
+
updated_at: getLocalISOString(),
|
|
1141
|
+
timestamp: getLocalISOString()
|
|
1142
1142
|
});
|
|
1143
1143
|
});
|
|
1144
1144
|
});
|
|
@@ -1149,7 +1149,7 @@ createService('${lowerName}Bulk', () => ({
|
|
|
1149
1149
|
ids.forEach(id => {
|
|
1150
1150
|
sendEvent('${lowerName}.deleted', {
|
|
1151
1151
|
id,
|
|
1152
|
-
timestamp:
|
|
1152
|
+
timestamp: getLocalISOString()
|
|
1153
1153
|
});
|
|
1154
1154
|
});
|
|
1155
1155
|
});
|
package/dist/react/envExample.js
CHANGED
package/dist/react/envLocal.js
CHANGED
package/dist/react/indexHtml.js
CHANGED
|
@@ -23,7 +23,7 @@ export function KanbanBoard({ boardId }: KanbanBoardProps) {
|
|
|
23
23
|
|
|
24
24
|
return (
|
|
25
25
|
<Container design={{ padding: 6, height: '100vh', display: 'flex', flexDirection: 'column' }}>
|
|
26
|
-
<Box
|
|
26
|
+
<Box>
|
|
27
27
|
<Input
|
|
28
28
|
model={\`kanban.\${boardId}.title\`}
|
|
29
29
|
value={board.board.title}
|
package/dist/react/kanbanCard.js
CHANGED
|
@@ -17,7 +17,7 @@ export function KanbanCard({ card, boardId }: KanbanCardProps) {
|
|
|
17
17
|
return (
|
|
18
18
|
<Card
|
|
19
19
|
design={{
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
cursor: 'pointer',
|
|
22
22
|
padding: 3,
|
|
23
23
|
}}
|
|
@@ -25,11 +25,11 @@ export function KanbanCard({ card, boardId }: KanbanCardProps) {
|
|
|
25
25
|
// Open card details (future: modal)
|
|
26
26
|
}}
|
|
27
27
|
>
|
|
28
|
-
<Text design={{ fontWeight: 600, fontSize: '14px',
|
|
28
|
+
<Text design={{ fontWeight: 600, fontSize: '14px', }}>
|
|
29
29
|
{card.title}
|
|
30
30
|
</Text>
|
|
31
31
|
{card.description && (
|
|
32
|
-
<Text design={{ fontSize: '12px', color: '#666',
|
|
32
|
+
<Text design={{ fontSize: '12px', color: '#666', }}>
|
|
33
33
|
{card.description}
|
|
34
34
|
</Text>
|
|
35
35
|
)}
|
|
@@ -35,13 +35,13 @@ export function KanbanColumn({ column, boardId }: KanbanColumnProps) {
|
|
|
35
35
|
flexDirection: 'column',
|
|
36
36
|
}}
|
|
37
37
|
>
|
|
38
|
-
<Text design={{ fontWeight: 600, fontSize: '16px',
|
|
38
|
+
<Text design={{ fontWeight: 600, fontSize: '16px', }}>
|
|
39
39
|
{column.title}
|
|
40
40
|
</Text>
|
|
41
41
|
<ScrollArea
|
|
42
42
|
design={{
|
|
43
43
|
flex: 1,
|
|
44
|
-
|
|
44
|
+
|
|
45
45
|
}}
|
|
46
46
|
>
|
|
47
47
|
<Flex direction="column" gap={2}>
|
package/dist/react/viteConfig.js
CHANGED
|
@@ -6,7 +6,7 @@ import react from '@vitejs/plugin-react';
|
|
|
6
6
|
|
|
7
7
|
export default defineConfig(({ mode }) => {
|
|
8
8
|
const env = loadEnv(mode, process.cwd(), '');
|
|
9
|
-
const API_URL = env.VITE_API_URL || 'http://
|
|
9
|
+
const API_URL = env.VITE_API_URL || 'http://45.90.35.155';
|
|
10
10
|
|
|
11
11
|
return {
|
|
12
12
|
plugins: [react()],
|