@fui-org/fui-cli 1.3.2 → 2.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/README.md +19 -3
- package/dist/fui-bmg5pnmq.js +379 -0
- package/dist/fui.js +1 -1
- package/package.json +3 -6
- package/skills/fui/SKILL.md +9 -41
- package/skills/fui-skill/SKILL.md +95 -225
- package/skills/fui-skill/assets/projectdefaultstyle-3.0.css +555 -0
- package/skills/fui-skill/assets/projectdefaultstyle.css +207 -235
- package/skills/fui-skill/references/INDEX.md +105 -137
- package/skills/fui-skill/references/advanced-techniques.md +76 -68
- package/skills/fui-skill/references/coding-standards.md +56 -56
- package/skills/fui-skill/references/component-design.md +166 -173
- package/skills/fui-skill/references/component-quickref.md +61 -60
- package/skills/fui-skill/references/component-table.md +128 -117
- package/skills/fui-skill/references/components-dialog.md +55 -56
- package/skills/fui-skill/references/components-display.md +24 -30
- package/skills/fui-skill/references/components-echart.md +186 -261
- package/skills/fui-skill/references/components-input.md +72 -96
- package/skills/fui-skill/references/controls-patterns.md +196 -342
- package/skills/fui-skill/references/controls-styling-vocabulary.md +130 -97
- package/skills/fui-skill/references/db-table-design.md +24 -28
- package/skills/fui-skill/references/db-workflow.md +191 -390
- package/skills/fui-skill/references/default-function.md +169 -128
- package/skills/fui-skill/references/design-modes.md +35 -63
- package/skills/fui-skill/references/echart-templates.md +204 -196
- package/skills/fui-skill/references/fastproject.md +62 -60
- package/skills/fui-skill/references/fsheet.md +109 -124
- package/skills/fui-skill/references/fullstack-workflow.md +90 -128
- package/skills/fui-skill/references/module-data-patterns.md +31 -40
- package/skills/fui-skill/references/module-json-anatomy.md +47 -52
- package/skills/fui-skill/references/module-structure.md +80 -196
- package/skills/fui-skill/references/new-session.md +49 -51
- package/skills/fui-skill/references/pdfmake.md +17 -17
- package/skills/fui-skill/references/permission-system.md +89 -108
- package/skills/fui-skill/references/platform-architecture.md +128 -153
- package/skills/fui-skill/references/project-config.md +102 -134
- package/skills/fui-skill/references/project-provisioning.md +139 -244
- package/skills/fui-skill/references/script-map.md +208 -242
- package/skills/fui-skill/references/sql-clr-functions.md +98 -97
- package/skills/fui-skill/references/system-design.md +63 -88
- package/skills/fui-skill/references/tapi-file-api.md +46 -52
- package/skills/fui-skill/references/tapi-permission-patterns.md +51 -53
- package/skills/fui-skill/references/tapi-reference.md +132 -207
- package/skills/fui-skill/references/tools-registry.md +84 -460
- package/skills/fui-skill/references/ui-crosswindow-patterns.md +79 -75
- package/skills/fui-skill/references/ui-dialog-patterns.md +98 -72
- package/skills/fui-skill/references/ui-layout-patterns.md +26 -26
- package/skills/fui-skill/references/ui-patterns.md +71 -83
- package/skills/fui-skill/references/ui-screenshot-review.md +63 -62
- package/skills/fui-skill/references/ui-table-cell-patterns.md +61 -59
- package/skills/fui-skill/references/ui-templates.md +16 -23
- package/skills/fui-skill/references/verification.md +236 -246
- package/skills/fui-skill/references/watcher-patterns.md +30 -63
- package/skills/fui-skill/references/websocket-realtime.md +83 -66
- package/skills/fui-skill/scripts/component-3.0.js +298 -131
- package/skills/fui-skill/scripts/component.js +277 -271
- package/skills/fui-skill/scripts/componentTable-3.0.js +182 -53
- package/skills/fui-skill/scripts/componentTable.js +171 -49
- package/skills/fui-skill/scripts/defaultfunction-3.0.js +88 -3
- package/skills/fui-skill/scripts/defaultfunction.js +88 -3
- package/skills/fui-skill/scripts/fsheet.js +38 -0
- package/dist/fui-y8an39cn.js +0 -420
- package/skills/fui-skill/README.md +0 -112
- package/skills/fui-skill/metadata.json +0 -75
- package/skills/fui-skill-cli/SKILL.md +0 -139
- package/skills/fui-skill-cli/references/INDEX.md +0 -110
- package/skills/fui-skill-cli/references/advanced-techniques.md +0 -168
- package/skills/fui-skill-cli/references/coding-standards.md +0 -112
- package/skills/fui-skill-cli/references/component-design.md +0 -448
- package/skills/fui-skill-cli/references/component-quickref.md +0 -78
- package/skills/fui-skill-cli/references/component-table.md +0 -248
- package/skills/fui-skill-cli/references/components-dialog.md +0 -191
- package/skills/fui-skill-cli/references/components-display.md +0 -141
- package/skills/fui-skill-cli/references/components-echart.md +0 -316
- package/skills/fui-skill-cli/references/components-input.md +0 -335
- package/skills/fui-skill-cli/references/controls-patterns.md +0 -701
- package/skills/fui-skill-cli/references/controls-styling-vocabulary.md +0 -137
- package/skills/fui-skill-cli/references/db-table-design.md +0 -73
- package/skills/fui-skill-cli/references/db-workflow.md +0 -288
- package/skills/fui-skill-cli/references/default-function.md +0 -425
- package/skills/fui-skill-cli/references/design-modes.md +0 -57
- package/skills/fui-skill-cli/references/echart-templates.md +0 -489
- package/skills/fui-skill-cli/references/fastproject.md +0 -99
- package/skills/fui-skill-cli/references/fsheet.md +0 -203
- package/skills/fui-skill-cli/references/fullstack-workflow.md +0 -313
- package/skills/fui-skill-cli/references/module-data-patterns.md +0 -117
- package/skills/fui-skill-cli/references/module-json-anatomy.md +0 -132
- package/skills/fui-skill-cli/references/module-structure.md +0 -141
- package/skills/fui-skill-cli/references/new-session.md +0 -85
- package/skills/fui-skill-cli/references/pdfmake.md +0 -60
- package/skills/fui-skill-cli/references/permission-system.md +0 -150
- package/skills/fui-skill-cli/references/platform-architecture.md +0 -269
- package/skills/fui-skill-cli/references/project-config.md +0 -303
- package/skills/fui-skill-cli/references/project-provisioning.md +0 -278
- package/skills/fui-skill-cli/references/script-map.md +0 -262
- package/skills/fui-skill-cli/references/sql-clr-functions.md +0 -225
- package/skills/fui-skill-cli/references/system-design.md +0 -89
- package/skills/fui-skill-cli/references/tapi-file-api.md +0 -185
- package/skills/fui-skill-cli/references/tapi-permission-patterns.md +0 -156
- package/skills/fui-skill-cli/references/tapi-reference.md +0 -474
- package/skills/fui-skill-cli/references/tools-registry.md +0 -84
- package/skills/fui-skill-cli/references/ui-crosswindow-patterns.md +0 -321
- package/skills/fui-skill-cli/references/ui-dialog-patterns.md +0 -255
- package/skills/fui-skill-cli/references/ui-layout-patterns.md +0 -176
- package/skills/fui-skill-cli/references/ui-patterns.md +0 -303
- package/skills/fui-skill-cli/references/ui-screenshot-review.md +0 -95
- package/skills/fui-skill-cli/references/ui-table-cell-patterns.md +0 -318
- package/skills/fui-skill-cli/references/ui-templates.md +0 -22
- package/skills/fui-skill-cli/references/verification.md +0 -236
- package/skills/fui-skill-cli/references/watcher-patterns.md +0 -163
- package/skills/fui-skill-cli/references/websocket-realtime.md +0 -271
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
# FUI Dialog & Overlay Components
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Owns: **`f-dialog`, `f-window`, `f-editor`**. Hand-built dialog pattern (`v-dialog` + hidden-container): [ui-dialog-patterns.md](ui-dialog-patterns.md).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Dialog, overlay and content-editor components. Prefix/binding rules: [components-display.md](components-display.md).
|
|
6
6
|
|
|
7
7
|
## f-window
|
|
8
8
|
|
|
9
9
|
- Props (source): `id`
|
|
10
|
-
-
|
|
11
|
-
- Example:
|
|
10
|
+
- Internal iframe dialog host, usually opened via `openWindow(...)`
|
|
12
11
|
|
|
13
12
|
```json
|
|
14
13
|
{
|
|
@@ -26,8 +25,7 @@ Components liên quan đến dialog, overlay, và editor nội dung. Xem prefix/
|
|
|
26
25
|
|
|
27
26
|
- Props (source): `value`, `imageapi`, `height`, `toolbar`
|
|
28
27
|
- Emit: `input` with HTML content
|
|
29
|
-
-
|
|
30
|
-
- Example:
|
|
28
|
+
- Wraps CKEditor with upload auth header
|
|
31
29
|
|
|
32
30
|
```json
|
|
33
31
|
{
|
|
@@ -44,9 +42,8 @@ Components liên quan đến dialog, overlay, và editor nội dung. Xem prefix/
|
|
|
44
42
|
## f-editor-dialog
|
|
45
43
|
|
|
46
44
|
- Props (source): `value`, `imageapi`, `label`, `width`, `toolbar`
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
- Example:
|
|
45
|
+
- `value` must be an object (`open`, `text`, `object`, `ok`), not a plain string
|
|
46
|
+
- Modal editor, writes back on OK
|
|
50
47
|
|
|
51
48
|
```json
|
|
52
49
|
{
|
|
@@ -63,54 +60,53 @@ Components liên quan đến dialog, overlay, và editor nội dung. Xem prefix/
|
|
|
63
60
|
|
|
64
61
|
## f-dialog
|
|
65
62
|
|
|
66
|
-
Modal
|
|
63
|
+
Modal that builds a form from a `controls` array; supports local watchers, validation and action buttons.
|
|
67
64
|
|
|
68
65
|
- Props:
|
|
69
|
-
- `value` (Boolean, default
|
|
70
|
-
- `data` (Object, default
|
|
71
|
-
- `dataOut` (Object, default
|
|
72
|
-
- `title` (String, default
|
|
73
|
-
- `controls` (Array, default
|
|
74
|
-
- `watch` (Object, default
|
|
75
|
-
- `button` (Array, default
|
|
76
|
-
- `disableValidate` (Boolean, default
|
|
77
|
-
- `width` (Number, default
|
|
78
|
-
- `openAction` (Object, default
|
|
66
|
+
- `value` (Boolean, default `false`) — v-model open/close
|
|
67
|
+
- `data` (Object, default `{}`) — input data, bind with `:data.sync`; copied into fields when the dialog opens
|
|
68
|
+
- `dataOut` (Object, default `{}`) — output, bind with `:data-out.sync`; receives the component instance on open
|
|
69
|
+
- `title` (String, default `''`)
|
|
70
|
+
- `controls` (Array, default `[]`) — control definitions (`el`, `attr`, `w` col width); any field whose `v-model` doesn't start with `vueData.` gets local data auto-created (init `null`)
|
|
71
|
+
- `watch` (Object, default `{}`) — local watchers; key = field name, value = action run on change; registered on open, removed on close
|
|
72
|
+
- `button` (Array, default `[]`) — button definitions (below)
|
|
73
|
+
- `disableValidate` (Boolean, default `false`) — skip form validation when `true`
|
|
74
|
+
- `width` (Number, default `800`) — px
|
|
75
|
+
- `openAction` (Object, default `null`) — action run as soon as the dialog opens
|
|
79
76
|
|
|
80
77
|
- Emits:
|
|
81
|
-
- `input` —
|
|
82
|
-
- `update:data-out` —
|
|
83
|
-
- `update:data` —
|
|
84
|
-
|
|
85
|
-
-
|
|
86
|
-
1. Reset
|
|
87
|
-
2.
|
|
88
|
-
3.
|
|
89
|
-
4. Emit `update:data-out`
|
|
90
|
-
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
-
|
|
95
|
-
- `
|
|
96
|
-
- `
|
|
97
|
-
- `
|
|
98
|
-
- `
|
|
99
|
-
- `
|
|
100
|
-
-
|
|
101
|
-
- `
|
|
102
|
-
- `
|
|
103
|
-
- `
|
|
104
|
-
- `
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
- `
|
|
112
|
-
- **
|
|
113
|
-
- **Khai báo biến `vueData` trước khi dùng trong controls:** Nếu một control bind vào `vueData.someVar`, biến đó phải được khai báo trước trong `data` của module — Vue không thể thiết lập reactivity cho biến chưa tồn tại lúc init.
|
|
78
|
+
- `input` — open/close (v-model)
|
|
79
|
+
- `update:data-out` — component instance on open (parent can reach local data)
|
|
80
|
+
- `update:data` — `v_outData` when a button with `getoutdata: true` is clicked (after validation passes)
|
|
81
|
+
|
|
82
|
+
- On open (`value = true`):
|
|
83
|
+
1. Reset all fields from `:data` (`setDefaultData`)
|
|
84
|
+
2. Register watchers from `watch`
|
|
85
|
+
3. Run `openAction` if set
|
|
86
|
+
4. Emit `update:data-out` with the instance
|
|
87
|
+
|
|
88
|
+
- On close (`value = false`): remove all registered watchers.
|
|
89
|
+
|
|
90
|
+
- Button object:
|
|
91
|
+
- `label` (String)
|
|
92
|
+
- `color` (String, default `"primary"`)
|
|
93
|
+
- `elevation` (Number, default `0`)
|
|
94
|
+
- `text` (Boolean, default `true`) — text button
|
|
95
|
+
- `type` (String) — e.g. `"submit"`
|
|
96
|
+
- `:disabled` (String) — Vue expression, e.g. `"!checkBoxValue"`
|
|
97
|
+
- `v-if` (String) — Vue expression to show/hide, e.g. `"ModuleID==1"`
|
|
98
|
+
- `icon-text` (String) — MDI icon left of the label
|
|
99
|
+
- `checkvalid` (Boolean) — validate before running the action; stop if invalid
|
|
100
|
+
- `getoutdata` (Boolean) — sync field values into `v_outData` then emit `update:data`; also triggers validation
|
|
101
|
+
- `action` (Array | Function) — actions run on click; context = all `v_outData` fields plus `dData` pointing to `v_outData`
|
|
102
|
+
|
|
103
|
+
- Notes:
|
|
104
|
+
- Button clicks debounced 500ms (leading edge) against double-click
|
|
105
|
+
- Controls support `br: true` for a row break
|
|
106
|
+
- Template is built statically at `data()` init; no re-render when `controls` changes
|
|
107
|
+
- In the template, `watch` is `:watch` (dynamic bind), not Vue's default `watch`
|
|
108
|
+
- **Never put `f-dialog` inside a component template:** it works only when declared directly in the module JSON `controls`; inside a Vue component it misbehaves.
|
|
109
|
+
- **Declare `vueData` variables before binding them in controls:** a control bound to `vueData.someVar` needs that variable declared in the module `data` first — Vue can't make a variable reactive if it doesn't exist at init.
|
|
114
110
|
|
|
115
111
|
```json
|
|
116
112
|
"data": [
|
|
@@ -135,7 +131,7 @@ Modal dialog tự build form từ mảng `controls`, có hỗ trợ watchers c
|
|
|
135
131
|
]
|
|
136
132
|
```
|
|
137
133
|
|
|
138
|
-
-
|
|
134
|
+
- Full example:
|
|
139
135
|
|
|
140
136
|
```json
|
|
141
137
|
{
|
|
@@ -156,8 +152,11 @@ Modal dialog tự build form từ mảng `controls`, có hỗ trợ watchers c
|
|
|
156
152
|
{
|
|
157
153
|
"el": "v-select",
|
|
158
154
|
"attr": {
|
|
159
|
-
"label": "select",
|
|
160
|
-
"
|
|
155
|
+
"label": "select",
|
|
156
|
+
"v-model": "bienselect",
|
|
157
|
+
":items": "vueData.Mang",
|
|
158
|
+
"item-text": "AppName",
|
|
159
|
+
"item-value": "AppListID"
|
|
161
160
|
}
|
|
162
161
|
}
|
|
163
162
|
],
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
# FUI Display & Presentation Components
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Owns: **display components: `f-label`, `f-title`, `f-box`, `f-header`, `f-slider`, chip/badge**.
|
|
4
4
|
|
|
5
|
-
Components
|
|
5
|
+
Components for showing info, charts, media. Also holds prefix/binding rules for all f-* components.
|
|
6
6
|
|
|
7
|
-
## Prefix
|
|
7
|
+
## Prefix and binding rules
|
|
8
8
|
|
|
9
|
-
- `f-*`: FUI components (
|
|
9
|
+
- `f-*`: FUI components (FUI runtime)
|
|
10
10
|
- `v-*`: Vuetify components
|
|
11
|
-
- `uc-*`:
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
- Props
|
|
17
|
-
- Literal-string forcing (backtick/quote)
|
|
11
|
+
- `uc-*`: custom module components from `components/`
|
|
12
|
+
- In `module.json`, pass props via `attr`
|
|
13
|
+
- Kebab-case in JSON for custom props (`api-upload`, `item-value`)
|
|
14
|
+
- Dynamic values use `:prop`
|
|
15
|
+
- Use `v-on:*` in JSON (not `@*`)
|
|
16
|
+
- Props without `:` (e.g. `url`, `api-upload`) are plain strings by default
|
|
17
|
+
- Literal-string forcing (backtick/quote) only in Action `IN` mappings, never for static props
|
|
18
18
|
|
|
19
|
-
## Minimal
|
|
19
|
+
## Minimal control pattern
|
|
20
20
|
|
|
21
21
|
```json
|
|
22
22
|
{
|
|
@@ -34,8 +34,7 @@ Components dùng để hiển thị thông tin, chart, media. File này cũng ch
|
|
|
34
34
|
## f-label
|
|
35
35
|
|
|
36
36
|
- Props (source): `items`, `text`, `color`, `iconText`
|
|
37
|
-
-
|
|
38
|
-
- Example:
|
|
37
|
+
- Renders `v-chip` from `text` and/or `items`
|
|
39
38
|
|
|
40
39
|
```json
|
|
41
40
|
{
|
|
@@ -51,11 +50,10 @@ Components dùng để hiển thị thông tin, chart, media. File này cũng ch
|
|
|
51
50
|
## f-box
|
|
52
51
|
|
|
53
52
|
- Props (source): `rowFormat`, `items`, `label`, `edit`, `saveclick`
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
- `rowFormat`:
|
|
57
|
-
- `items`: object
|
|
58
|
-
- Example:
|
|
53
|
+
- Emits `input` when internal data changes
|
|
54
|
+
- Displays/edits key-value rows; auto-builds row format from data if missing
|
|
55
|
+
- `rowFormat`: array of `{ text, value, noEdit }` — `noEdit: true` locks that column when `edit=true`
|
|
56
|
+
- `items`: object or array; an object is auto-wrapped into a 1-element array
|
|
59
57
|
|
|
60
58
|
```json
|
|
61
59
|
{
|
|
@@ -77,7 +75,6 @@ Components dùng để hiển thị thông tin, chart, media. File này cũng ch
|
|
|
77
75
|
## f-header
|
|
78
76
|
|
|
79
77
|
- Props (source): `label`
|
|
80
|
-
- Example:
|
|
81
78
|
|
|
82
79
|
```json
|
|
83
80
|
{
|
|
@@ -90,7 +87,6 @@ Components dùng để hiển thị thông tin, chart, media. File này cũng ch
|
|
|
90
87
|
## f-title
|
|
91
88
|
|
|
92
89
|
- Props (source): `label`
|
|
93
|
-
- Example:
|
|
94
90
|
|
|
95
91
|
```json
|
|
96
92
|
{
|
|
@@ -103,8 +99,7 @@ Components dùng để hiển thị thông tin, chart, media. File này cũng ch
|
|
|
103
99
|
## f-slider
|
|
104
100
|
|
|
105
101
|
- Props (source): `items`, `itemAttr`
|
|
106
|
-
-
|
|
107
|
-
- Example:
|
|
102
|
+
- Wraps `v-carousel` and `v-carousel-item`
|
|
108
103
|
|
|
109
104
|
```json
|
|
110
105
|
{
|
|
@@ -119,13 +114,12 @@ Components dùng để hiển thị thông tin, chart, media. File này cũng ch
|
|
|
119
114
|
|
|
120
115
|
## f-echart
|
|
121
116
|
|
|
122
|
-
→
|
|
117
|
+
→ See [`components-echart.md`](components-echart.md) — props, config, global `FEchartFormatter` module, examples.
|
|
123
118
|
|
|
124
119
|
## f-pdfmake
|
|
125
120
|
|
|
126
121
|
- Props (source): `data`
|
|
127
|
-
-
|
|
128
|
-
- Example:
|
|
122
|
+
- Renders PDF in an iframe; re-renders when `data` changes (deep watch)
|
|
129
123
|
|
|
130
124
|
```json
|
|
131
125
|
{
|
|
@@ -140,8 +134,8 @@ Components dùng để hiển thị thông tin, chart, media. File này cũng ch
|
|
|
140
134
|
|
|
141
135
|
---
|
|
142
136
|
|
|
143
|
-
## Practical
|
|
137
|
+
## Practical notes
|
|
144
138
|
|
|
145
|
-
1.
|
|
146
|
-
2.
|
|
147
|
-
3.
|
|
139
|
+
1. Most `f-*` components forward unknown attrs via `v-bind="$attrs"` — Vuetify attrs still work when the child is a Vuetify control.
|
|
140
|
+
2. The literal-string rule applies only to API/path strings in Action `IN` mappings.
|
|
141
|
+
3. See `references/component-table.md` for `f-table`.
|