521 Commits

Author SHA1 Message Date
d83f91e951 debug: add logging to record_clicked to trace click events 2026-05-29 13:55:30 +08:00
456e8d4e01 revert: restore event.target.bricks_widget assignment in record_clicked 2026-05-29 13:54:32 +08:00
7ca370c0af fix: improve tabular row click handling
- Remove unused event.target.bricks_widget assignment
- Add check to prevent clicks on interactive elements (A, BUTTON, INPUT, SELECT, TEXTAREA) from triggering row selection
- This ensures toolbar buttons and form inputs inside rows work correctly
2026-05-29 13:52:08 +08:00
b866f236ec fix: Menu widget default bgcolor from 'white' to 'transparent'
Menu constructor hardcoded background to 'white' when no bgcolor option
was provided. This caused white background in sidebar menus regardless
of theme (dark/light). Changed default to 'transparent' so Menu inherits
parent container's themed background color.
2026-05-29 11:09:23 +08:00
05f869af18 feat(widget.js): 扩展opts_set_style支持更多CSS属性
新增支持的样式属性:
- borderRadius, borderTopLeftRadius等圆角属性
- border, borderColor, borderWidth, borderStyle等边框属性
- padding方向细分: paddingLeft/Right/Top/Bottom
- flex布局: flexGrow, flex, flexBasis, flexDirection, flexWrap, alignItems, justifyContent, gap, order
- 视觉效果: opacity, boxShadow, textShadow, transition, transform
- 文本: textDecoration, textTransform, whiteSpace, wordBreak
- 其他: pointerEvents, userSelect, objectFit, outline, boxSizing

注意: fontSize/fontWeight不加入keys,保留charsize响应式缩放机制
2026-05-28 23:46:44 +08:00
e448d242d7 bugfix 2026-05-28 15:54:21 +08:00
dfe2b418b0 fix: sync dist/css/bricks.css with dark theme CSS overrides 2026-05-28 13:59:03 +08:00
fe6d7117ca fix: dark theme for menu items, popup content, and WindowsPanel
- .menuitem: dark bg #334155 + light text #E2E8F0 (with !important to
  override Menu widget's inline backgroundColor:white)
