@heyramzi/ui 2.9.0 → 2.10.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/agents/helpers.js +52 -0
- package/dist/agents/index.js +3 -0
- package/dist/agents/page-state.js +65 -0
- package/dist/agents/types.js +1 -0
- package/dist/agents/vendor/color.js +149 -0
- package/dist/agents/vendor/draw.js +548 -0
- package/dist/agents/vendor/engine.js +632 -0
- package/dist/agents/vendor/mesh.js +727 -0
- package/dist/agents/vendor/plastic.js +3273 -0
- package/dist/agents/vendor/presets.js +171 -0
- package/dist/agents/vendor/shapes.js +24 -0
- package/dist/agents/vendor/ticker.js +56 -0
- package/dist/agents/vendor/types.js +0 -0
- package/dist/agents/vendor/wear.js +1525 -0
- package/dist/ai/ai-button/index.js +2 -0
- package/dist/ai/confirmation/confirmation-context.svelte.js +12 -0
- package/dist/ai/confirmation/index.js +9 -0
- package/dist/ai/generation-progress/index.js +2 -0
- package/dist/ai/index.js +11 -0
- package/dist/ai/loading-state/index.js +3 -0
- package/dist/ai/prompt-input/index.js +6 -0
- package/dist/ai/reasoning/index.js +4 -0
- package/dist/ai/reasoning/reasoning-context.svelte.js +12 -0
- package/dist/ai/response/index.js +3 -0
- package/dist/ai/suggestion/index.js +3 -0
- package/dist/ai/thinking-dots/index.js +3 -0
- package/dist/ai/typing-dots/index.js +2 -0
- package/dist/ai/voice-waveform/index.js +3 -0
- package/dist/animations/text-swap.js +30 -0
- package/dist/brand/index.js +65 -0
- package/dist/canvas/card/resize.js +10 -0
- package/dist/canvas/edges/edge-path.js +284 -0
- package/dist/canvas/editor/context-menu.js +42 -0
- package/dist/canvas/editor/dispatch.svelte.js +157 -0
- package/dist/canvas/editor/editor-context.js +8 -0
- package/dist/canvas/editor/editor-mode.js +0 -0
- package/dist/canvas/editor/frame.js +87 -0
- package/dist/canvas/editor/hand-context.js +8 -0
- package/dist/canvas/editor/history-core.js +221 -0
- package/dist/canvas/editor/keymap.js +193 -0
- package/dist/canvas/editor/layout-actions.js +170 -0
- package/dist/canvas/editor/lock.js +65 -0
- package/dist/canvas/editor/rebase.js +279 -0
- package/dist/canvas/editor/style.js +174 -0
- package/dist/canvas/editor/text-field-context.js +8 -0
- package/dist/canvas/editor/z-order.js +82 -0
- package/dist/canvas/headless/alignment.js +20 -0
- package/dist/canvas/headless/break-apart-find.js +324 -0
- package/dist/canvas/headless/break-apart-pieces.js +74 -0
- package/dist/canvas/headless/break-apart-plan.js +378 -0
- package/dist/canvas/headless/break-apart-style.js +93 -0
- package/dist/canvas/headless/break-apart.js +206 -0
- package/dist/canvas/headless/canvas-cleanup.js +70 -0
- package/dist/canvas/headless/edge-anchors.js +134 -0
- package/dist/canvas/headless/edge-memo.js +28 -0
- package/dist/canvas/headless/edge-serialization.js +31 -0
- package/dist/canvas/headless/figure-geometry.js +331 -0
- package/dist/canvas/headless/fit-viewport.js +82 -0
- package/dist/canvas/headless/grid.js +96 -0
- package/dist/canvas/headless/icon-node.js +45 -0
- package/dist/canvas/headless/index.js +1 -0
- package/dist/canvas/headless/linkify.js +25 -0
- package/dist/canvas/headless/pen-marks.js +115 -0
- package/dist/canvas/headless/sketch.js +250 -0
- package/dist/canvas/headless/snap-guides.js +100 -0
- package/dist/canvas/headless/svg-figure.js +137 -0
- package/dist/canvas/headless/table-layout.js +161 -0
- package/dist/canvas/index.js +25 -0
- package/dist/canvas/lod/lod-mode.svelte.js +22 -0
- package/dist/canvas/lod/render-all.svelte.js +45 -0
- package/dist/canvas/ops/arrange.js +83 -0
- package/dist/canvas/ops/ops.js +318 -0
- package/dist/canvas/pen/colors.js +41 -0
- package/dist/canvas/pen/eraser.js +35 -0
- package/dist/canvas/pen/geometry.js +143 -0
- package/dist/canvas/pen/index.js +9 -0
- package/dist/canvas/pen/ops.js +15 -0
- package/dist/canvas/pen/pen-session.js +171 -0
- package/dist/canvas/pen/plugin.js +129 -0
- package/dist/canvas/pen/shapes.js +80 -0
- package/dist/canvas/pen/stroke-path.js +37 -0
- package/dist/canvas/pen/types.js +30 -0
- package/dist/canvas/pen/ui.js +20 -0
- package/dist/canvas/plugin.js +51 -0
- package/dist/canvas/screen/glyphs.js +24 -0
- package/dist/canvas/screen/labels.js +24 -0
- package/dist/canvas/screen/parts.js +140 -0
- package/dist/canvas/screen/plugin.js +71 -0
- package/dist/canvas/screen/types.js +44 -0
- package/dist/canvas/screen/ui.js +13 -0
- package/dist/canvas/test-utils.js +18 -0
- package/dist/canvas/types.js +0 -0
- package/dist/canvas/ui/forward-wheel.js +27 -0
- package/dist/canvas/ui/icons.js +133 -0
- package/dist/canvas/ui/place-panel.js +57 -0
- package/dist/canvas/ui/shortcut-tip.js +18 -0
- package/dist/canvas/ui/tools.js +411 -0
- package/dist/charts/dashboard/chart.js +1 -0
- package/dist/charts/dashboard/data-table.js +7 -0
- package/dist/charts/dashboard/index.js +13 -0
- package/dist/charts/dashboard/windows.js +5 -0
- package/dist/charts/edge-fade.js +7 -0
- package/dist/charts/hover-band.js +13 -0
- package/dist/charts/index.js +19 -0
- package/dist/charts/motion.js +15 -0
- package/dist/charts/primitives/chart-utils.js +22 -0
- package/dist/charts/primitives/index.js +4 -0
- package/dist/components/copy/clipboard.js +38 -0
- package/dist/components/copy/copied.svelte.js +26 -0
- package/dist/components/copy/index.js +3 -0
- package/dist/components/data-table/data-table.js +55 -0
- package/dist/components/data-table/index.js +7 -0
- package/dist/components/docs/index.js +3 -0
- package/dist/components/docs/scroll-spy.svelte.js +71 -0
- package/dist/components/field-row/index.js +1 -0
- package/dist/components/hold-to-confirm/index.js +1 -0
- package/dist/components/icon/index.js +1 -0
- package/dist/components/language-flag/index.js +1 -0
- package/dist/components/list-page/filter-section.js +4 -0
- package/dist/components/list-page/index.js +25 -0
- package/dist/components/list-page/list-table.js +5 -0
- package/dist/components/list-page/queue-rail.js +3 -0
- package/dist/components/list-page/section-host.js +8 -0
- package/dist/components/list-page/step.js +5 -0
- package/dist/components/list-page/types.js +0 -0
- package/dist/components/locale-switch/index.js +1 -0
- package/dist/components/mark/index.js +1 -0
- package/dist/components/open-in/index.js +1 -0
- package/dist/components/picker/index.js +3 -0
- package/dist/components/picker/trigger.js +33 -0
- package/dist/components/picker/types.js +0 -0
- package/dist/components/section-card/index.js +1 -0
- package/dist/components/section-header/index.js +2 -0
- package/dist/components/segmented/collapse.js +32 -0
- package/dist/components/segmented/index.js +8 -0
- package/dist/components/segmented/segmented.js +50 -0
- package/dist/components/star-rating-input/index.js +2 -0
- package/dist/components/svg/index.js +1 -0
- package/dist/components/table-view/index.js +1 -0
- package/dist/components/table-view/types.js +0 -0
- package/dist/components/tags-input/index.js +2 -0
- package/dist/components/tags-input/tags.js +90 -0
- package/dist/components/theme/index.js +3 -0
- package/dist/components/toolbar/index.js +3 -0
- package/dist/components/toolbar/toolbar-trigger.js +4 -0
- package/dist/editor/anchors.js +17 -0
- package/dist/editor/block-id.js +62 -0
- package/dist/editor/block-ops.js +105 -0
- package/dist/editor/doc-blocks.js +181 -0
- package/dist/editor/extensions.js +200 -0
- package/dist/editor/index.js +4 -0
- package/dist/editor/markdown-test-helpers.js +6 -0
- package/dist/editor/markdown.js +486 -0
- package/dist/editor/serializer.js +268 -0
- package/dist/editor/slash-items.js +104 -0
- package/dist/editor/youtube-url.js +27 -0
- package/dist/effects/animated-beam/index.js +1 -0
- package/dist/effects/animated-beam/path-calculator.svelte.js +42 -0
- package/dist/effects/animated-beam/types.js +0 -0
- package/dist/effects/border-beam/css.js +420 -0
- package/dist/effects/border-beam/presets.js +1792 -0
- package/dist/effects/border-beam/register-properties.js +39 -0
- package/dist/effects/border-beam/types.js +0 -0
- package/dist/effects/image-comparison/compare.js +4 -0
- package/dist/effects/image-reveal/index.js +1 -0
- package/dist/effects/image-reveal/types.js +0 -0
- package/dist/effects/magnetic/magnetic.js +54 -0
- package/dist/effects/reveal/index.js +4 -0
- package/dist/effects/reveal/observe.js +43 -0
- package/dist/effects/reveal/types.js +0 -0
- package/dist/effects/shader-gradient/color.js +34 -0
- package/dist/effects/shader-gradient/index.js +1 -0
- package/dist/effects/shader-gradient/renderer.js +320 -0
- package/dist/effects/shader-gradient/shaders.js +280 -0
- package/dist/effects/shader-gradient/types.js +0 -0
- package/dist/icons/apple-symbol-exports.js +126 -0
- package/dist/icons/sf-symbols.js +465 -0
- package/dist/icons/trades.js +34 -0
- package/dist/inbox/index.js +4 -0
- package/dist/inbox/logic.js +156 -0
- package/dist/inbox/types.js +46 -0
- package/dist/index.js +18 -0
- package/dist/lib/arrive.js +13 -0
- package/dist/lib/icon-types.js +0 -0
- package/dist/lib/initials.js +17 -0
- package/dist/lib/layout.js +1 -0
- package/dist/lib/panel.js +3 -0
- package/dist/lib/result.js +26 -0
- package/dist/lib/sliding-pill.js +45 -0
- package/dist/lib/theme-transition.js +53 -0
- package/dist/lib/tone.js +32 -0
- package/dist/lib/utils.js +5 -0
- package/dist/onboarding/define-tours.js +28 -0
- package/dist/onboarding/index.js +4 -0
- package/dist/onboarding/onboarding.svelte.js +15 -0
- package/dist/onboarding/pick.js +16 -0
- package/dist/onboarding/stores.js +50 -0
- package/dist/onboarding/types.js +1 -0
- package/dist/onboarding/wait.js +25 -0
- package/dist/panel/index.js +1 -0
- package/dist/panel/side-panel-types.js +0 -0
- package/dist/record/demo-data.js +512 -0
- package/dist/record/fields.js +148 -0
- package/dist/record/format.js +97 -0
- package/dist/record/gutter.js +1 -0
- package/dist/record/index.js +15 -0
- package/dist/record/kinds.js +110 -0
- package/dist/record/logic.js +255 -0
- package/dist/record/types.js +52 -0
- package/dist/shadcn/accordion/index.js +5 -0
- package/dist/shadcn/alert/index.js +5 -0
- package/dist/shadcn/alert-dialog/index.js +12 -0
- package/dist/shadcn/attachment/index.js +10 -0
- package/dist/shadcn/avatar/index.js +7 -0
- package/dist/shadcn/badge/index.js +2 -0
- package/dist/shadcn/breadcrumb/index.js +8 -0
- package/dist/shadcn/bubble/index.js +5 -0
- package/dist/shadcn/button/index.js +2 -0
- package/dist/shadcn/calendar/index.js +19 -0
- package/dist/shadcn/card/index.js +8 -0
- package/dist/shadcn/checkbox/index.js +2 -0
- package/dist/shadcn/code-block/index.js +9 -0
- package/dist/shadcn/collapsible/index.js +4 -0
- package/dist/shadcn/command/index.js +13 -0
- package/dist/shadcn/context-menu/index.js +17 -0
- package/dist/shadcn/dialog/index.js +11 -0
- package/dist/shadcn/dropdown-menu/index.js +19 -0
- package/dist/shadcn/dropdown-menu/menu-item.js +23 -0
- package/dist/shadcn/empty/index.js +7 -0
- package/dist/shadcn/field/index.js +12 -0
- package/dist/shadcn/hooks/highlighter.js +92 -0
- package/dist/shadcn/hooks/is-mobile.svelte.js +7 -0
- package/dist/shadcn/hooks/use-highlighted-code.svelte.js +65 -0
- package/dist/shadcn/hover-card/index.js +5 -0
- package/dist/shadcn/input/index.js +3 -0
- package/dist/shadcn/input-otp/index.js +5 -0
- package/dist/shadcn/kbd/index.js +3 -0
- package/dist/shadcn/label/index.js +2 -0
- package/dist/shadcn/marker/index.js +4 -0
- package/dist/shadcn/message/index.js +7 -0
- package/dist/shadcn/message-scroller/index.js +8 -0
- package/dist/shadcn/popover/index.js +9 -0
- package/dist/shadcn/progress/index.js +2 -0
- package/dist/shadcn/progress/tone.js +11 -0
- package/dist/shadcn/radio-group/index.js +3 -0
- package/dist/shadcn/scroll-area/index.js +3 -0
- package/dist/shadcn/select/index.js +12 -0
- package/dist/shadcn/separator/index.js +2 -0
- package/dist/shadcn/sheet/index.js +11 -0
- package/dist/shadcn/sidebar/constants.js +6 -0
- package/dist/shadcn/sidebar/context.svelte.js +38 -0
- package/dist/shadcn/sidebar/index.js +25 -0
- package/dist/shadcn/skeleton/index.js +2 -0
- package/dist/shadcn/slider/index.js +2 -0
- package/dist/shadcn/sonner/index.js +1 -0
- package/dist/shadcn/spinner/index.js +1 -0
- package/dist/shadcn/switch/index.js +2 -0
- package/dist/shadcn/table/index.js +9 -0
- package/dist/shadcn/tabs/index.js +5 -0
- package/dist/shadcn/textarea/index.js +2 -0
- package/dist/shadcn/toggle/index.js +3 -0
- package/dist/shadcn/toggle-group/index.js +3 -0
- package/dist/shadcn/tooltip/context.js +8 -0
- package/dist/shadcn/tooltip/index.js +6 -0
- package/dist/shadcn/trace/index.js +9 -0
- package/dist/slides/bridges.js +66 -0
- package/dist/slides/deck-controller.svelte.js +221 -0
- package/dist/slides/export/capture.js +81 -0
- package/dist/slides/export/ffmpeg.js +85 -0
- package/dist/slides/export/index.js +4 -0
- package/dist/slides/export/launch.js +8 -0
- package/dist/slides/export/pdf.js +78 -0
- package/dist/slides/export/types.js +0 -0
- package/dist/slides/index.js +7 -0
- package/dist/slides/labels.js +26 -0
- package/dist/slides/layout.js +47 -0
- package/dist/slides/model.js +9 -0
- package/dist/slides/navigation.js +89 -0
- package/dist/slides/types.js +6 -0
- package/dist/status/define-statuses.js +16 -0
- package/dist/status/index.js +4 -0
- package/dist/status/status-types.js +0 -0
- package/dist/test-setup.js +26 -0
- package/dist/thread/index.js +3 -0
- package/dist/thread/logic.js +94 -0
- package/dist/thread/types.js +23 -0
- package/dist/work/board-order.js +109 -0
- package/dist/work/dates.js +19 -0
- package/dist/work/detail/detail-types.js +20 -0
- package/dist/work/docs/edited.js +39 -0
- package/dist/work/docs/index.js +7 -0
- package/dist/work/docs/labels.js +38 -0
- package/dist/work/docs/menu.js +121 -0
- package/dist/work/docs/outline.js +39 -0
- package/dist/work/gantt/logic.js +260 -0
- package/dist/work/inbox/inbox-logic.js +94 -0
- package/dist/work/inbox/inbox-statuses.js +86 -0
- package/dist/work/inbox/inbox-types.js +0 -0
- package/dist/work/inbox/index.js +1 -0
- package/dist/work/index.js +21 -0
- package/dist/work/kanban-drag.js +25 -0
- package/dist/work/kanban-types.js +0 -0
- package/dist/work/presets/sales.js +35 -0
- package/dist/work/reorder.js +10 -0
- package/dist/work/task-types.js +0 -0
- package/dist/work/time/duration.js +60 -0
- package/dist/work/time/time-types.js +25 -0
- package/dist/work/use-kanban-dnd.svelte.js +128 -0
- package/package.json +45 -3
- package/src/components/toolbar/toolbar-trigger.ts +8 -2
- package/src/record/demo-data.ts +4 -4
- package/src/record/record-demo.svelte +2 -2
|
@@ -0,0 +1,512 @@
|
|
|
1
|
+
export const DEMO_NOW = new Date("2026-10-21T12:00:00Z");
|
|
2
|
+
export const DEMO_TODAY = "2026-10-21";
|
|
3
|
+
export const stages = [
|
|
4
|
+
{
|
|
5
|
+
key: "lead",
|
|
6
|
+
label: "Lead",
|
|
7
|
+
tone: "neutral",
|
|
8
|
+
category: "open"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
key: "sent",
|
|
12
|
+
label: "Proposal sent",
|
|
13
|
+
tone: "info",
|
|
14
|
+
category: "proposal"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
key: "build",
|
|
18
|
+
label: "In build",
|
|
19
|
+
tone: "accent",
|
|
20
|
+
category: "ongoing"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
key: "paid",
|
|
24
|
+
label: "Paid",
|
|
25
|
+
tone: "success",
|
|
26
|
+
category: "completed"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
key: "lost",
|
|
30
|
+
label: "Lost",
|
|
31
|
+
tone: "destructive",
|
|
32
|
+
category: "lost"
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
export const stepGroups = [
|
|
36
|
+
{
|
|
37
|
+
key: "sales",
|
|
38
|
+
label: "Sales"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
key: "delivery",
|
|
42
|
+
label: "Delivery"
|
|
43
|
+
}
|
|
44
|
+
];
|
|
45
|
+
export const websiteSteps = [
|
|
46
|
+
{
|
|
47
|
+
id: "s1",
|
|
48
|
+
label: "Discovery call",
|
|
49
|
+
done: true,
|
|
50
|
+
group: "sales",
|
|
51
|
+
start: "2026-10-03"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: "s2",
|
|
55
|
+
label: "Proposal",
|
|
56
|
+
done: false,
|
|
57
|
+
group: "sales",
|
|
58
|
+
start: "2026-10-21"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: "s3",
|
|
62
|
+
label: "Kickoff",
|
|
63
|
+
done: false,
|
|
64
|
+
group: "delivery",
|
|
65
|
+
start: "2026-10-26"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: "s4",
|
|
69
|
+
label: "Design review",
|
|
70
|
+
done: false,
|
|
71
|
+
group: "delivery",
|
|
72
|
+
start: "2026-11-10"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: "s5",
|
|
76
|
+
label: "Build",
|
|
77
|
+
done: false,
|
|
78
|
+
group: "delivery",
|
|
79
|
+
start: "2026-11-12",
|
|
80
|
+
end: "2026-12-04"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: "s6",
|
|
84
|
+
label: "Cutover",
|
|
85
|
+
done: false,
|
|
86
|
+
group: "delivery",
|
|
87
|
+
start: "2026-12-12",
|
|
88
|
+
end: "2026-12-13"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: "s7",
|
|
92
|
+
label: "Training",
|
|
93
|
+
done: false,
|
|
94
|
+
group: "delivery",
|
|
95
|
+
hidden: true
|
|
96
|
+
}
|
|
97
|
+
];
|
|
98
|
+
export const projectSections = [
|
|
99
|
+
{
|
|
100
|
+
key: "scope",
|
|
101
|
+
label: "Scope"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
key: "loss",
|
|
105
|
+
label: "Loss"
|
|
106
|
+
}
|
|
107
|
+
];
|
|
108
|
+
export const projectFields = [
|
|
109
|
+
{
|
|
110
|
+
key: "type",
|
|
111
|
+
label: "Type",
|
|
112
|
+
type: "choice",
|
|
113
|
+
section: "scope",
|
|
114
|
+
options: [
|
|
115
|
+
{
|
|
116
|
+
key: "strategy",
|
|
117
|
+
label: "Strategy"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
key: "implementation",
|
|
121
|
+
label: "Implementation"
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
key: "budget",
|
|
127
|
+
label: "Budget",
|
|
128
|
+
type: "money",
|
|
129
|
+
section: "scope"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
key: "urgency",
|
|
133
|
+
label: "Urgency",
|
|
134
|
+
type: "choice",
|
|
135
|
+
section: "scope",
|
|
136
|
+
options: [
|
|
137
|
+
{
|
|
138
|
+
key: "low",
|
|
139
|
+
label: "Low",
|
|
140
|
+
tone: "neutral"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
key: "high",
|
|
144
|
+
label: "High",
|
|
145
|
+
tone: "warning"
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
key: "goLive",
|
|
151
|
+
label: "Go live",
|
|
152
|
+
type: "date",
|
|
153
|
+
section: "scope"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
key: "context",
|
|
157
|
+
label: "Context",
|
|
158
|
+
type: "longtext",
|
|
159
|
+
section: "scope"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
key: "reason",
|
|
163
|
+
label: "Reason",
|
|
164
|
+
type: "choice",
|
|
165
|
+
section: "loss",
|
|
166
|
+
showWhen: {
|
|
167
|
+
key: "lossReasonOn",
|
|
168
|
+
equals: "yes"
|
|
169
|
+
},
|
|
170
|
+
options: [
|
|
171
|
+
{
|
|
172
|
+
key: "price",
|
|
173
|
+
label: "Price"
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
];
|
|
178
|
+
export const clientSections = [
|
|
179
|
+
{
|
|
180
|
+
key: "about",
|
|
181
|
+
label: "About"
|
|
182
|
+
}
|
|
183
|
+
];
|
|
184
|
+
export const clientFields = [
|
|
185
|
+
{
|
|
186
|
+
key: "business",
|
|
187
|
+
label: "Business",
|
|
188
|
+
type: "longtext",
|
|
189
|
+
section: "about"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
key: "size",
|
|
193
|
+
label: "Size",
|
|
194
|
+
type: "choice",
|
|
195
|
+
section: "about",
|
|
196
|
+
options: [
|
|
197
|
+
{
|
|
198
|
+
key: "1-10",
|
|
199
|
+
label: "1 to 10"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
key: "11-50",
|
|
203
|
+
label: "11 to 50"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
key: "51+",
|
|
207
|
+
label: "51 or more"
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
key: "sector",
|
|
213
|
+
label: "Sector",
|
|
214
|
+
type: "choice",
|
|
215
|
+
section: "about",
|
|
216
|
+
options: [
|
|
217
|
+
"Dental",
|
|
218
|
+
"Legal",
|
|
219
|
+
"Retail",
|
|
220
|
+
"Logistics",
|
|
221
|
+
"Education",
|
|
222
|
+
"Finance",
|
|
223
|
+
"Health",
|
|
224
|
+
"Hospitality",
|
|
225
|
+
"Media"
|
|
226
|
+
].map((label)=>({
|
|
227
|
+
key: label.toLowerCase(),
|
|
228
|
+
label
|
|
229
|
+
}))
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
key: "needs",
|
|
233
|
+
label: "Needs",
|
|
234
|
+
type: "multi",
|
|
235
|
+
section: "about",
|
|
236
|
+
options: [
|
|
237
|
+
{
|
|
238
|
+
key: "site",
|
|
239
|
+
label: "Website"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
key: "booking",
|
|
243
|
+
label: "Booking"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
key: "crm",
|
|
247
|
+
label: "CRM"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
key: "old",
|
|
251
|
+
label: "Print",
|
|
252
|
+
archived: true
|
|
253
|
+
}
|
|
254
|
+
]
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
key: "site",
|
|
258
|
+
label: "Website",
|
|
259
|
+
type: "url",
|
|
260
|
+
section: "about"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
key: "email",
|
|
264
|
+
label: "Email",
|
|
265
|
+
type: "email",
|
|
266
|
+
section: "about"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
key: "tz",
|
|
270
|
+
label: "Time zone",
|
|
271
|
+
type: "timezone",
|
|
272
|
+
section: "about"
|
|
273
|
+
}
|
|
274
|
+
];
|
|
275
|
+
export const websiteValues = {
|
|
276
|
+
type: "implementation",
|
|
277
|
+
budget: 12000,
|
|
278
|
+
urgency: "high",
|
|
279
|
+
goLive: "2026-12-14",
|
|
280
|
+
context: "Replace the brochure site. Booking stays on the old tool until spring."
|
|
281
|
+
};
|
|
282
|
+
export const clientValues = {
|
|
283
|
+
business: "A dental group in Lyon with 3 clinics and a shared front desk.",
|
|
284
|
+
size: "11-50",
|
|
285
|
+
sector: "dental",
|
|
286
|
+
needs: [
|
|
287
|
+
"site",
|
|
288
|
+
"booking",
|
|
289
|
+
"old"
|
|
290
|
+
],
|
|
291
|
+
site: "https://marlowfinch.example",
|
|
292
|
+
email: "jane@marlowfinch.example",
|
|
293
|
+
tz: "Europe/Paris"
|
|
294
|
+
};
|
|
295
|
+
const note = (id, at, title, body)=>({
|
|
296
|
+
id,
|
|
297
|
+
kind: "note",
|
|
298
|
+
occurredAt: at,
|
|
299
|
+
title,
|
|
300
|
+
body,
|
|
301
|
+
actor: "Ramzi"
|
|
302
|
+
});
|
|
303
|
+
export const websiteEvents = [
|
|
304
|
+
{
|
|
305
|
+
id: "w1",
|
|
306
|
+
kind: "status",
|
|
307
|
+
occurredAt: "2026-10-18T09:30:00Z",
|
|
308
|
+
title: "Sent SOW v2, legal is reviewing",
|
|
309
|
+
body: "The payment terms have 2 redlines. Sofia answers Monday and asks for the signature by the 26th, so the kickoff holds.",
|
|
310
|
+
actor: "Sofia"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
id: "w2",
|
|
314
|
+
kind: "call",
|
|
315
|
+
occurredAt: "2026-10-21T08:15:00Z",
|
|
316
|
+
title: "Scoping review",
|
|
317
|
+
body: "45 minutes with Jane and the clinic manager. Booking stays out of scope. They want the new site to carry the clinic pages and nothing else.",
|
|
318
|
+
details: [
|
|
319
|
+
{
|
|
320
|
+
label: "Length",
|
|
321
|
+
value: "45 min"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
label: "With",
|
|
325
|
+
value: "Jane Roe, Tom Bell"
|
|
326
|
+
}
|
|
327
|
+
],
|
|
328
|
+
href: "#"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
id: "w3",
|
|
332
|
+
kind: "stage",
|
|
333
|
+
occurredAt: "2026-10-12T14:00:00Z",
|
|
334
|
+
title: "Stage set to Proposal sent",
|
|
335
|
+
actor: "Sofia"
|
|
336
|
+
},
|
|
337
|
+
note("w4", "2026-10-09T16:40:00Z", "Their fear is another agency that vanishes", "Said it twice. Lead the proposal with who answers the phone."),
|
|
338
|
+
{
|
|
339
|
+
id: "w5",
|
|
340
|
+
kind: "invoice.sent",
|
|
341
|
+
occurredAt: "2026-10-06T10:00:00Z",
|
|
342
|
+
title: "Deposit invoice",
|
|
343
|
+
amount: 3600,
|
|
344
|
+
currency: "EUR"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
id: "w6",
|
|
348
|
+
kind: "call",
|
|
349
|
+
occurredAt: "2026-10-03T13:00:00Z",
|
|
350
|
+
title: "Discovery call",
|
|
351
|
+
body: "Jane runs 3 clinics and the site is 4 years old."
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
id: "w7",
|
|
355
|
+
kind: "milestone.done",
|
|
356
|
+
occurredAt: "2026-10-03T15:00:00Z",
|
|
357
|
+
title: "Discovery call done"
|
|
358
|
+
},
|
|
359
|
+
...Array.from({
|
|
360
|
+
length: 34
|
|
361
|
+
}, (_, i)=>({
|
|
362
|
+
id: `old${i}`,
|
|
363
|
+
kind: i % 3 === 0 ? "email" : "note",
|
|
364
|
+
occurredAt: new Date(Date.UTC(2026, 8, 28 - i, 9, 0)).toISOString(),
|
|
365
|
+
title: i % 3 === 0 ? "Re: clinic pages" : "Warm intro follow-up",
|
|
366
|
+
actor: "Ramzi"
|
|
367
|
+
}))
|
|
368
|
+
];
|
|
369
|
+
export const website = {
|
|
370
|
+
id: "p-web",
|
|
371
|
+
name: "Website rebuild",
|
|
372
|
+
href: "#",
|
|
373
|
+
stageKey: "sent",
|
|
374
|
+
value: 12000,
|
|
375
|
+
currency: "EUR",
|
|
376
|
+
startDate: "2026-11-01",
|
|
377
|
+
endDate: "2026-12-15",
|
|
378
|
+
whereWeAre: {
|
|
379
|
+
text: "Sent SOW v2, legal is reviewing. The payment terms have 2 redlines, Sofia answers Monday and asks for the signature by the 26th, so the kickoff holds.",
|
|
380
|
+
at: "2026-10-18T09:30:00Z",
|
|
381
|
+
actor: "Sofia",
|
|
382
|
+
health: {
|
|
383
|
+
label: "Waiting",
|
|
384
|
+
tone: "warning"
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
next: {
|
|
388
|
+
label: "Kickoff call",
|
|
389
|
+
date: "2026-10-26",
|
|
390
|
+
owner: "Ramzi"
|
|
391
|
+
},
|
|
392
|
+
lastCallAt: "2026-10-21T08:15:00Z",
|
|
393
|
+
lastTouchAt: "2026-10-21T08:15:00Z",
|
|
394
|
+
progress: {
|
|
395
|
+
done: 1,
|
|
396
|
+
total: 6
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
export const audit = {
|
|
400
|
+
id: "p-audit",
|
|
401
|
+
name: "Brand audit",
|
|
402
|
+
href: "#",
|
|
403
|
+
stageKey: "lost",
|
|
404
|
+
stageDetail: "Price",
|
|
405
|
+
value: 4500,
|
|
406
|
+
currency: "EUR",
|
|
407
|
+
whereWeAre: {
|
|
408
|
+
text: "They went with a freelancer at half the fee.",
|
|
409
|
+
at: "2026-06-11T10:00:00Z",
|
|
410
|
+
actor: "Sofia"
|
|
411
|
+
},
|
|
412
|
+
lastCallAt: "2026-06-04T10:00:00Z",
|
|
413
|
+
lastTouchAt: "2026-06-11T10:00:00Z",
|
|
414
|
+
progress: {
|
|
415
|
+
done: 1,
|
|
416
|
+
total: 3
|
|
417
|
+
}
|
|
418
|
+
};
|
|
419
|
+
export const portal = {
|
|
420
|
+
id: "p-portal",
|
|
421
|
+
name: "Booking portal",
|
|
422
|
+
href: "#",
|
|
423
|
+
stageKey: "paid",
|
|
424
|
+
value: 18000,
|
|
425
|
+
paid: 18000,
|
|
426
|
+
currency: "EUR",
|
|
427
|
+
whereWeAre: {
|
|
428
|
+
text: "Live since March. Final invoice paid.",
|
|
429
|
+
at: "2026-04-02T10:00:00Z",
|
|
430
|
+
actor: "Ramzi"
|
|
431
|
+
},
|
|
432
|
+
lastCallAt: "2026-03-20T10:00:00Z",
|
|
433
|
+
lastTouchAt: "2026-04-02T10:00:00Z",
|
|
434
|
+
progress: {
|
|
435
|
+
done: 5,
|
|
436
|
+
total: 5
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
export const auditEvents = [
|
|
440
|
+
{
|
|
441
|
+
id: "a1",
|
|
442
|
+
kind: "stage",
|
|
443
|
+
occurredAt: "2026-06-11T10:00:00Z",
|
|
444
|
+
title: "Stage set to Lost",
|
|
445
|
+
actor: "Sofia",
|
|
446
|
+
details: [
|
|
447
|
+
{
|
|
448
|
+
label: "Reason",
|
|
449
|
+
value: "Price"
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
label: "In their words",
|
|
453
|
+
value: "A freelancer quoted half."
|
|
454
|
+
}
|
|
455
|
+
]
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
id: "a2",
|
|
459
|
+
kind: "call",
|
|
460
|
+
occurredAt: "2026-06-04T10:00:00Z",
|
|
461
|
+
title: "Proposal walk-through",
|
|
462
|
+
body: "Jane liked the audit and balked at the fee."
|
|
463
|
+
}
|
|
464
|
+
];
|
|
465
|
+
export const portalEvents = [
|
|
466
|
+
{
|
|
467
|
+
id: "b1",
|
|
468
|
+
kind: "payment",
|
|
469
|
+
occurredAt: "2026-04-02T10:00:00Z",
|
|
470
|
+
title: "Final invoice paid",
|
|
471
|
+
amount: 9000,
|
|
472
|
+
currency: "EUR"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
id: "b2",
|
|
476
|
+
kind: "payment",
|
|
477
|
+
occurredAt: "2026-02-10T10:00:00Z",
|
|
478
|
+
title: "First instalment paid",
|
|
479
|
+
amount: 9000,
|
|
480
|
+
currency: "EUR"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
id: "b3",
|
|
484
|
+
kind: "call",
|
|
485
|
+
occurredAt: "2026-03-20T10:00:00Z",
|
|
486
|
+
title: "Launch check",
|
|
487
|
+
body: "Live. A few copy fixes after."
|
|
488
|
+
}
|
|
489
|
+
];
|
|
490
|
+
export const clientOnlyEvents = [
|
|
491
|
+
{
|
|
492
|
+
id: "c1",
|
|
493
|
+
kind: "form",
|
|
494
|
+
occurredAt: "2026-02-01T09:00:00Z",
|
|
495
|
+
title: "Contact form: asked about online booking",
|
|
496
|
+
body: "Calls pile up at lunch and the front desk can't keep up."
|
|
497
|
+
}
|
|
498
|
+
];
|
|
499
|
+
export const clientProjects = [
|
|
500
|
+
{
|
|
501
|
+
summary: website,
|
|
502
|
+
events: websiteEvents
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
summary: audit,
|
|
506
|
+
events: auditEvents
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
summary: portal,
|
|
510
|
+
events: portalEvents
|
|
511
|
+
}
|
|
512
|
+
];
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { formatDay, formatMoney } from "./format.js";
|
|
2
|
+
function hasOptions(field) {
|
|
3
|
+
return field.type === "choice" || field.type === "multi";
|
|
4
|
+
}
|
|
5
|
+
function isEmpty(value) {
|
|
6
|
+
return value == null || value === "" || Array.isArray(value) && value.length === 0;
|
|
7
|
+
}
|
|
8
|
+
export function isFieldVisible(field, values) {
|
|
9
|
+
const rule = field.showWhen;
|
|
10
|
+
if (!rule) return true;
|
|
11
|
+
const current = values[rule.key];
|
|
12
|
+
if (rule.equals === undefined) return !isEmpty(current);
|
|
13
|
+
const wanted = Array.isArray(rule.equals) ? rule.equals : [
|
|
14
|
+
rule.equals
|
|
15
|
+
];
|
|
16
|
+
const held = Array.isArray(current) ? current : current == null ? [] : [
|
|
17
|
+
String(current)
|
|
18
|
+
];
|
|
19
|
+
return held.some((v)=>wanted.includes(v));
|
|
20
|
+
}
|
|
21
|
+
export function pickableOptions(field, value) {
|
|
22
|
+
const held = Array.isArray(value) ? value : value == null ? [] : [
|
|
23
|
+
String(value)
|
|
24
|
+
];
|
|
25
|
+
return (hasOptions(field) ? field.options : []).filter((o)=>!o.archived || held.includes(o.key));
|
|
26
|
+
}
|
|
27
|
+
export function groupFields(fields, sections, values) {
|
|
28
|
+
const visible = fields.filter((f)=>isFieldVisible(f, values));
|
|
29
|
+
const known = new Set(sections.map((s)=>s.key));
|
|
30
|
+
const groups = sections.map((s)=>({
|
|
31
|
+
key: s.key,
|
|
32
|
+
label: s.label,
|
|
33
|
+
fields: visible.filter((f)=>f.section === s.key)
|
|
34
|
+
})).filter((g)=>g.fields.length > 0);
|
|
35
|
+
const loose = visible.filter((f)=>!f.section || !known.has(f.section));
|
|
36
|
+
if (loose.length > 0) groups.push({
|
|
37
|
+
key: "",
|
|
38
|
+
label: null,
|
|
39
|
+
fields: loose
|
|
40
|
+
});
|
|
41
|
+
return groups;
|
|
42
|
+
}
|
|
43
|
+
export function parseSaved(field, raw) {
|
|
44
|
+
if (Array.isArray(raw)) return raw;
|
|
45
|
+
const text = raw.trim();
|
|
46
|
+
if (text === "") return null;
|
|
47
|
+
if (field.type === "money") {
|
|
48
|
+
const n = Number(text.replace(",", "."));
|
|
49
|
+
return Number.isFinite(n) ? n : null;
|
|
50
|
+
}
|
|
51
|
+
return text;
|
|
52
|
+
}
|
|
53
|
+
const INPUT = {
|
|
54
|
+
text: "text",
|
|
55
|
+
longtext: "longtext",
|
|
56
|
+
choice: "select",
|
|
57
|
+
multi: "multi",
|
|
58
|
+
money: "number",
|
|
59
|
+
date: "date",
|
|
60
|
+
url: "url",
|
|
61
|
+
email: "email",
|
|
62
|
+
timezone: "text",
|
|
63
|
+
tags: "tags"
|
|
64
|
+
};
|
|
65
|
+
export function fieldRow(field, value, ctx = {}) {
|
|
66
|
+
const row = {
|
|
67
|
+
id: field.key,
|
|
68
|
+
label: field.label,
|
|
69
|
+
input: INPUT[field.type],
|
|
70
|
+
placeholder: field.placeholder,
|
|
71
|
+
required: field.required
|
|
72
|
+
};
|
|
73
|
+
const optionOf = (key)=>hasOptions(field) ? field.options.find((o)=>o.key === key) : undefined;
|
|
74
|
+
if (!isEmpty(value)) {
|
|
75
|
+
switch(field.type){
|
|
76
|
+
case "choice":
|
|
77
|
+
{
|
|
78
|
+
const option = optionOf(String(value));
|
|
79
|
+
row.value = option?.label ?? String(value);
|
|
80
|
+
row.tone = option?.tone;
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
case "multi":
|
|
84
|
+
{
|
|
85
|
+
const keys = Array.isArray(value) ? value : [
|
|
86
|
+
String(value)
|
|
87
|
+
];
|
|
88
|
+
row.chips = keys.map((k)=>({
|
|
89
|
+
label: optionOf(k)?.label ?? k,
|
|
90
|
+
tone: optionOf(k)?.tone
|
|
91
|
+
}));
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
case "tags":
|
|
95
|
+
{
|
|
96
|
+
const labels = Array.isArray(value) ? value : [
|
|
97
|
+
String(value)
|
|
98
|
+
];
|
|
99
|
+
row.chips = labels.map((label)=>({
|
|
100
|
+
label
|
|
101
|
+
}));
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
104
|
+
case "money":
|
|
105
|
+
row.value = formatMoney(Number(value), field.currency ?? ctx.currency, ctx.locale);
|
|
106
|
+
break;
|
|
107
|
+
case "date":
|
|
108
|
+
row.value = formatDay(String(value), ctx.locale);
|
|
109
|
+
break;
|
|
110
|
+
case "url":
|
|
111
|
+
row.value = String(value).replace(/^https?:\/\/(www\.)?/, "").replace(/\/$/, "");
|
|
112
|
+
row.href = String(value);
|
|
113
|
+
break;
|
|
114
|
+
case "email":
|
|
115
|
+
row.value = String(value);
|
|
116
|
+
row.href = `mailto:${value}`;
|
|
117
|
+
break;
|
|
118
|
+
case "text":
|
|
119
|
+
case "longtext":
|
|
120
|
+
case "timezone":
|
|
121
|
+
row.value = String(value);
|
|
122
|
+
break;
|
|
123
|
+
default:
|
|
124
|
+
return field;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
if (field.type === "choice" || field.type === "multi") {
|
|
128
|
+
row.options = pickableOptions(field, value).map((o)=>({
|
|
129
|
+
value: o.key,
|
|
130
|
+
label: o.label,
|
|
131
|
+
tone: o.tone
|
|
132
|
+
}));
|
|
133
|
+
row.editValue = Array.isArray(value) ? value : value == null ? field.type === "multi" ? [] : "" : String(value);
|
|
134
|
+
} else if (!isEmpty(value)) {
|
|
135
|
+
row.editValue = String(value);
|
|
136
|
+
}
|
|
137
|
+
if (field.type === "tags") {
|
|
138
|
+
row.tags = {
|
|
139
|
+
options: ctx.tagOptions?.[field.key] ?? (field.options === "existing-values" ? [] : field.options),
|
|
140
|
+
allowCreate: field.allowCreate,
|
|
141
|
+
max: field.max
|
|
142
|
+
};
|
|
143
|
+
row.editValue = Array.isArray(value) ? value : [];
|
|
144
|
+
}
|
|
145
|
+
const onSave = ctx.onSave;
|
|
146
|
+
if (onSave) row.onSave = (raw)=>onSave(field.key, parseSaved(field, raw));
|
|
147
|
+
return row;
|
|
148
|
+
}
|