wezard 2.9.0 → 3.0.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/CLAUDE.md +43 -21
- package/README.md +37 -50
- package/cli/wezard.sh +59 -20
- package/config.example.jsonc +5 -8
- package/dist/cli/audit.js +11 -13
- package/dist/cli/audit.js.map +1 -1
- package/dist/cli/codex-hook.js +20 -17
- package/dist/cli/codex-hook.js.map +1 -1
- package/dist/cli/ext.js +271 -0
- package/dist/cli/ext.js.map +1 -0
- package/dist/cli/init.js +44 -13
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/skills.js +113 -0
- package/dist/cli/skills.js.map +1 -0
- package/dist/cli/sync.js +3 -2
- package/dist/cli/sync.js.map +1 -1
- package/dist/cli/wx.js +7 -6
- package/dist/cli/wx.js.map +1 -1
- package/dist/daemon/aibot-media.js +28 -20
- package/dist/daemon/aibot-media.js.map +1 -1
- package/dist/daemon/apprentice.js +75 -0
- package/dist/daemon/apprentice.js.map +1 -0
- package/dist/daemon/approval.js +75 -33
- package/dist/daemon/approval.js.map +1 -1
- package/dist/daemon/channel-context.js +7 -0
- package/dist/daemon/channel-context.js.map +1 -1
- package/dist/daemon/channel-onboarding.js +61 -0
- package/dist/daemon/channel-onboarding.js.map +1 -0
- package/dist/daemon/channel-posts.js +93 -0
- package/dist/daemon/channel-posts.js.map +1 -0
- package/dist/daemon/channel-rebind.js +100 -0
- package/dist/daemon/channel-rebind.js.map +1 -0
- package/dist/daemon/channel-store.js.map +1 -1
- package/dist/daemon/channel.js +273 -409
- package/dist/daemon/channel.js.map +1 -1
- package/dist/daemon/chat-name.js +24 -161
- package/dist/daemon/chat-name.js.map +1 -1
- package/dist/daemon/claim.js +1 -45
- package/dist/daemon/claim.js.map +1 -1
- package/dist/daemon/classes.js +416 -0
- package/dist/daemon/classes.js.map +1 -0
- package/dist/daemon/config-api.js +6 -30
- package/dist/daemon/config-api.js.map +1 -1
- package/dist/daemon/control-socket.js +93 -0
- package/dist/daemon/control-socket.js.map +1 -0
- package/dist/daemon/danger-scrub.js +315 -0
- package/dist/daemon/danger-scrub.js.map +1 -0
- package/dist/daemon/danger.js +146 -16
- package/dist/daemon/danger.js.map +1 -1
- package/dist/daemon/detail.js +50 -22
- package/dist/daemon/detail.js.map +1 -1
- package/dist/daemon/exec-surface.js +108 -0
- package/dist/daemon/exec-surface.js.map +1 -0
- package/dist/daemon/external.js +595 -0
- package/dist/daemon/external.js.map +1 -0
- package/dist/daemon/handoff.js +51 -50
- package/dist/daemon/handoff.js.map +1 -1
- package/dist/daemon/http.js +119 -31
- package/dist/daemon/http.js.map +1 -1
- package/dist/daemon/idle-reap.js +30 -0
- package/dist/daemon/idle-reap.js.map +1 -0
- package/dist/daemon/inbound.js +436 -207
- package/dist/daemon/inbound.js.map +1 -1
- package/dist/daemon/index.js +3353 -2760
- package/dist/daemon/index.js.map +1 -1
- package/dist/daemon/last-response.js +51 -25
- package/dist/daemon/last-response.js.map +1 -1
- package/dist/daemon/legacy-panes.js +67 -0
- package/dist/daemon/legacy-panes.js.map +1 -0
- package/dist/daemon/mcp-http.js.map +1 -1
- package/dist/daemon/me-room.js +137 -0
- package/dist/daemon/me-room.js.map +1 -0
- package/dist/daemon/media.js +14 -0
- package/dist/daemon/media.js.map +1 -1
- package/dist/daemon/memory-steward.js +1 -1
- package/dist/daemon/memory-steward.js.map +1 -1
- package/dist/daemon/message-format.js +15 -2
- package/dist/daemon/message-format.js.map +1 -1
- package/dist/daemon/mirror-bridge.js +583 -488
- package/dist/daemon/mirror-bridge.js.map +1 -1
- package/dist/daemon/mirror-store.js +24 -0
- package/dist/daemon/mirror-store.js.map +1 -1
- package/dist/daemon/notices.js +5 -6
- package/dist/daemon/notices.js.map +1 -1
- package/dist/daemon/onboarding.js +459 -0
- package/dist/daemon/onboarding.js.map +1 -0
- package/dist/daemon/outbound.js +21 -11
- package/dist/daemon/outbound.js.map +1 -1
- package/dist/daemon/peers.js +39 -231
- package/dist/daemon/peers.js.map +1 -1
- package/dist/daemon/plan-http.js +2 -3
- package/dist/daemon/plan-http.js.map +1 -1
- package/dist/daemon/plans.js.map +1 -1
- package/dist/daemon/reach.js +1 -5
- package/dist/daemon/reach.js.map +1 -1
- package/dist/daemon/room-auto-adhoc.js +18 -0
- package/dist/daemon/room-auto-adhoc.js.map +1 -0
- package/dist/daemon/room-bind.js +297 -0
- package/dist/daemon/room-bind.js.map +1 -0
- package/dist/daemon/room-facts.js +35 -0
- package/dist/daemon/room-facts.js.map +1 -0
- package/dist/daemon/room-hub.js +569 -0
- package/dist/daemon/room-hub.js.map +1 -0
- package/dist/daemon/room-overdue.js +160 -0
- package/dist/daemon/room-overdue.js.map +1 -0
- package/dist/daemon/room-prune.js +74 -0
- package/dist/daemon/room-prune.js.map +1 -0
- package/dist/daemon/room-spawn.js +20 -0
- package/dist/daemon/room-spawn.js.map +1 -0
- package/dist/daemon/room-watchdog.js +175 -0
- package/dist/daemon/room-watchdog.js.map +1 -0
- package/dist/daemon/rooms.js +204 -0
- package/dist/daemon/rooms.js.map +1 -0
- package/dist/daemon/route.js +7 -18
- package/dist/daemon/route.js.map +1 -1
- package/dist/daemon/session-scan.js +1 -1
- package/dist/daemon/session-scan.js.map +1 -1
- package/dist/daemon/short-id-log.js +43 -0
- package/dist/daemon/short-id-log.js.map +1 -0
- package/dist/daemon/spawn-tmux.js +60 -45
- package/dist/daemon/spawn-tmux.js.map +1 -1
- package/dist/daemon/steward-guard.js +3 -3
- package/dist/daemon/steward-guard.js.map +1 -1
- package/dist/daemon/steward-model.js +17 -3
- package/dist/daemon/steward-model.js.map +1 -1
- package/dist/daemon/steward-repair.js +171 -0
- package/dist/daemon/steward-repair.js.map +1 -0
- package/dist/daemon/steward.js +171 -0
- package/dist/daemon/steward.js.map +1 -0
- package/dist/daemon/tasks.js +4 -14
- package/dist/daemon/tasks.js.map +1 -1
- package/dist/daemon/tool-face.js +31 -0
- package/dist/daemon/tool-face.js.map +1 -0
- package/dist/daemon/turn-opening.js +30 -0
- package/dist/daemon/turn-opening.js.map +1 -0
- package/dist/daemon/wake-tail.js +55 -0
- package/dist/daemon/wake-tail.js.map +1 -0
- package/dist/daemon/weixin-cmd.js +10 -14
- package/dist/daemon/weixin-cmd.js.map +1 -1
- package/dist/daemon/wezard-session.js +6 -2
- package/dist/daemon/wezard-session.js.map +1 -1
- package/dist/daemon/wizard-memory.js +4 -10
- package/dist/daemon/wizard-memory.js.map +1 -1
- package/dist/daemon/wizard-names.js +0 -22
- package/dist/daemon/wizard-names.js.map +1 -1
- package/dist/daemon/wizard.js +683 -159
- package/dist/daemon/wizard.js.map +1 -1
- package/dist/daemon/ws.js +1 -1
- package/dist/daemon/ws.js.map +1 -1
- package/dist/mcp/output.js +30 -7
- package/dist/mcp/output.js.map +1 -1
- package/dist/mcp/relay.js +152 -0
- package/dist/mcp/relay.js.map +1 -0
- package/dist/mcp/tools.js +318 -265
- package/dist/mcp/tools.js.map +1 -1
- package/dist/shared/allow-rules.js +1 -7
- package/dist/shared/allow-rules.js.map +1 -1
- package/dist/shared/charter-rearm.js +179 -0
- package/dist/shared/charter-rearm.js.map +1 -0
- package/dist/shared/chat-http.js +412 -480
- package/dist/shared/chat-http.js.map +1 -1
- package/dist/shared/chat-record.js +55 -0
- package/dist/shared/chat-record.js.map +1 -0
- package/dist/shared/chat-render.js +7 -4
- package/dist/shared/chat-render.js.map +1 -1
- package/dist/shared/chat-view.js +2 -41
- package/dist/shared/chat-view.js.map +1 -1
- package/dist/shared/cli-backends.js +13 -5
- package/dist/shared/cli-backends.js.map +1 -1
- package/dist/shared/cli-local-status.js +28 -0
- package/dist/shared/cli-local-status.js.map +1 -0
- package/dist/shared/cli-socket.js +14 -0
- package/dist/shared/cli-socket.js.map +1 -0
- package/dist/shared/codex-hooks.js +5 -2
- package/dist/shared/codex-hooks.js.map +1 -1
- package/dist/shared/config.js +90 -66
- package/dist/shared/config.js.map +1 -1
- package/dist/shared/daemon-addr.js +23 -0
- package/dist/shared/daemon-addr.js.map +1 -0
- package/dist/shared/daemon-client.js +41 -0
- package/dist/shared/daemon-client.js.map +1 -0
- package/dist/shared/daemon-token.js +2 -2
- package/dist/shared/daemon-token.js.map +1 -1
- package/dist/shared/detail-render.js +98 -21
- package/dist/shared/detail-render.js.map +1 -1
- package/dist/shared/detail-store.js.map +1 -1
- package/dist/shared/external.js +402 -0
- package/dist/shared/external.js.map +1 -0
- package/dist/shared/group-members.js +35 -0
- package/dist/shared/group-members.js.map +1 -0
- package/dist/shared/inject-view.js +143 -0
- package/dist/shared/inject-view.js.map +1 -0
- package/dist/shared/instance-id.js +21 -0
- package/dist/shared/instance-id.js.map +1 -0
- package/dist/shared/legacy-routes.js +199 -0
- package/dist/shared/legacy-routes.js.map +1 -0
- package/dist/shared/mem-guard.js +32 -0
- package/dist/shared/mem-guard.js.map +1 -0
- package/dist/shared/message-footer.js +11 -3
- package/dist/shared/message-footer.js.map +1 -1
- package/dist/shared/model-tiers.js +39 -1
- package/dist/shared/model-tiers.js.map +1 -1
- package/dist/shared/ports.js +56 -0
- package/dist/shared/ports.js.map +1 -0
- package/dist/shared/reminder.js +30 -38
- package/dist/shared/reminder.js.map +1 -1
- package/dist/shared/role-render.js +210 -210
- package/dist/shared/role-render.js.map +1 -1
- package/dist/shared/role-view.js +65 -300
- package/dist/shared/role-view.js.map +1 -1
- package/dist/shared/room-label.js +13 -0
- package/dist/shared/room-label.js.map +1 -0
- package/dist/shared/room-migrate.js +404 -0
- package/dist/shared/room-migrate.js.map +1 -0
- package/dist/shared/room-overdue.js +153 -0
- package/dist/shared/room-overdue.js.map +1 -0
- package/dist/shared/room-search.js +102 -0
- package/dist/shared/room-search.js.map +1 -0
- package/dist/shared/room-view.js +275 -0
- package/dist/shared/room-view.js.map +1 -0
- package/dist/shared/room.js +827 -0
- package/dist/shared/room.js.map +1 -0
- package/dist/shared/session-hooks.js +20 -8
- package/dist/shared/session-hooks.js.map +1 -1
- package/dist/shared/session-label.js +82 -84
- package/dist/shared/session-label.js.map +1 -1
- package/dist/shared/session-mcp.js +36 -40
- package/dist/shared/session-mcp.js.map +1 -1
- package/dist/shared/session-skills.js +8 -0
- package/dist/shared/session-skills.js.map +1 -1
- package/dist/shared/skill-sync.js +229 -0
- package/dist/shared/skill-sync.js.map +1 -0
- package/dist/shared/smarts.js +24 -0
- package/dist/shared/smarts.js.map +1 -0
- package/dist/shared/stream-page.js +22 -0
- package/dist/shared/stream-page.js.map +1 -0
- package/dist/shared/task-file.js +0 -5
- package/dist/shared/task-file.js.map +1 -1
- package/dist/shared/task-template.js +1 -1
- package/dist/shared/task-template.js.map +1 -1
- package/dist/shared/tool-hints.js +20 -11
- package/dist/shared/tool-hints.js.map +1 -1
- package/dist/shared/workspace-trust.js +8 -0
- package/dist/shared/workspace-trust.js.map +1 -1
- package/dist/shared/world.js +101 -166
- package/dist/shared/world.js.map +1 -1
- package/dist/svr/facts-store.js +26 -0
- package/dist/svr/facts-store.js.map +1 -0
- package/dist/svr/index.js +114 -16
- package/dist/svr/index.js.map +1 -1
- package/hooks/pre-tool-use.sh +14 -10
- package/hooks/stop.sh +28 -0
- package/launchd/com.wezard.svr.plist.template +2 -0
- package/package.json +9 -2
- package/scripts/install.sh +23 -0
- package/skills/LICENSE.wecom-unified.txt +21 -0
- package/skills/wecom-unified/SKILL.md +151 -0
- package/skills/wecom-unified/assets/templates/broadside/DESIGN.preset.md +172 -0
- package/skills/wecom-unified/assets/templates/broadside/shell/content.jsx +31 -0
- package/skills/wecom-unified/assets/templates/broadside/slides/01_cover.slide +48 -0
- package/skills/wecom-unified/assets/templates/broadside/slides/02_section.slide +58 -0
- package/skills/wecom-unified/assets/templates/broadside/slides/03_cards.slide +53 -0
- package/skills/wecom-unified/assets/templates/broadside/slides/04_image.slide +64 -0
- package/skills/wecom-unified/assets/templates/cartesian/DESIGN.preset.md +139 -0
- package/skills/wecom-unified/assets/templates/cartesian/shell/content.jsx +28 -0
- package/skills/wecom-unified/assets/templates/cartesian/slides/01_cover.slide +44 -0
- package/skills/wecom-unified/assets/templates/cartesian/slides/02_compare.slide +79 -0
- package/skills/wecom-unified/assets/templates/cartesian/slides/03_table.slide +79 -0
- package/skills/wecom-unified/assets/templates/cobalt-grid/DESIGN.preset.md +118 -0
- package/skills/wecom-unified/assets/templates/cobalt-grid/shell/content.jsx +24 -0
- package/skills/wecom-unified/assets/templates/cobalt-grid/slides/01_cover.slide +61 -0
- package/skills/wecom-unified/assets/templates/cobalt-grid/slides/02_structure.slide +85 -0
- package/skills/wecom-unified/assets/templates/cobalt-grid/slides/03_data.slide +60 -0
- package/skills/wecom-unified/assets/templates/editorial-forest/DESIGN.preset.md +135 -0
- package/skills/wecom-unified/assets/templates/editorial-forest/shell/content.jsx +19 -0
- package/skills/wecom-unified/assets/templates/editorial-forest/slides/01_cover.slide +29 -0
- package/skills/wecom-unified/assets/templates/editorial-forest/slides/02_cards.slide +60 -0
- package/skills/wecom-unified/assets/templates/editorial-forest/slides/03_data.slide +49 -0
- package/skills/wecom-unified/assets/templates/editorial-forest/slides/04_image.slide +46 -0
- package/skills/wecom-unified/assets/templates/emerald-editorial/DESIGN.preset.md +119 -0
- package/skills/wecom-unified/assets/templates/emerald-editorial/shell/content.jsx +18 -0
- package/skills/wecom-unified/assets/templates/emerald-editorial/slides/01_cover.slide +36 -0
- package/skills/wecom-unified/assets/templates/emerald-editorial/slides/02_section.slide +39 -0
- package/skills/wecom-unified/assets/templates/emerald-editorial/slides/03_data.slide +79 -0
- package/skills/wecom-unified/assets/templates/emerald-editorial/slides/04_steps.slide +53 -0
- package/skills/wecom-unified/assets/templates/grove/DESIGN.preset.md +159 -0
- package/skills/wecom-unified/assets/templates/grove/shell/content.jsx +18 -0
- package/skills/wecom-unified/assets/templates/grove/shell/content_light.jsx +18 -0
- package/skills/wecom-unified/assets/templates/grove/slides/01_cover.slide +26 -0
- package/skills/wecom-unified/assets/templates/grove/slides/02_compare.slide +92 -0
- package/skills/wecom-unified/assets/templates/grove/slides/03_table.slide +68 -0
- package/skills/wecom-unified/assets/templates/index.json +280 -0
- package/skills/wecom-unified/assets/templates/long-table/DESIGN.preset.md +135 -0
- package/skills/wecom-unified/assets/templates/long-table/shell/content.jsx +36 -0
- package/skills/wecom-unified/assets/templates/long-table/slides/01_cover.slide +71 -0
- package/skills/wecom-unified/assets/templates/long-table/slides/02_cards.slide +72 -0
- package/skills/wecom-unified/assets/templates/long-table/slides/03_timeline.slide +81 -0
- package/skills/wecom-unified/assets/templates/long-table/slides/04_image.slide +60 -0
- package/skills/wecom-unified/assets/templates/sakura-chroma/DESIGN.preset.md +121 -0
- package/skills/wecom-unified/assets/templates/sakura-chroma/shell/content.jsx +13 -0
- package/skills/wecom-unified/assets/templates/sakura-chroma/slides/01_cover.slide +54 -0
- package/skills/wecom-unified/assets/templates/sakura-chroma/slides/02_products.slide +134 -0
- package/skills/wecom-unified/assets/templates/sakura-chroma/slides/03_section.slide +30 -0
- package/skills/wecom-unified/assets/templates/sakura-chroma/slides/04_schedule.slide +65 -0
- package/skills/wecom-unified/assets/templates/signal/DESIGN.preset.md +121 -0
- package/skills/wecom-unified/assets/templates/signal/shell/content.jsx +18 -0
- package/skills/wecom-unified/assets/templates/signal/shell/content_dark.jsx +23 -0
- package/skills/wecom-unified/assets/templates/signal/slides/01_cover.slide +48 -0
- package/skills/wecom-unified/assets/templates/signal/slides/02_cards.slide +67 -0
- package/skills/wecom-unified/assets/templates/signal/slides/03_data.slide +68 -0
- package/skills/wecom-unified/references/wecomcli-calendar-agenda.md +227 -0
- package/skills/wecom-unified/references/wecomcli-calendar-cancel.md +108 -0
- package/skills/wecom-unified/references/wecomcli-calendar-create.md +238 -0
- package/skills/wecom-unified/references/wecomcli-calendar-freebusy.md +207 -0
- package/skills/wecom-unified/references/wecomcli-calendar-meeting-room.md +170 -0
- package/skills/wecom-unified/references/wecomcli-calendar-search.md +209 -0
- package/skills/wecom-unified/references/wecomcli-calendar-update.md +272 -0
- package/skills/wecom-unified/references/wecomcli-calendar.md +296 -0
- package/skills/wecom-unified/references/wecomcli-contact.md +48 -0
- package/skills/wecom-unified/references/wecomcli-disk.md +380 -0
- package/skills/wecom-unified/references/wecomcli-doc-contents-append.md +20 -0
- package/skills/wecom-unified/references/wecomcli-doc-contents-overwrite.md +27 -0
- package/skills/wecom-unified/references/wecomcli-doc-create.md +162 -0
- package/skills/wecom-unified/references/wecomcli-doc-manage-doc-members-update.md +24 -0
- package/skills/wecom-unified/references/wecomcli-doc-manage-doc-names-update.md +20 -0
- package/skills/wecom-unified/references/wecomcli-doc-manage-doc-rules-update.md +22 -0
- package/skills/wecom-unified/references/wecomcli-doc-manage.md +127 -0
- package/skills/wecom-unified/references/wecomcli-doc.md +135 -0
- package/skills/wecom-unified/references/wecomcli-email-forward-mail.md +131 -0
- package/skills/wecom-unified/references/wecomcli-email-get-mail.md +187 -0
- package/skills/wecom-unified/references/wecomcli-email-reply-mail.md +138 -0
- package/skills/wecom-unified/references/wecomcli-email-search-mail.md +114 -0
- package/skills/wecom-unified/references/wecomcli-email-security.md +52 -0
- package/skills/wecom-unified/references/wecomcli-email-send-mail.md +186 -0
- package/skills/wecom-unified/references/wecomcli-email-send-schedule.md +83 -0
- package/skills/wecom-unified/references/wecomcli-email.md +206 -0
- package/skills/wecom-unified/references/wecomcli-media.md +89 -0
- package/skills/wecom-unified/references/wecomcli-meeting-cancel.md +113 -0
- package/skills/wecom-unified/references/wecomcli-meeting-create.md +167 -0
- package/skills/wecom-unified/references/wecomcli-meeting-list.md +228 -0
- package/skills/wecom-unified/references/wecomcli-meeting-original-get.md +101 -0
- package/skills/wecom-unified/references/wecomcli-meeting-search.md +176 -0
- package/skills/wecom-unified/references/wecomcli-meeting-update.md +217 -0
- package/skills/wecom-unified/references/wecomcli-meeting.md +366 -0
- package/skills/wecom-unified/references/wecomcli-message.md +190 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-animation.md +62 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-box.md +102 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-chart.md +261 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-codeblock.md +70 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-diagram.md +54 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-faicon.md +71 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-hyperlink.md +55 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-image.md +107 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-math.md +65 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-qrcode.md +22 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-slide.md +74 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-svg.md +95 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-table.md +72 -0
- package/skills/wecom-unified/references/wecomcli-pptx-component-text.md +96 -0
- package/skills/wecom-unified/references/wecomcli-pptx-content-contract.md +73 -0
- package/skills/wecom-unified/references/wecomcli-pptx-create-from-material.md +67 -0
- package/skills/wecom-unified/references/wecomcli-pptx-create-from-scratch.md +178 -0
- package/skills/wecom-unified/references/wecomcli-pptx-create-from-template.md +123 -0
- package/skills/wecom-unified/references/wecomcli-pptx-design-principle.md +65 -0
- package/skills/wecom-unified/references/wecomcli-pptx-government-contract.md +40 -0
- package/skills/wecom-unified/references/wecomcli-pptx-human-alignment.md +140 -0
- package/skills/wecom-unified/references/wecomcli-pptx-pptx-api.md +161 -0
- package/skills/wecom-unified/references/wecomcli-pptx-pptx-edit.md +37 -0
- package/skills/wecom-unified/references/wecomcli-pptx-story-principle.md +184 -0
- package/skills/wecom-unified/references/wecomcli-pptx-templates-README.md +165 -0
- package/skills/wecom-unified/references/wecomcli-pptx-templates-anti-ai-slop.md +52 -0
- package/skills/wecom-unified/references/wecomcli-pptx.md +158 -0
- package/skills/wecom-unified/references/wecomcli-sheet-conditional-formatting.md +203 -0
- package/skills/wecom-unified/references/wecomcli-sheet-filter.md +179 -0
- package/skills/wecom-unified/references/wecomcli-sheet-float-image.md +235 -0
- package/skills/wecom-unified/references/wecomcli-sheet-formulas.md +71 -0
- package/skills/wecom-unified/references/wecomcli-sheet-history.md +118 -0
- package/skills/wecom-unified/references/wecomcli-sheet-protection.md +170 -0
- package/skills/wecom-unified/references/wecomcli-sheet-range-operations.md +306 -0
- package/skills/wecom-unified/references/wecomcli-sheet-read-data.md +151 -0
- package/skills/wecom-unified/references/wecomcli-sheet-search-replace.md +121 -0
- package/skills/wecom-unified/references/wecomcli-sheet-structure-operations.md +394 -0
- package/skills/wecom-unified/references/wecomcli-sheet-style.md +246 -0
- package/skills/wecom-unified/references/wecomcli-sheet-table-style.md +199 -0
- package/skills/wecom-unified/references/wecomcli-sheet-validation.md +217 -0
- package/skills/wecom-unified/references/wecomcli-sheet-visual-standards.md +166 -0
- package/skills/wecom-unified/references/wecomcli-sheet-workbook.md +264 -0
- package/skills/wecom-unified/references/wecomcli-sheet-write-cells.md +320 -0
- package/skills/wecom-unified/references/wecomcli-sheet-xlsx-process.md +324 -0
- package/skills/wecom-unified/references/wecomcli-sheet.md +96 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-data-driven-pages.md +50 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-edit.md +526 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-arraylist.md +369 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-datetime.md +283 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-logic.md +247 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-math.md +362 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-operators.md +246 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-pageblock.md +76 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-reference.md +192 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-templates.md +410 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-text.md +377 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-formula-user.md +22 -0
- package/skills/wecom-unified/references/wecomcli-smartpage-mdx-syntax.md +739 -0
- package/skills/wecom-unified/references/wecomcli-smartpage.md +179 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-chart-types.md +95 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-common.md +160 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-edit.md +609 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-field-types.md +438 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-formula.md +845 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-read.md +411 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-record-values.md +218 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-ai_efficiency.md +709 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-connect_to_app.md +380 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-financial_accounting.md +369 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-hr_and_administration.md +475 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-ledger_records.md +156 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-manufacturing.md +395 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-marketing.md +186 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-office_essentials.md +299 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-personal_efficiency.md +70 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-procurement_logistics.md +325 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-project_management.md +564 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-rd_process_customer.md +222 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-rd_process_ops.md +105 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-rd_process_project.md +109 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-rd_process_research.md +92 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-sales_and_operations.md +446 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-store_management.md +431 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-team_tasks.md +274 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-wechat_customer.md +384 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-template-work_report.md +100 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-templates.md +53 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-view-types.md +373 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-webhook-examples.md +176 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet-webhook.md +186 -0
- package/skills/wecom-unified/references/wecomcli-smartsheet.md +147 -0
- package/skills/wecom-unified/references/wecomcli-todo-create.md +137 -0
- package/skills/wecom-unified/references/wecomcli-todo-delete.md +63 -0
- package/skills/wecom-unified/references/wecomcli-todo-finish.md +72 -0
- package/skills/wecom-unified/references/wecomcli-todo-get.md +69 -0
- package/skills/wecom-unified/references/wecomcli-todo-list.md +136 -0
- package/skills/wecom-unified/references/wecomcli-todo-update.md +112 -0
- package/skills/wecom-unified/references/wecomcli-todo.md +68 -0
- package/skills/wecom-unified/scripts/build_docx.py +1274 -0
- package/skills/wecom-unified/scripts/build_page.py +2449 -0
- package/skills/wecom-unified/scripts/collect.py +868 -0
- package/skills/wecom-unified/scripts/doc_image_extractor.py +498 -0
- package/skills/wecom-unified/scripts/pptx2image.py +268 -0
- package/skills/wecom-unified/scripts/recalc.py +403 -0
- package/systemd/wezard-svr.service.template +2 -0
- package/systemd/wezard.service.template +6 -0
- package/web/chat.css +70 -273
- package/web/chat.js +2269 -2190
- package/dist/daemon/bot-mux.js +0 -161
- package/dist/daemon/bot-mux.js.map +0 -1
- package/dist/daemon/chat-log.js +0 -130
- package/dist/daemon/chat-log.js.map +0 -1
- package/dist/daemon/dispatch.js +0 -6
- package/dist/daemon/dispatch.js.map +0 -1
- package/dist/daemon/idle-nudge.js +0 -90
- package/dist/daemon/idle-nudge.js.map +0 -1
- package/dist/daemon/message-events.js +0 -1155
- package/dist/daemon/message-events.js.map +0 -1
- package/dist/daemon/pending-items.js +0 -160
- package/dist/daemon/pending-items.js.map +0 -1
- package/dist/daemon/router.js +0 -742
- package/dist/daemon/router.js.map +0 -1
- package/dist/daemon/tips.js +0 -25
- package/dist/daemon/tips.js.map +0 -1
- package/dist/daemon/wedoc.js +0 -210
- package/dist/daemon/wedoc.js.map +0 -1
- package/dist/shared/role-search.js +0 -100
- package/dist/shared/role-search.js.map +0 -1
- package/dist/shared/startup-notice.js +0 -21
- package/dist/shared/startup-notice.js.map +0 -1
- package/dist/shared/turn-state.js +0 -27
- package/dist/shared/turn-state.js.map +0 -1
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
# 数组/列表公式函数(`AT`, `CHOOSE`, `CONTAINS`, `CONTAINSALL`, `CONTAINSONLY`, `FILTER`, `FIRST`, `LAST`, `LIST`, `LISTCOMBINE`, `LISTJOIN`, `LOOKUP`, `UNIQUE`)
|
|
2
|
+
|
|
3
|
+
> 用于对数据进行筛选、过滤、提取、合并、去重等操作,适用于数据统计、关联查询、列表处理等场景。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## AT - 获取列表指定位置元素
|
|
8
|
+
|
|
9
|
+
**表达式**: `列表.AT(位置)`
|
|
10
|
+
|
|
11
|
+
**函数说明**: 返回列表里面第N个位置的元素
|
|
12
|
+
|
|
13
|
+
**参数说明**:
|
|
14
|
+
|
|
15
|
+
- 列表:可以是数据表.字段、或一系列值
|
|
16
|
+
- 位置:要返回的值的位置(从 1 开始)。正数,表示从左往右第 N 个值;负数,表示从右往左第 N 个值。
|
|
17
|
+
|
|
18
|
+
**示例**:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
LIST(1,2,3,4).AT(2) => 2 //返回列表 [1,2,3,4] 中的从左往右第2个元素
|
|
22
|
+
LIST("智","能","表","格").AT(-2) => 表 //返回列表 ["智","能","表","格"] 中从右往左第2个元素
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## CHOOSE - 根据索引选择
|
|
28
|
+
|
|
29
|
+
**表达式**: `CHOOSE(索引号,选择1,[选择2],...)`
|
|
30
|
+
|
|
31
|
+
**函数说明**: 根据索引号从选择列表中返回对应需要执行的值或操作
|
|
32
|
+
|
|
33
|
+
**参数说明**:
|
|
34
|
+
|
|
35
|
+
- 索引号:必需,指定选择列表中某个选择对应的位置。索引号必须是1到254之间的数字
|
|
36
|
+
- 选择1:必需,参数可以是一个字段,也可以是列表,也可以是数据表.字段
|
|
37
|
+
- 选择2:可选,其他可选择的值,最多可以支持254个选择
|
|
38
|
+
|
|
39
|
+
**示例**:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
CHOOSE(3,"Hello"," ","World") => World
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## CONTAINS - 包含任一判断
|
|
48
|
+
|
|
49
|
+
**表达式**: `查找范围.CONTAINS([值1,值2,...])`
|
|
50
|
+
|
|
51
|
+
**函数说明**: 判断查找范围中是否包含任一要查找的内容
|
|
52
|
+
|
|
53
|
+
**参数说明**:
|
|
54
|
+
|
|
55
|
+
- 查找范围:必填,查找的范围,可以是多个值也可以是一个值
|
|
56
|
+
- 值:要查找的内容,可以是多个值也可以是一个值
|
|
57
|
+
|
|
58
|
+
**限制**:
|
|
59
|
+
|
|
60
|
+
- CONTAINS只支持同类型比较。
|
|
61
|
+
|
|
62
|
+
通过文本筛选人员字段:
|
|
63
|
+
[反例]: [表.人员字段].FILTER([Each].CONTAINS("zhangsan")).FIRST()
|
|
64
|
+
[正例]: [表.人员字段].FILTER([Each].CONTAINTEXT("zhangsan")).FIRST() // CONTAINTEXT 支持人员通过文本形式筛选
|
|
65
|
+
[正例]: [表.人员字段].FILTER([Each].CONTAINS(USER())).FIRST() // USER() 返回的对象是user类型的,支持
|
|
66
|
+
|
|
67
|
+
**示例**:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
[项目管理表.项目成员].CONTAINS([项目负责人]) // 判断 [项目管理表] 里面的 [项目成员] 整列内容中是否包含项目负责人中任意一个
|
|
71
|
+
[多选].CONTAINS("选项1","选项2") // 判断 [多选] 字段中是否包含"选项1"、"选项2"中的任意一个
|
|
72
|
+
LIST(1,2,3,4).CONTAINS(2,5) => TRUE //在列表(1,2,3,4)中找是否包含2、5任意一个
|
|
73
|
+
LIST(1,2,3,4).CONTAINS(5,6,7) => FALSE //在列表(1,2,3,4)中找是否包含5、6、7任意一个
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## CONTAINSALL - 包含全部判断
|
|
79
|
+
|
|
80
|
+
**表达式**: `查找范围.CONTAINSALL([值1,值2,...])`
|
|
81
|
+
|
|
82
|
+
**函数说明**: 判断查找范围是否包含所有查找内容
|
|
83
|
+
|
|
84
|
+
**参数说明**:
|
|
85
|
+
|
|
86
|
+
- 查找范围:必填,查找的范围
|
|
87
|
+
- 值:要查找的内容
|
|
88
|
+
|
|
89
|
+
**示例**:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
[项目成员].CONTAINSALL([项目负责人]) // 判断当前表里面的 [项目成员]字段中包含全部[项目负责人]
|
|
93
|
+
[多选].CONTAINSALL("选项1","选项2") // 判断[多选]字段中"选项1"和"选项2"是否都包含
|
|
94
|
+
LIST(1,2,3,4).CONTAINSALL(1,2) => TRUE // 1,2,3,4是否1,2都包含
|
|
95
|
+
LIST(1,2,3,4).CONTAINSALL(1,2,5) => FALSE // 1,2,3,4是否1,2,5都包含
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## CONTAINSONLY - 仅包含判断
|
|
101
|
+
|
|
102
|
+
**表达式**: `查找范围.CONTAINSONLY([值1,值2,...])`
|
|
103
|
+
|
|
104
|
+
**函数说明**: 判断查找范围是否仅包含所有查找内容,不要求顺序一致
|
|
105
|
+
|
|
106
|
+
**参数说明**:
|
|
107
|
+
|
|
108
|
+
- 查找范围:必填,查找的范围
|
|
109
|
+
- 值:要查找的内容
|
|
110
|
+
|
|
111
|
+
**示例**:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
[项目成员].CONTAINSONLY([项目负责人]) // 判断当前表里面的 [项目成员] 字段是否只包含[项目负责人]
|
|
115
|
+
[多选].CONTAINSONLY("选项1","选项2") // 判断 [多选] 字段中是否只包含"选项1"和"选项2"
|
|
116
|
+
LIST(1,2,3,4).CONTAINSONLY(1,2) => FALSE // 1,2,3,4是否只包含1,2
|
|
117
|
+
LIST(1,2,3,4).CONTAINSONLY(1,2,4,3) => TRUE // 1,2,3,4是否只包含1,2,4,3
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## FILTER - 筛选函数
|
|
123
|
+
|
|
124
|
+
[警告] **必须使用 [Each] 引用**:在筛选条件中引用字段时,必须写成 `[Each].[字段名]`
|
|
125
|
+
|
|
126
|
+
**表达式**: `数据范围.FILTER(筛选条件)`
|
|
127
|
+
|
|
128
|
+
**函数说明**: 从数据范围中筛选出符合筛选条件的内容,需要通过 `[Each]` 进行逐一判断
|
|
129
|
+
|
|
130
|
+
**参数说明**:
|
|
131
|
+
- 数据范围:参与条件筛选的范围
|
|
132
|
+
- 筛选条件:取数据范围的值进行条件筛选,返回符合筛选条件的值
|
|
133
|
+
|
|
134
|
+
**示例**:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
[正例] 正确写法:
|
|
138
|
+
[任务管理表].FILTER([Each].[启动时间]<TODAY()).[项目名称] =>项目名称1,项目名称3 // 找出 [启动时间] 今天之前的项目有哪些
|
|
139
|
+
LIST(1,2,3,4).FILTER([Each]>2) => 3,4 //查找列表 [1,2,3,4] 中大于2的值有为 3,4
|
|
140
|
+
|
|
141
|
+
[反例] 错误写法(会解析失败):
|
|
142
|
+
[任务管理表].FILTER([启动时间]<TODAY()) // 缺少 [Each]
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### 基本筛选
|
|
146
|
+
|
|
147
|
+
[表名].FILTER([Each].[字段名] = 值).[字段]
|
|
148
|
+
|
|
149
|
+
- `[Each]` 表示当前遍历的行,在FILTER中取*表名*对应的字段,*必须*用到Each。
|
|
150
|
+
- 数据表中引用整表时,`FILTER`函数需要指定引用字段。
|
|
151
|
+
|
|
152
|
+
[反例]写法:
|
|
153
|
+
[表名].FILTER([Each].[字段名] = 值) // 未指定字段
|
|
154
|
+
[正例]写法:
|
|
155
|
+
[表名].FILTER([Each].[字段名] = 值).[字段]
|
|
156
|
+
|
|
157
|
+
**示例**:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
// 筛选状态为"完成"的记录
|
|
161
|
+
[任务表].FILTER([Each].[状态] = "完成").[任务名称]
|
|
162
|
+
|
|
163
|
+
// 筛选金额大于1000的订单
|
|
164
|
+
[订单表].FILTER([Each].[金额] > 1000).[订单名称]
|
|
165
|
+
|
|
166
|
+
// 筛选日期在今天之后的任务
|
|
167
|
+
[任务表].FILTER([Each].[截止日期] > TODAY()).[任务名称]
|
|
168
|
+
|
|
169
|
+
// 引用其他表字段,与自己比较
|
|
170
|
+
// 统计表: 统计年份、成单金额汇总
|
|
171
|
+
// 成单表: 日期、成单金额
|
|
172
|
+
[成单表].FILTER(YEAR([Each].[日期]) = [统计年份]).[成单金额].SUM()
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### 筛选后统计
|
|
176
|
+
|
|
177
|
+
[表名].FILTER([Each].[字段A] = 值).[字段B].SUM()
|
|
178
|
+
|
|
179
|
+
**示例**:
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
// 统计已完成任务的总金额
|
|
183
|
+
[任务表].FILTER([Each].[状态] = "完成").[金额].SUM()
|
|
184
|
+
|
|
185
|
+
// 统计优先级为高的任务数量
|
|
186
|
+
[任务表].FILTER([Each].[优先级] = "高").[任务名称].COUNTA()
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### 多条件筛选(AND)
|
|
190
|
+
|
|
191
|
+
[表名].FILTER(AND([Each].[字段A] = 值1, [Each].[字段B] > 值2))
|
|
192
|
+
|
|
193
|
+
**示例**:
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
// 筛选已完成且金额大于1000的任务
|
|
197
|
+
[任务表].FILTER(AND([Each].[状态] = "完成", [Each].[金额] > 1000)).[金额].SUM()
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### 多条件筛选(OR)
|
|
201
|
+
|
|
202
|
+
[表名].FILTER(OR([Each].[字段A] = 值1, [Each].[字段B] = 值2))
|
|
203
|
+
|
|
204
|
+
**示例**:
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
// 筛选优先级为高或紧急的任务
|
|
208
|
+
[任务表].FILTER(OR([Each].[优先级] = "高", [Each].[优先级] = "紧急"))
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### 筛选条件引用当前行字段
|
|
212
|
+
|
|
213
|
+
[其他表].FILTER([Each].[字段] = [当前表字段])
|
|
214
|
+
|
|
215
|
+
**示例**:
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
// 统计另一个表中状态等于本表状态的记录总金额
|
|
219
|
+
[订单表].FILTER([Each].[状态] = [状态]).[金额].SUM()
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### 访问关联记录内的字段
|
|
223
|
+
|
|
224
|
+
可以通过[关联字段]筛选条件。在公式中,关联字段默认代表关联表顺序第一个文本或日期或数字类型列。
|
|
225
|
+
|
|
226
|
+
**示例**:
|
|
227
|
+
// 学生表字段列表:姓名、年龄、所属班级(引用)
|
|
228
|
+
// 班级表字段列表:班级名、班级学生数量(公式)。
|
|
229
|
+
// 需求:需要统计所有班的学生。
|
|
230
|
+
|
|
231
|
+
// 班级学生数量(公式)
|
|
232
|
+
[学生表].FILTER([Each].[所属班级] = [班级名]).COUNTA()
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## FIRST - 首个元素
|
|
237
|
+
|
|
238
|
+
**表达式**: `列表.FIRST()`
|
|
239
|
+
|
|
240
|
+
**函数说明**: 返回列表中的第一个元素
|
|
241
|
+
|
|
242
|
+
**参数说明**: 列表:可以是数据表.字段、或一系列值
|
|
243
|
+
|
|
244
|
+
**示例**:
|
|
245
|
+
|
|
246
|
+
```
|
|
247
|
+
LIST(1,2,3).FIRST() => 1 //返回列表[1,2,3]中的第一个元素
|
|
248
|
+
LIST("智","能","表","格").FIRST() => 智 //返回列表 ["智","能","表","格"] 中的第一个元素
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## LAST - 末尾元素
|
|
254
|
+
|
|
255
|
+
**表达式**: `列表.LAST()`
|
|
256
|
+
|
|
257
|
+
**函数说明**: 返回列表中的最后一个元素
|
|
258
|
+
|
|
259
|
+
**参数说明**: 列表:可以是数据表.字段、或一系列值
|
|
260
|
+
|
|
261
|
+
**示例**:
|
|
262
|
+
|
|
263
|
+
```
|
|
264
|
+
LIST(1,2,3).LAST() => 3 //返回列表[1,2,3]中的最后一个元素
|
|
265
|
+
LIST("智","能","表","格").LAST() => 格 //返回列表 ["智","能","表","格"] 中的最后一个元素
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## LIST - 创建列表
|
|
271
|
+
|
|
272
|
+
**表达式**: `LIST([值1,值2,...])`
|
|
273
|
+
|
|
274
|
+
**函数说明**: 返回一个列表
|
|
275
|
+
|
|
276
|
+
**参数说明**: 值:参与生成列表的内容
|
|
277
|
+
|
|
278
|
+
**示例**:
|
|
279
|
+
|
|
280
|
+
```
|
|
281
|
+
LIST([项目负责人],[项目成员]).LISTCOMBINE() => 返回项目总参与人的列表
|
|
282
|
+
LIST("智","能","表","格") => [智,能,表,格] //返回列表 [智,能,表,格]
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## LISTCOMBINE - 合并列表
|
|
288
|
+
|
|
289
|
+
**表达式**: `值1.LISTCOMBINE([值2,...])`
|
|
290
|
+
|
|
291
|
+
**函数说明**: 将多个列表合并为一个列表
|
|
292
|
+
|
|
293
|
+
**参数说明**: 字段:可以是一个字段,也可以是列表,也可以是数据表.字段
|
|
294
|
+
|
|
295
|
+
**示例**:
|
|
296
|
+
|
|
297
|
+
```
|
|
298
|
+
[项目管理表].[项目负责人].LISTCOMBINE([项目管理表].[部门负责人]) // 将项目负责人列表和部门负责人列表合并为一个列表。
|
|
299
|
+
LISTCOMBINE(LIST(1,2,LIST(3,4)),5,6) => [1,2,3,4,5,6] //将嵌套列表 [1,2,[3,4]] 和常量5,6合并返回列表 [1,2,3,4,5,6]
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## LISTJOIN - 列表拼接
|
|
305
|
+
|
|
306
|
+
**表达式**: `列表.LISTJOIN([分隔符])`
|
|
307
|
+
|
|
308
|
+
**函数说明**: 用分隔符拼接列表中的多个值
|
|
309
|
+
|
|
310
|
+
**参数说明**:
|
|
311
|
+
|
|
312
|
+
- 列表:必填,可以是数据表.字段、或一系列值
|
|
313
|
+
- 分隔符:用于拼接列表的值。自定义拼接符,不填写则默认是英文逗号
|
|
314
|
+
|
|
315
|
+
**示例**:
|
|
316
|
+
|
|
317
|
+
```
|
|
318
|
+
LIST(1,2,3,4).LISTJOIN() => 1,2,3,4 //将列表用 "," 拼接返回文本
|
|
319
|
+
LIST("智","能","表","格").LISTJOIN("-") => 智-能-表-格 //将列表用"-" 拼接返回文本
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## LOOKUP - 查找
|
|
325
|
+
|
|
326
|
+
**表达式**: `LOOKUP(查找的值,匹配的值,返回的字段,[查找模式])`
|
|
327
|
+
|
|
328
|
+
**函数说明**: 在列表中查找符合条件的值
|
|
329
|
+
|
|
330
|
+
**参数说明**:
|
|
331
|
+
|
|
332
|
+
- 查找的值:要查找的值,当前表的字段,也可以手动输入
|
|
333
|
+
- 匹配的值:用来和查找值进行匹配的值,其他表的字段
|
|
334
|
+
- 返回的字段:条件匹配后返回结果的字段 ,和匹配的值是同一个表
|
|
335
|
+
- 查找模式:字段多选的时候,1代表拆分选项,0代表不拆分
|
|
336
|
+
|
|
337
|
+
**示例**:
|
|
338
|
+
|
|
339
|
+
```
|
|
340
|
+
LOOKUP([项目负责人],[人员信息表.姓名],[人员信息表.所属部门],1)=>部门1 //根据项目负责人 = 姓名,返回人员信息表中对应姓名的所属部门。
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
---
|
|
344
|
+
|
|
345
|
+
## UNIQUE - 去重
|
|
346
|
+
|
|
347
|
+
**表达式**: `值1.UNIQUE([值2,...])`
|
|
348
|
+
|
|
349
|
+
**函数说明**: 对列表中的数据进行去重
|
|
350
|
+
|
|
351
|
+
**参数说明**: 值:可以是多个值,也可以是数据表.字段,也可以是多个字段
|
|
352
|
+
|
|
353
|
+
**示例**:
|
|
354
|
+
|
|
355
|
+
```
|
|
356
|
+
[经营分析].[门店店员].UNIQUE() => 返回去重后的门店店员
|
|
357
|
+
[经营分析].[门店店员].UNIQUE().COUNTA() => 对店员列表去重后计数=店员人数
|
|
358
|
+
LIST(1,2,2,3,1).UNIQUE() => [1,2,3] //对列表 [1,2,2,3,1] 去重返回列表 [1,2,3]
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
**简化写法**:
|
|
362
|
+
[表名].[字段名].UNIQUE()
|
|
363
|
+
|
|
364
|
+
**示例**:
|
|
365
|
+
|
|
366
|
+
```
|
|
367
|
+
// 统计不重复的部门数量
|
|
368
|
+
[员工表.部门].UNIQUE().COUNTA()
|
|
369
|
+
```
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
# 日期时间公式函数(`DATE`, `DATEDIF`, `DATEVALUE`, `DAY`, `HOUR`, `MINUTE`, `MONTH`, `NETWORKDAYS`, `NOW`, `SECOND`, `TODAY`, `WEEKDAY`, `WEEKNUM`, `WORKDAY`, `YEAR`)
|
|
2
|
+
|
|
3
|
+
> 用于获取当前日期、日期计算、日期差值、工作日计算等日期时间处理,适用于倒计时显示、工龄计算、截止日期判断等场景。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## DATE - 构造日期
|
|
8
|
+
|
|
9
|
+
**表达式**: `DATE(年, 月, 日)`
|
|
10
|
+
|
|
11
|
+
**函数说明**: 将代表年、月、日的数字转换为日期。
|
|
12
|
+
|
|
13
|
+
**参数说明**:
|
|
14
|
+
- 年:必需,年参数的值可以包含一到四位数字
|
|
15
|
+
- 月:必需,一个正整数或负整数,表示一年中从1月至12月(一月到十二月)的各个月
|
|
16
|
+
- 日:必需,一个正整数或负整数,表示一月中从01日到31日的各天
|
|
17
|
+
|
|
18
|
+
**示例**:
|
|
19
|
+
```
|
|
20
|
+
DATE(2026,04,18) => 2026/4/18
|
|
21
|
+
DATE(2026, 1, 1)
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## DATEDIF - 日期差
|
|
27
|
+
|
|
28
|
+
**表达式**: `DATEDIF(起始日期, 结束日期, 单位)`
|
|
29
|
+
|
|
30
|
+
**函数说明**: 计算起始日期和结束日期之间的天数、月数或年数。
|
|
31
|
+
|
|
32
|
+
**参数说明**:
|
|
33
|
+
- 起始日期:必需,计算中要使用的开始日期。必须是以下一种:日期格式的列、返回日期类型的函数、或数字
|
|
34
|
+
- 结束日期:必需,计算中要使用的结束日期。必须是以下一种:日期格式的列、返回日期类型的函数、或数字
|
|
35
|
+
- 单位:必需,某种时间单位的缩写字符串。例如, "Y"代表年数、"M" 代表月数、"D"代表天数、"MD"代表同月间隔天数、"YM"代表同年间隔月数、"YD"代表同年间隔天数
|
|
36
|
+
|
|
37
|
+
**示例**:
|
|
38
|
+
```
|
|
39
|
+
DATEDIF("2026/4/10","2026/4/18","D") =>8
|
|
40
|
+
DATEDIF([入职日期], TODAY(), "Y") // 计算工龄(年)
|
|
41
|
+
DATEDIF([开始日期], [结束日期], "D") // 计算项目持续天数
|
|
42
|
+
DATEDIF([开始日期], [结束日期], "M") // 计算相差月数
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## DATEVALUE - 日期值转换
|
|
48
|
+
|
|
49
|
+
**表达式**: `DATEVALUE(日期字符串)`
|
|
50
|
+
|
|
51
|
+
**函数说明**: 将日期字符串转换为数字。数字代表是从距离1900年1月1日的天数。
|
|
52
|
+
|
|
53
|
+
**参数说明**: 日期字符串:必需。代表采用日期格式的日期文本,或是对包含这种文本的字段
|
|
54
|
+
|
|
55
|
+
**示例**:
|
|
56
|
+
```
|
|
57
|
+
DATEVALUE("2026/04/18") => 46130
|
|
58
|
+
DATEVALUE("2026-01-01")
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## DAY - 获取日期
|
|
64
|
+
|
|
65
|
+
**表达式**: `DAY(日期)`
|
|
66
|
+
|
|
67
|
+
**函数说明**: 获取日期(或转换为数值的日期)对应的日。
|
|
68
|
+
|
|
69
|
+
**参数说明**: 日期:必需,从中提取具体几号的日期
|
|
70
|
+
|
|
71
|
+
**示例**:
|
|
72
|
+
```
|
|
73
|
+
DAY("2026-4-20 10:30:55") => 20
|
|
74
|
+
DAY([开工日期])
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## HOUR - 获取小时
|
|
80
|
+
|
|
81
|
+
**表达式**: `HOUR(时间)`
|
|
82
|
+
|
|
83
|
+
**函数说明**: 获取时间(或转换为数值的时间)的小时数。
|
|
84
|
+
|
|
85
|
+
**参数说明**: 时间:必需,从中提取小时数的时间
|
|
86
|
+
|
|
87
|
+
**示例**:
|
|
88
|
+
```
|
|
89
|
+
HOUR("2026-4-20 10:30:55") => 10
|
|
90
|
+
HOUR([打卡时间])
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## MINUTE - 获取分钟
|
|
96
|
+
|
|
97
|
+
**表达式**: `MINUTE(时间)`
|
|
98
|
+
|
|
99
|
+
**函数说明**: 获取时间(或转换为数值的时间)的分钟数
|
|
100
|
+
|
|
101
|
+
**参数说明**: 时间:必需,从中提取分钟数的时间
|
|
102
|
+
|
|
103
|
+
**示例**:
|
|
104
|
+
```
|
|
105
|
+
MINUTE("2026-4-20 10:30:55") => 30
|
|
106
|
+
MINUTE([会议开始时间])
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## MONTH - 获取月份
|
|
112
|
+
|
|
113
|
+
**表达式**: `MONTH(日期)`
|
|
114
|
+
|
|
115
|
+
**函数说明**: 获取日期(或转换为数值的日期)的月份
|
|
116
|
+
|
|
117
|
+
**参数说明**: 日期:必需,从中提取月份的日期
|
|
118
|
+
|
|
119
|
+
**示例**:
|
|
120
|
+
```
|
|
121
|
+
MONTH("2026-4-20") => 4
|
|
122
|
+
MONTH([生日])
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## NETWORKDAYS - 工作日天数
|
|
128
|
+
|
|
129
|
+
**表达式**: `NETWORKDAYS(开始日期,终止日期,[节假日])`
|
|
130
|
+
|
|
131
|
+
**函数说明**: 返回开始日期和终止日期之间的净工作日天数。工作日不包括周末和专门指定的假期。
|
|
132
|
+
|
|
133
|
+
**参数说明**:
|
|
134
|
+
- 开始日期:必需,一个代表开始日期的日期
|
|
135
|
+
- 终止日期:必需,一个代表终止日期的日期
|
|
136
|
+
- 节假日:可选,默认为双休日,也可加上列入该参数的日期范围或日期字段
|
|
137
|
+
|
|
138
|
+
**示例**:
|
|
139
|
+
```
|
|
140
|
+
NETWORKDAYS("2026/4/18", "2026/4/25", LIST("2026/4/19", "2026/5/18")) => 5
|
|
141
|
+
//计算 2026/4/18 和 2026/4/25 之间除去2026/4/19和双休日后的天数
|
|
142
|
+
NETWORKDAYS([开始日期], [结束日期])
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## NOW - 当前日期时间
|
|
148
|
+
|
|
149
|
+
**表达式**: `NOW()`
|
|
150
|
+
|
|
151
|
+
**函数说明**: 返回当前日期和时间
|
|
152
|
+
|
|
153
|
+
**参数说明**: NOW 函数语法没有参数
|
|
154
|
+
|
|
155
|
+
**示例**:
|
|
156
|
+
```
|
|
157
|
+
NOW()=>返回当前时间
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## SECOND - 获取秒数
|
|
163
|
+
|
|
164
|
+
**表达式**: `SECOND(时间)`
|
|
165
|
+
|
|
166
|
+
**函数说明**: 获取时间(或转换为数值的时间)的秒数
|
|
167
|
+
|
|
168
|
+
**参数说明**: 时间:必需,从中提取秒数的时间
|
|
169
|
+
|
|
170
|
+
**示例**:
|
|
171
|
+
```
|
|
172
|
+
SECOND("2026-4-20 10:30:55") => 55
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## TODAY - 当前日期
|
|
178
|
+
|
|
179
|
+
**表达式**: `TODAY()`
|
|
180
|
+
|
|
181
|
+
**函数说明**: 返回今天的日期。
|
|
182
|
+
|
|
183
|
+
**参数说明**: TODAY 函数语法没有参数
|
|
184
|
+
|
|
185
|
+
**示例**:
|
|
186
|
+
```
|
|
187
|
+
TODAY() => 返回当前日期
|
|
188
|
+
IF([截止日期] < TODAY(), "已超期", "进行中")
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## WEEKDAY - 星期几
|
|
194
|
+
|
|
195
|
+
**表达式**: `WEEKDAY(日期值, [类型])`
|
|
196
|
+
|
|
197
|
+
**函数说明**: 返回对应于某个日期的一周中的第几天。 默认情况下,天数是1(星期日)到7(星期六)范围内的整数。
|
|
198
|
+
|
|
199
|
+
**参数说明**:
|
|
200
|
+
- 日期值:必需,要查找的那一天的日期
|
|
201
|
+
- 类型:可选。用于确定返回值类型的数字
|
|
202
|
+
- 输入1或省略,返回数字1(星期日)到7(星期六)
|
|
203
|
+
- 输入2,返回数字 1(星期一)到7(星期日)
|
|
204
|
+
- 输入3,返回数字0(星期一)到6(星期六)
|
|
205
|
+
- 输入11,返回数字 1(星期一)到7(星期日)
|
|
206
|
+
- 输入12,返回数字 1(星期二)到7(星期一)
|
|
207
|
+
- 输入13,返回数字1(星期三)到7(星期二)
|
|
208
|
+
- 输入14,返回数字 1(星期四)到7(星期三)
|
|
209
|
+
- 输入15,返回数字 1(星期五)到7(星期四)
|
|
210
|
+
- 输入16,返回数字 1(星期六)到7(星期五)
|
|
211
|
+
- 输入17,返回数字1(星期日)到7(星期六)
|
|
212
|
+
|
|
213
|
+
**示例**:
|
|
214
|
+
```
|
|
215
|
+
WEEKDAY("2026/4/15", 3) => 2
|
|
216
|
+
WEEKDAY([日期])
|
|
217
|
+
// 判断是否为周末
|
|
218
|
+
IF(OR(WEEKDAY([日期]) = 1, WEEKDAY([日期]) = 7), "周末", "工作日")
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## WEEKNUM - 第几周
|
|
224
|
+
|
|
225
|
+
**表达式**: `WEEKNUM(日期, [类型])`
|
|
226
|
+
|
|
227
|
+
**函数说明**: 返回日期在当前年份的第几周
|
|
228
|
+
|
|
229
|
+
**参数说明**:
|
|
230
|
+
- 日期:必需。需要返回所在周序号的目标日期,可以是日期字段或格式为日期类型的数字、公式字段等
|
|
231
|
+
- 类型:可选。默认为 1,表示一周的第 1 天从星期几开始
|
|
232
|
+
- 1或省略 代表星期天开始
|
|
233
|
+
- 2 代表星期一开始
|
|
234
|
+
- 11 代表星期一开始
|
|
235
|
+
- 12 代表星期二开始
|
|
236
|
+
- 13 代表星期三开始
|
|
237
|
+
- 14 代表星期四开始
|
|
238
|
+
- 15 代表星期五开始
|
|
239
|
+
- 16 代表星期六开始
|
|
240
|
+
- 17 代表星期日开始
|
|
241
|
+
- 21代表星期一开始
|
|
242
|
+
|
|
243
|
+
**示例**:
|
|
244
|
+
```
|
|
245
|
+
WEEKNUM("2000-01-01")=> 1
|
|
246
|
+
WEEKNUM([日期])
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## WORKDAY - 工作日计算
|
|
252
|
+
|
|
253
|
+
**表达式**: `WORKDAY(起始日期, 天数, [节假日])`
|
|
254
|
+
|
|
255
|
+
**函数说明**: 返回起始日期之前或之后指定工作日数的日期。工作日不包含周末以及节假日。
|
|
256
|
+
|
|
257
|
+
**参数说明**:
|
|
258
|
+
- 开始日期:必需,计算的开始日期
|
|
259
|
+
- 天数:必需,开始日期之前或之后的非周末和非假日的天数。正值代表未来的日期;负值代表过去的日期。如果天数不是整数,则会截除其小数部分
|
|
260
|
+
- 节假日:可选,默认双休日,一个范围或数组常量
|
|
261
|
+
|
|
262
|
+
**示例**:
|
|
263
|
+
```
|
|
264
|
+
WORKDAY(DATE(2026,4,15), 4, LIST("2026/4/16", "2026/5/18")) => "2026/4/22"
|
|
265
|
+
//在计算工期时会将跳过 2026/5/18 和 2026/4/16 和双休日
|
|
266
|
+
WORKDAY(TODAY(), 3) // 3个工作日后的日期
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## YEAR - 获取年份
|
|
272
|
+
|
|
273
|
+
**表达式**: `YEAR(日期)`
|
|
274
|
+
|
|
275
|
+
**函数说明**: 获取日期(或转换为数值的日期)的年份
|
|
276
|
+
|
|
277
|
+
**参数说明**: 日期:必需, 从中提取年份的日期
|
|
278
|
+
|
|
279
|
+
**示例**:
|
|
280
|
+
```
|
|
281
|
+
YEAR("2026-4-20") => 2026
|
|
282
|
+
YEAR([入职日期])
|
|
283
|
+
```
|