@g9tm/lynxcontrols-projects 0.0.0-stage → 2.5.8
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 +23 -2
- package/catalog/cards/G9Board.md +17 -0
- package/catalog/cards/G9RuleBuilder.md +17 -0
- package/catalog/cards/G9TaskCard.md +17 -0
- package/catalog/cards/G9Timeline.md +17 -0
- package/catalog/catalog.json +1881 -0
- package/catalog/index.md +8 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/board.d.ts +47 -0
- package/dist/board.d.ts.map +1 -0
- package/dist/board.jsx +380 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.jsx +5 -0
- package/dist/model.d.ts +127 -0
- package/dist/model.d.ts.map +1 -0
- package/dist/model.jsx +242 -0
- package/dist/projects.css +582 -0
- package/dist/projects.css.map +1 -0
- package/dist/rule-builder.d.ts +60 -0
- package/dist/rule-builder.d.ts.map +1 -0
- package/dist/rule-builder.jsx +145 -0
- package/dist/task-card.d.ts +54 -0
- package/dist/task-card.d.ts.map +1 -0
- package/dist/task-card.jsx +117 -0
- package/dist/timeline.d.ts +60 -0
- package/dist/timeline.d.ts.map +1 -0
- package/dist/timeline.jsx +389 -0
- package/package.json +36 -4
package/README.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @g9tm/lynxcontrols-projects
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Project views for G9LynxControls (G9Hub's projects), on the culture's calendar and in either direction. Opt-in: none
|
|
4
|
+
of it is in the cost of `@g9tm/lynxcontrols`.
|
|
5
|
+
|
|
6
|
+
```tsx
|
|
7
|
+
import { G9Board, G9TaskCard, G9Timeline } from '@g9tm/lynxcontrols-projects';
|
|
8
|
+
|
|
9
|
+
<G9Board columns={columns} getKey={(t) => t.id}
|
|
10
|
+
renderCard={(t, s) => <G9TaskCard code={t.code} title={t.title} dragging={s.dragging} />}
|
|
11
|
+
onMove={(key, column, index) => move(key, column, index)} onAdd={(column, title) => add(column, title)} />
|
|
12
|
+
<G9Timeline rows={rows} today={today} zoom={zoom} onZoomChange={setZoom}
|
|
13
|
+
onSpanChange={(key, span) => reschedule(key, span)} />
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
| Component | What it is |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| **`G9Board`** | Columns of cards the app draws. A long press lifts a card on touch (a mouse lifts it at once); it follows the finger on the main thread, the board and the column scroll near their edges, and the drop reports the column and the index. Counts with an optional limit, a quick add per column, locked columns. |
|
|
19
|
+
| **`G9TaskCard`** | A task: code, marks, «blocked», priority, title, labels (+n), due in a tone, checklist progress, people. |
|
|
20
|
+
| **`G9Timeline`** | A Gantt chart: months and weeks of the culture's calendar, weekends shaded, today's line, bars moved and resized on the main thread (the ends are handles), progress, «blocked by» arrows, milestones and groups; a tap on an unscheduled row puts it on that day. |
|
|
21
|
+
|
|
22
|
+
Model (pure, tested): `boardDropTarget`, `edgeRate`, `boardColumnWidth`, `moveKey`, `timelineScale`, `dayToX`,
|
|
23
|
+
`xToDay`, `dragSpan`, `spanOf`, `timelineRange`, `monthStarts`, `weekStarts`, `physicalLeft`, `scrollForX`,
|
|
24
|
+
`linkSegments`, `rowWindow`.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# G9Board
|
|
2
|
+
|
|
3
|
+
`import { G9Board } from '@g9tm/lynxcontrols-projects';`
|
|
4
|
+
|
|
5
|
+
A board: columns of cards an app draws, dragged on the main thread, with a quick add per column.
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `columns`: object[]
|
|
9
|
+
- `getKey`: (item: T) => void
|
|
10
|
+
- `renderCard`: (item, state) => ReactNode
|
|
11
|
+
- `onAdd?`: (column: string, title: string) => void
|
|
12
|
+
- `onDragEnd?`: (key: string, moved: boolean) => void
|
|
13
|
+
- `onDragStart?`: (key: string) => void
|
|
14
|
+
- `onMove?`: (key: string, column: string, index: number, from: string) => void
|
|
15
|
+
- `addLabel?`: string
|
|
16
|
+
|
|
17
|
+
Example: `<G9Board columns={columns} getKey={getKey} renderCard={renderCard} />`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# G9RuleBuilder
|
|
2
|
+
|
|
3
|
+
`import { G9RuleBuilder } from '@g9tm/lynxcontrols-projects';`
|
|
4
|
+
|
|
5
|
+
An automation rule: When → If → Then, each step's editor the app's.
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `actionKinds`: object[]
|
|
9
|
+
- `actions`: NonNullable<A>[]
|
|
10
|
+
- `conditionKinds`: object[]
|
|
11
|
+
- `conditions`: NonNullable<C>[]
|
|
12
|
+
- `labels`: object
|
|
13
|
+
- `onAddAction`: (kind: string) => void
|
|
14
|
+
- `onAddCondition`: (kind: string) => void
|
|
15
|
+
- `onRemoveAction`: (index: number) => void
|
|
16
|
+
|
|
17
|
+
Example: `<G9RuleBuilder actionKinds={actionKinds} actions={actions} conditionKinds={conditionKinds} conditions={conditions} labels={labels} onAddAction={() => {}} onAddCondition={() => {}} onRemoveAction={() => {}} onRemoveCondition={() => {}} onTriggerChange={() => {}} renderAction={renderAction} renderCondition={renderCondition} trigger="trigger" triggers={triggers} />`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# G9TaskCard
|
|
2
|
+
|
|
3
|
+
`import { G9TaskCard } from '@g9tm/lynxcontrols-projects';`
|
|
4
|
+
|
|
5
|
+
A task on a board or in a list.
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `title`: string
|
|
9
|
+
- `onPress?`: () => void
|
|
10
|
+
- `onLongPress?`: () => void
|
|
11
|
+
- `blockedLabel?`: string
|
|
12
|
+
- `priorityLabel?`: string
|
|
13
|
+
- `priorityIcon?`: icon
|
|
14
|
+
- `blocked?`: boolean
|
|
15
|
+
- `checklist?`: object
|
|
16
|
+
|
|
17
|
+
Example: `<G9TaskCard title="Label" />`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# G9Timeline
|
|
2
|
+
|
|
3
|
+
`import { G9Timeline } from '@g9tm/lynxcontrols-projects';`
|
|
4
|
+
|
|
5
|
+
A Gantt chart: rows and bars an app keeps, moved and resized on the main thread, in the culture's calendar.
|
|
6
|
+
|
|
7
|
+
Props:
|
|
8
|
+
- `rows`: object[]
|
|
9
|
+
- `today`: number
|
|
10
|
+
- `barLabel?`: (row: G9TimelineRow) => void
|
|
11
|
+
- `onOpen?`: (key: string) => void
|
|
12
|
+
- `onSpanChange?`: (key: string, span: G9DaySpan) => void
|
|
13
|
+
- `onZoomChange?`: (zoom: G9TimelineZoom) => void
|
|
14
|
+
- `todayLabel?`: string
|
|
15
|
+
- `labelWidth?`: number = 160
|
|
16
|
+
|
|
17
|
+
Example: `<G9Timeline rows={rows} today={1} />`
|