- .popup .vbox/.vcontainer/.vscroll: override inline white bg
- .popup h1-h6: light text color for headings
- .mini-window: dark card style for WindowsPanel dock items
- .toppopup: dark shadow variant
2026-05-28 13:51:19 +08:00
447a3d91bc fix: add [data-theme=dark] CSS overrides for CRUD/tabular/card/input components
Sage shell defaults to dark theme but bricks.css had no dark rules,
causing light-gray text (#8a8a8a) on light backgrounds (#fafafa/#efefef)
in CRUD tables — unreadable against the dark shell.

Added comprehensive [data-theme=dark] overrides:
- body: #CBD5E1 text on #0F172A bg
- .card/.tabular/.tabular-row: dark slate backgrounds
- .inputbox/.popup/.modal/.toolbar: dark variants
- .accordion/.tabpanel/.message: dark variants
2026-05-28 11:37:56 +08:00
565699bd6b refactor: rename event sage_login to user_logined 2026-05-27 18:01:51 +08:00
ffc9350fcb feat: dispatch sage_login event after successful login in withLoginInfo
jsoncall.js: after login retry succeeds, dispatch 'sage_login' on bricks.app
so shell can reload the global menu dynamically.
2026-05-27 17:57:38 +08:00
2e22085122 feat: 401后登录成功自动重试原始请求
- withLoginInfo 改为接收完整 opts(含 method/headers/params)
- 等待 login_window 的 destroy 事件(=登录成功信号)
- 登录成功后重试原始请求
- 重试仍401则返回null(避免死循环)
- 用户手动关闭登录窗口时也触发重试,401则返回null
2026-05-27 15:39:34 +08:00
3c8757bd2c feat: add bricks.Router for SPA URL state management
- New router.js: configurable target tracking, History API integration
- Hook in _buildWidget: tracks urlwidget replace into registered targets
- Init via bricks.Router.init({targets: [{id, param}]})
- Supports: refresh restore, deep linking, back/forward navigation
- Excludes: Popup/PopupWindow/NewWindow (modal, transient)
- Non-tracked targets unaffected (login state, header, etc.)
2026-05-27 15:19:17 +08:00
6312ae8e22 bugfix 2026-05-27 13:40:13 +08:00
2ccd47ea03 Revert "feat: add shell_theme.css and shell_theme.js to header.tmpl"
This reverts commit 3ba2e0db2ee7adabdf3746db513493f12305e9e6.
2026-05-26 15:59:49 +08:00
3ba2e0db2e feat: add shell_theme.css and shell_theme.js to header.tmpl 2026-05-26 15:52:29 +08:00
6d47eeb795 feat: data_filter support via toolbar search button + popup Form
When CRUD JSON has data_filter in params:
- Toolbar shows a '搜索' button (name:'filter')
- Click opens PopupWindow with Form widget
- Form fields are dynamically generated from data_filter definition
  - Extracts all {var, field, op} from AND/OR/NOT nested structure
  - Supports dropdown (uitype:'code') via browserfields.alters config
  - Customizable labels via filter_labels option
- Form submit collects values → stored in this.filter_values
- merge_search_params() sends data_filter (JSON string) + each var value
  to backend API as URL parameters
- Backend .dspy uses sqlor.filter.DBFilter.gen(ns) for SQL WHERE clause

Deleted previous inline DataFilter widget approach; replaced with
popup Form pattern that matches existing CRUD edit/add form UX.
2026-05-25 14:15:59 +08:00
431245648d feat: add DataFilter widget for data_filter support in DataViewer
- New bricks.DataFilter widget (bricks/data_filter.js): parses data_filter
  JSON definition, renders search input fields for each var parameter,
  supports AND/OR/NOT nested structures, and UiCode dropdowns for fields
  with browserfields.alters uitype=code configuration.
- Modified DataViewer (bricks/dataviewer.js): added build_datafilter_widget(),
  filter_event_handle(), filter_clear_handle() methods; extended
  merge_search_params() to send data_filter JSON + collected var values
  to the backend API.
- Updated build.sh: added data_filter.js to the JS concatenation list.

Backend integration: DataViewer sends data_filter (JSON string) and
each var's user input value as URL params. Backend .dspy uses
sqlor.filter.DBFilter to convert to SQL WHERE clause.
2026-05-25 14:02:58 +08:00
5a94ae73d9 buggix 2026-05-25 12:28:45 +08:00
0c274cca51 buggix 2026-05-25 12:27:05 +08:00
07878a13b2 bugfix 2026-05-25 12:04:45 +08:00
9844311385 bugfix 2026-05-25 11:47:26 +08:00
1722340bc1 buggix 2026-05-24 16:46:27 +08:00
83f1214a37 buggix 2026-05-24 16:42:09 +08:00
0149c401b1 bugfix 2026-05-24 16:39:46 +08:00
1cc78362cc bugfix 2026-05-24 16:25:37 +08:00
f33ccba66f bugfix 2026-05-21 10:39:53 +08:00
29b9023959 Add DataViewer search bar integration 2026-05-19 01:09:10 +08:00
4f028f9835 bugfix 2026-05-16 15:46:20 +08:00
74f16fb5a7 bugfix 2026-05-16 15:43:33 +08:00
1d178c2c59 bugfix 2026-05-16 15:41:43 +08:00
cebd7be0a1 bugfix 2026-05-16 15:06:34 +08:00
a4383b5a49 bugfix 2026-05-16 12:47:19 +08:00
683832659a bugfix 2026-05-16 11:53:00 +08:00
1349527fd7 bugfix 2026-05-16 11:46:10 +08:00
f581fc9b23 bugfix 2026-05-16 11:43:26 +08:00
24ba4a0842 bugfix 2026-05-16 10:22:50 +08:00
04a6c88f11 bugfix 2026-05-12 11:32:25 +08:00
80f8bd3849 bugfix 2026-05-12 11:26:22 +08:00
dbfcd358c6 bugfix 2026-05-12 11:16:41 +08:00
8eab450509 bugfix 2026-05-09 16:01:11 +08:00
b0412d3259 bugfix 2026-05-09 15:59:23 +08:00
58b7eaf289 bugfix 2026-05-08 19:14:10 +08:00
7d161199b4 bugfix 2026-05-08 19:10:43 +08:00
83f55ae9ee bugfix 2026-05-08 14:09:24 +08:00
a6bd75dbbd bugfix 2026-05-07 14:46:08 +08:00
269bdac2f6 bugfix 2026-05-06 18:03:13 +08:00
bd99c0e0b9 bugfix 2026-05-06 17:55:00 +08:00
2113a27e02 bugfix 2026-05-06 17:53:00 +08:00
621aa5c347 bugfix 2026-05-06 17:50:10 +08:00