@g9tm/lynxcontrols-projects 2.5.8 → 2.5.10
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 +5 -0
- package/catalog/cards/G9ActivityFeed.md +17 -0
- package/catalog/cards/G9FileBrowser.md +17 -0
- package/catalog/cards/G9FormBuilder.md +15 -0
- package/catalog/cards/G9OrgChart.md +17 -0
- package/catalog/cards/G9QuestionField.md +17 -0
- package/catalog/cards/G9Timeline.md +3 -3
- package/catalog/catalog.json +2090 -18
- package/catalog/index.md +6 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/activity.css +105 -0
- package/dist/activity.css.map +1 -0
- package/dist/activity.d.ts +49 -0
- package/dist/activity.d.ts.map +1 -0
- package/dist/activity.jsx +129 -0
- package/dist/files.css +264 -0
- package/dist/files.css.map +1 -0
- package/dist/files.d.ts +86 -0
- package/dist/files.d.ts.map +1 -0
- package/dist/files.jsx +318 -0
- package/dist/forms.css +144 -0
- package/dist/forms.css.map +1 -0
- package/dist/forms.d.ts +89 -0
- package/dist/forms.d.ts.map +1 -0
- package/dist/forms.jsx +359 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.jsx +4 -0
- package/dist/org-chart.css +127 -0
- package/dist/org-chart.css.map +1 -0
- package/dist/org-chart.d.ts +73 -0
- package/dist/org-chart.d.ts.map +1 -0
- package/dist/org-chart.jsx +388 -0
- package/dist/projects.css +49 -0
- package/dist/projects.css.map +1 -1
- package/dist/rule-builder.d.ts +6 -0
- package/dist/rule-builder.d.ts.map +1 -1
- package/dist/rule-builder.jsx +24 -3
- package/dist/timeline.d.ts +28 -0
- package/dist/timeline.d.ts.map +1 -1
- package/dist/timeline.jsx +150 -14
- package/package.json +3 -3
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
import { g9IdProps } from "@g9tm/lynxcontrols/base";
|
|
2
|
+
import { G9IconButton } from "@g9tm/lynxcontrols/button";
|
|
3
|
+
import { G9Avatar, avatarTone } from "@g9tm/lynxcontrols/display";
|
|
4
|
+
import { G9SearchEntry } from "@g9tm/lynxcontrols/fields";
|
|
5
|
+
import { G9Icon } from "@g9tm/lynxcontrols/icon";
|
|
6
|
+
import { useG9Culture, useG9Direction, useG9Layout } from "@g9tm/lynxcontrols/provider";
|
|
7
|
+
import { searchKey, toNativeDigits } from "@g9tm/lynxcontrols-foundation";
|
|
8
|
+
import { useEffect, useMemo, useState } from "@lynx-js/react";
|
|
9
|
+
import "./org-chart.css";
|
|
10
|
+
function g9OrgTree(people) {
|
|
11
|
+
const byId = new Map(people.map((p)=>[
|
|
12
|
+
p.id,
|
|
13
|
+
p
|
|
14
|
+
]));
|
|
15
|
+
const parent = new Map();
|
|
16
|
+
for (const p of people){
|
|
17
|
+
const m = p.managerId;
|
|
18
|
+
if (!m || m === p.id || !byId.has(m)) continue;
|
|
19
|
+
let up = m;
|
|
20
|
+
let loop = false;
|
|
21
|
+
for(let guard = 0; void 0 !== up && guard <= people.length; guard++){
|
|
22
|
+
if (up === p.id) {
|
|
23
|
+
loop = true;
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
up = parent.get(up);
|
|
27
|
+
}
|
|
28
|
+
if (!loop) parent.set(p.id, m);
|
|
29
|
+
}
|
|
30
|
+
const children = new Map();
|
|
31
|
+
const roots = [];
|
|
32
|
+
for (const p of people){
|
|
33
|
+
var _children_get;
|
|
34
|
+
const m = parent.get(p.id);
|
|
35
|
+
if (m) children.set(m, [
|
|
36
|
+
...null != (_children_get = children.get(m)) ? _children_get : [],
|
|
37
|
+
p.id
|
|
38
|
+
]);
|
|
39
|
+
else roots.push(p.id);
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
roots,
|
|
43
|
+
children,
|
|
44
|
+
parent,
|
|
45
|
+
byId
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function g9OrgReportCount(tree, id) {
|
|
49
|
+
var _tree_children_get;
|
|
50
|
+
let n = 0;
|
|
51
|
+
const stack = [
|
|
52
|
+
...null != (_tree_children_get = tree.children.get(id)) ? _tree_children_get : []
|
|
53
|
+
];
|
|
54
|
+
while(stack.length){
|
|
55
|
+
var _tree_children_get1;
|
|
56
|
+
const c = stack.pop();
|
|
57
|
+
n++;
|
|
58
|
+
stack.push(...null != (_tree_children_get1 = tree.children.get(c)) ? _tree_children_get1 : []);
|
|
59
|
+
}
|
|
60
|
+
return n;
|
|
61
|
+
}
|
|
62
|
+
function g9OrgLayout(tree, collapsed, size, visible) {
|
|
63
|
+
const boxes = [];
|
|
64
|
+
let next = 0;
|
|
65
|
+
let deepest = 0;
|
|
66
|
+
const shown = (id)=>!visible || visible.has(id);
|
|
67
|
+
const place = (id, depth)=>{
|
|
68
|
+
var _tree_children_get;
|
|
69
|
+
deepest = Math.max(deepest, depth);
|
|
70
|
+
const kids = collapsed.has(id) ? [] : (null != (_tree_children_get = tree.children.get(id)) ? _tree_children_get : []).filter(shown);
|
|
71
|
+
let x;
|
|
72
|
+
if (0 === kids.length) {
|
|
73
|
+
x = next;
|
|
74
|
+
next += size.width + size.gapX;
|
|
75
|
+
} else {
|
|
76
|
+
const xs = kids.map((k)=>place(k, depth + 1));
|
|
77
|
+
x = (xs[0] + xs[xs.length - 1]) / 2;
|
|
78
|
+
}
|
|
79
|
+
boxes.push({
|
|
80
|
+
id,
|
|
81
|
+
x,
|
|
82
|
+
y: depth * (size.height + size.gapY),
|
|
83
|
+
depth
|
|
84
|
+
});
|
|
85
|
+
return x;
|
|
86
|
+
};
|
|
87
|
+
for (const r of tree.roots.filter(shown))place(r, 0);
|
|
88
|
+
return {
|
|
89
|
+
boxes,
|
|
90
|
+
width: Math.max(0, next - size.gapX),
|
|
91
|
+
height: boxes.length ? (deepest + 1) * size.height + deepest * size.gapY : 0
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
function g9OrgMatches(tree, query) {
|
|
95
|
+
const q = searchKey(query.trim());
|
|
96
|
+
if (!q) return null;
|
|
97
|
+
const out = new Set();
|
|
98
|
+
for (const p of tree.byId.values()){
|
|
99
|
+
var _p_title;
|
|
100
|
+
if (!searchKey(p.name).includes(q) && !searchKey(null != (_p_title = p.title) ? _p_title : '').includes(q)) continue;
|
|
101
|
+
let up = p.id;
|
|
102
|
+
while(void 0 !== up && !out.has(up)){
|
|
103
|
+
out.add(up);
|
|
104
|
+
up = tree.parent.get(up);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return out;
|
|
108
|
+
}
|
|
109
|
+
const CARD = {
|
|
110
|
+
width: 168,
|
|
111
|
+
height: 64,
|
|
112
|
+
gapX: 16,
|
|
113
|
+
gapY: 40
|
|
114
|
+
};
|
|
115
|
+
const LINE = 'var(--g9-outline-variant)';
|
|
116
|
+
function G9OrgChart(props) {
|
|
117
|
+
var _props_query, _props_words, _w_empty, _w_zoomOut, _w_zoomIn, _props_height;
|
|
118
|
+
const rtl = 'rtl' === useG9Direction();
|
|
119
|
+
const culture = useG9Culture();
|
|
120
|
+
const { wide } = useG9Layout();
|
|
121
|
+
const tree = useMemo(()=>g9OrgTree(props.people), [
|
|
122
|
+
props.people
|
|
123
|
+
]);
|
|
124
|
+
const [ownQuery, setOwnQuery] = useState('');
|
|
125
|
+
const query = null != (_props_query = props.query) ? _props_query : ownQuery;
|
|
126
|
+
const matches = useMemo(()=>g9OrgMatches(tree, query), [
|
|
127
|
+
tree,
|
|
128
|
+
query
|
|
129
|
+
]);
|
|
130
|
+
const depthOf = (id)=>{
|
|
131
|
+
let d = 0;
|
|
132
|
+
for(let up = tree.parent.get(id); void 0 !== up; up = tree.parent.get(up))d++;
|
|
133
|
+
return d;
|
|
134
|
+
};
|
|
135
|
+
const [collapsed, setCollapsed] = useState(()=>{
|
|
136
|
+
var _props_initialDepth;
|
|
137
|
+
const limit = null != (_props_initialDepth = props.initialDepth) ? _props_initialDepth : 2;
|
|
138
|
+
return new Set(props.people.filter((p)=>depthOf(p.id) >= limit - 1 && tree.children.has(p.id)).map((p)=>p.id));
|
|
139
|
+
});
|
|
140
|
+
useEffect(()=>{
|
|
141
|
+
if (!props.focusId) return;
|
|
142
|
+
setCollapsed((cur)=>{
|
|
143
|
+
const next = new Set(cur);
|
|
144
|
+
for(let up = tree.parent.get(props.focusId); void 0 !== up; up = tree.parent.get(up))next.delete(up);
|
|
145
|
+
return next;
|
|
146
|
+
});
|
|
147
|
+
}, [
|
|
148
|
+
props.focusId,
|
|
149
|
+
tree
|
|
150
|
+
]);
|
|
151
|
+
const [zoom, setZoom] = useState(1);
|
|
152
|
+
const shut = matches ? new Set() : collapsed;
|
|
153
|
+
const toggle = (id)=>setCollapsed((cur)=>{
|
|
154
|
+
const next = new Set(cur);
|
|
155
|
+
if (next.has(id)) next.delete(id);
|
|
156
|
+
else next.add(id);
|
|
157
|
+
return next;
|
|
158
|
+
});
|
|
159
|
+
const n = (v)=>toNativeDigits(String(v), culture.numberingSystem);
|
|
160
|
+
const n2 = (t)=>toNativeDigits(t, culture.numberingSystem);
|
|
161
|
+
const w = null != (_props_words = props.words) ? _props_words : {};
|
|
162
|
+
const asTree = 'tree' === props.layout || 'list' !== props.layout && wide;
|
|
163
|
+
const id = (part)=>props.id ? `${props.id}_${part}` : void 0;
|
|
164
|
+
const search = void 0 === props.query && props.searchPlaceholder ? <view className="g9-org__search">
|
|
165
|
+
<G9SearchEntry {...id('Search') ? {
|
|
166
|
+
id: id('Search')
|
|
167
|
+
} : {}} placeholder={props.searchPlaceholder} debounceMs={150} onSearch={(v)=>setOwnQuery(v)}/>
|
|
168
|
+
</view> : null;
|
|
169
|
+
const card = (pid)=>{
|
|
170
|
+
var _ref, _p_title;
|
|
171
|
+
var _tree_children_get;
|
|
172
|
+
const p = tree.byId.get(pid);
|
|
173
|
+
const kids = null != (_ref = null == (_tree_children_get = tree.children.get(pid)) ? void 0 : _tree_children_get.length) ? _ref : 0;
|
|
174
|
+
const total = kids ? g9OrgReportCount(tree, pid) : 0;
|
|
175
|
+
const open = !shut.has(pid);
|
|
176
|
+
const qk = searchKey(query.trim());
|
|
177
|
+
const hit = !!(null == matches ? void 0 : matches.has(pid)) && !!qk && (searchKey(p.name).includes(qk) || searchKey(null != (_p_title = p.title) ? _p_title : '').includes(qk));
|
|
178
|
+
return {
|
|
179
|
+
p,
|
|
180
|
+
kids,
|
|
181
|
+
total,
|
|
182
|
+
open,
|
|
183
|
+
hit: !!hit
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
const expander = (pid, kids, open)=>{
|
|
187
|
+
var _w_collapse, _w_expand;
|
|
188
|
+
return kids && !matches ? <view className="g9-org__toggle" {...g9IdProps(id(`${pid}_Toggle`))} catchtap={()=>toggle(pid)} accessibility-element={true} accessibility-traits="button" accessibility-label={open ? null != (_w_collapse = w.collapse) ? _w_collapse : '−' : null != (_w_expand = w.expand) ? _w_expand : '+'}>
|
|
189
|
+
<G9Icon icon={open ? 'chevronUp' : 'chevronDown'} size={14} color="var(--g9-text-secondary)"/>
|
|
190
|
+
</view> : null;
|
|
191
|
+
};
|
|
192
|
+
if (0 === props.people.length) return <view className="g9-org" {...g9IdProps(props.id)}>
|
|
193
|
+
<text className="g9-org__empty">{null != (_w_empty = w.empty) ? _w_empty : ''}</text>
|
|
194
|
+
</view>;
|
|
195
|
+
if (!asTree) {
|
|
196
|
+
const rows = [];
|
|
197
|
+
const walk = (pid, depth)=>{
|
|
198
|
+
var _tree_children_get;
|
|
199
|
+
if (matches && !matches.has(pid)) return;
|
|
200
|
+
rows.push({
|
|
201
|
+
pid,
|
|
202
|
+
depth
|
|
203
|
+
});
|
|
204
|
+
if (shut.has(pid)) return;
|
|
205
|
+
for (const c of null != (_tree_children_get = tree.children.get(pid)) ? _tree_children_get : [])walk(c, depth + 1);
|
|
206
|
+
};
|
|
207
|
+
for (const r of tree.roots)walk(r, 0);
|
|
208
|
+
return <view className="g9-org g9-org--list" {...g9IdProps(props.id)}>
|
|
209
|
+
{search}
|
|
210
|
+
{rows.map(({ pid, depth })=>{
|
|
211
|
+
var _c_p_avatar;
|
|
212
|
+
var _w_reports;
|
|
213
|
+
const c = card(pid);
|
|
214
|
+
return <view key={pid} className={`g9-org__row${props.focusId === pid ? ' g9-org__row--focused' : ''}${c.hit ? ' g9-org__row--hit' : ''}`} {...g9IdProps(id(pid))} style={{
|
|
215
|
+
flexDirection: rtl ? 'row-reverse' : 'row',
|
|
216
|
+
direction: 'ltr',
|
|
217
|
+
[rtl ? 'paddingRight' : 'paddingLeft']: `${12 + 20 * depth}px`
|
|
218
|
+
}} {...props.onOpen ? {
|
|
219
|
+
bindtap: ()=>{
|
|
220
|
+
var _props_onOpen;
|
|
221
|
+
return null == (_props_onOpen = props.onOpen) ? void 0 : _props_onOpen.call(props, pid);
|
|
222
|
+
}
|
|
223
|
+
} : {}} accessibility-element={true} accessibility-traits="button" accessibility-label={[
|
|
224
|
+
c.p.name,
|
|
225
|
+
c.p.title,
|
|
226
|
+
c.total ? null == (_w_reports = w.reports) ? void 0 : _w_reports.call(w, c.total) : void 0
|
|
227
|
+
].filter(Boolean).join(', ')}>
|
|
228
|
+
<G9Avatar name={c.p.name} image={null != (_c_p_avatar = c.p.avatar) ? _c_p_avatar : null} size={36} tone={avatarTone(pid)} {...c.p.presence ? {
|
|
229
|
+
status: c.p.presence
|
|
230
|
+
} : {}}/>
|
|
231
|
+
<view className="g9-org__texts">
|
|
232
|
+
<text className={`g9-org__name${c.hit ? ' g9-org__name--hit' : ''}`} text-maxline="1" style={{
|
|
233
|
+
textAlign: rtl ? 'right' : 'left'
|
|
234
|
+
}}>
|
|
235
|
+
{c.p.name}
|
|
236
|
+
</text>
|
|
237
|
+
{c.p.title ? <text className="g9-org__title" text-maxline="1" style={{
|
|
238
|
+
textAlign: rtl ? 'right' : 'left'
|
|
239
|
+
}}>
|
|
240
|
+
{c.p.title}
|
|
241
|
+
</text> : null}
|
|
242
|
+
</view>
|
|
243
|
+
{c.total ? <text className="g9-org__count" style={{
|
|
244
|
+
direction: rtl ? 'rtl' : 'ltr'
|
|
245
|
+
}}>
|
|
246
|
+
{w.reports ? n2(w.reports(c.total)) : n(c.total)}
|
|
247
|
+
</text> : null}
|
|
248
|
+
{expander(pid, c.kids, c.open)}
|
|
249
|
+
</view>;
|
|
250
|
+
})}
|
|
251
|
+
</view>;
|
|
252
|
+
}
|
|
253
|
+
const laid = g9OrgLayout(tree, shut, CARD, matches);
|
|
254
|
+
const pos = new Map(laid.boxes.map((b)=>[
|
|
255
|
+
b.id,
|
|
256
|
+
b
|
|
257
|
+
]));
|
|
258
|
+
const pad = 16;
|
|
259
|
+
const W = laid.width + 2 * pad;
|
|
260
|
+
const H = laid.height + 2 * pad;
|
|
261
|
+
const left = (x, width)=>pad + (rtl ? laid.width - x - width : x);
|
|
262
|
+
const lines = [];
|
|
263
|
+
for (const b of laid.boxes){
|
|
264
|
+
var _tree_children_get;
|
|
265
|
+
const kids = shut.has(b.id) ? [] : (null != (_tree_children_get = tree.children.get(b.id)) ? _tree_children_get : []).filter((k)=>pos.has(k));
|
|
266
|
+
if (!kids.length) continue;
|
|
267
|
+
const cx = b.x + CARD.width / 2;
|
|
268
|
+
const bottom = b.y + CARD.height;
|
|
269
|
+
const mid = bottom + CARD.gapY / 2;
|
|
270
|
+
lines.push({
|
|
271
|
+
key: `${b.id}:down`,
|
|
272
|
+
x: cx - 0.75,
|
|
273
|
+
y: bottom,
|
|
274
|
+
w: 1.5,
|
|
275
|
+
h: CARD.gapY / 2
|
|
276
|
+
});
|
|
277
|
+
const xs = kids.map((k)=>pos.get(k).x + CARD.width / 2);
|
|
278
|
+
const a = Math.min(cx, ...xs);
|
|
279
|
+
const z = Math.max(cx, ...xs);
|
|
280
|
+
if (z > a) lines.push({
|
|
281
|
+
key: `${b.id}:across`,
|
|
282
|
+
x: a,
|
|
283
|
+
y: mid - 0.75,
|
|
284
|
+
w: z - a,
|
|
285
|
+
h: 1.5
|
|
286
|
+
});
|
|
287
|
+
for (const k of kids){
|
|
288
|
+
const kx = pos.get(k).x + CARD.width / 2;
|
|
289
|
+
lines.push({
|
|
290
|
+
key: `${b.id}>${k}`,
|
|
291
|
+
x: kx - 0.75,
|
|
292
|
+
y: mid,
|
|
293
|
+
w: 1.5,
|
|
294
|
+
h: CARD.gapY / 2
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
const z = Math.round(100 * zoom) / 100;
|
|
299
|
+
return <view className="g9-org g9-org--tree" {...g9IdProps(props.id)}>
|
|
300
|
+
<view className="g9-org__bar" style={{
|
|
301
|
+
flexDirection: rtl ? 'row-reverse' : 'row',
|
|
302
|
+
direction: 'ltr'
|
|
303
|
+
}}>
|
|
304
|
+
<view className="g9-org__bar-search">{search}</view>
|
|
305
|
+
<G9IconButton {...id('ZoomOut') ? {
|
|
306
|
+
id: id('ZoomOut')
|
|
307
|
+
} : {}} icon="minus" isGhost disabled={z <= 0.5} accessibilityText={null != (_w_zoomOut = w.zoomOut) ? _w_zoomOut : '−'} onPress={()=>setZoom((v)=>Math.max(0.5, v - 0.25))}/>
|
|
308
|
+
<G9IconButton {...id('ZoomIn') ? {
|
|
309
|
+
id: id('ZoomIn')
|
|
310
|
+
} : {}} icon="plus" isGhost disabled={z >= 1.5} accessibilityText={null != (_w_zoomIn = w.zoomIn) ? _w_zoomIn : '+'} onPress={()=>setZoom((v)=>Math.min(1.5, v + 0.25))}/>
|
|
311
|
+
</view>
|
|
312
|
+
<scroll-view className="g9-org__vscroll" scroll-orientation="vertical" style={{
|
|
313
|
+
height: `${null != (_props_height = props.height) ? _props_height : 480}px`
|
|
314
|
+
}}>
|
|
315
|
+
<scroll-view className="g9-org__hscroll" scroll-orientation="horizontal">
|
|
316
|
+
<view className="g9-org__frame" style={{
|
|
317
|
+
width: `${W * z}px`,
|
|
318
|
+
height: `${H * z}px`
|
|
319
|
+
}}>
|
|
320
|
+
<view className="g9-org__canvas" style={{
|
|
321
|
+
width: `${W}px`,
|
|
322
|
+
height: `${H}px`,
|
|
323
|
+
transform: `scale(${z})`,
|
|
324
|
+
transformOrigin: rtl ? 'right top' : 'left top',
|
|
325
|
+
[rtl ? 'right' : 'left']: '0px'
|
|
326
|
+
}}>
|
|
327
|
+
{lines.map((l)=><view key={l.key} className="g9-org__line" style={{
|
|
328
|
+
left: `${left(l.x, l.w)}px`,
|
|
329
|
+
top: `${pad + l.y}px`,
|
|
330
|
+
width: `${l.w}px`,
|
|
331
|
+
height: `${l.h}px`,
|
|
332
|
+
backgroundColor: LINE
|
|
333
|
+
}}/>)}
|
|
334
|
+
{laid.boxes.map((b)=>{
|
|
335
|
+
var _c_p_avatar;
|
|
336
|
+
var _w_reports;
|
|
337
|
+
const c = card(b.id);
|
|
338
|
+
return <view key={b.id} className={`g9-org__card${props.focusId === b.id ? ' g9-org__card--focused' : ''}${c.hit ? ' g9-org__card--hit' : ''}`} {...g9IdProps(id(b.id))} style={{
|
|
339
|
+
left: `${left(b.x, CARD.width)}px`,
|
|
340
|
+
top: `${pad + b.y}px`,
|
|
341
|
+
width: `${CARD.width}px`,
|
|
342
|
+
height: `${CARD.height}px`,
|
|
343
|
+
flexDirection: rtl ? 'row-reverse' : 'row',
|
|
344
|
+
direction: 'ltr'
|
|
345
|
+
}} {...props.onOpen ? {
|
|
346
|
+
bindtap: ()=>{
|
|
347
|
+
var _props_onOpen;
|
|
348
|
+
return null == (_props_onOpen = props.onOpen) ? void 0 : _props_onOpen.call(props, b.id);
|
|
349
|
+
}
|
|
350
|
+
} : {}} accessibility-element={true} accessibility-traits="button" accessibility-label={[
|
|
351
|
+
c.p.name,
|
|
352
|
+
c.p.title,
|
|
353
|
+
c.total ? null == (_w_reports = w.reports) ? void 0 : _w_reports.call(w, c.total) : void 0
|
|
354
|
+
].filter(Boolean).join(', ')}>
|
|
355
|
+
<G9Avatar name={c.p.name} image={null != (_c_p_avatar = c.p.avatar) ? _c_p_avatar : null} size={36} tone={avatarTone(b.id)} {...c.p.presence ? {
|
|
356
|
+
status: c.p.presence
|
|
357
|
+
} : {}}/>
|
|
358
|
+
<view className="g9-org__texts">
|
|
359
|
+
<text className={`g9-org__name${c.hit ? ' g9-org__name--hit' : ''}`} text-maxline="1" style={{
|
|
360
|
+
textAlign: rtl ? 'right' : 'left'
|
|
361
|
+
}}>
|
|
362
|
+
{c.p.name}
|
|
363
|
+
</text>
|
|
364
|
+
{c.p.title ? <text className="g9-org__title" text-maxline="1" style={{
|
|
365
|
+
textAlign: rtl ? 'right' : 'left'
|
|
366
|
+
}}>
|
|
367
|
+
{c.p.title}
|
|
368
|
+
</text> : null}
|
|
369
|
+
</view>
|
|
370
|
+
{c.kids ? <view className="g9-org__card-foot" style={{
|
|
371
|
+
[rtl ? 'left' : 'right']: '4px'
|
|
372
|
+
}}>
|
|
373
|
+
{c.total ? <text className="g9-org__count" style={{
|
|
374
|
+
direction: rtl ? 'rtl' : 'ltr'
|
|
375
|
+
}}>
|
|
376
|
+
{n(c.total)}
|
|
377
|
+
</text> : null}
|
|
378
|
+
{expander(b.id, c.kids, c.open)}
|
|
379
|
+
</view> : null}
|
|
380
|
+
</view>;
|
|
381
|
+
})}
|
|
382
|
+
</view>
|
|
383
|
+
</view>
|
|
384
|
+
</scroll-view>
|
|
385
|
+
</scroll-view>
|
|
386
|
+
</view>;
|
|
387
|
+
}
|
|
388
|
+
export { G9OrgChart, g9OrgLayout, g9OrgMatches, g9OrgReportCount, g9OrgTree };
|
package/dist/projects.css
CHANGED
|
@@ -578,5 +578,54 @@
|
|
|
578
578
|
display: flex;
|
|
579
579
|
}
|
|
580
580
|
|
|
581
|
+
.g9-rule__item-head {
|
|
582
|
+
align-items: center;
|
|
583
|
+
column-gap: 6px;
|
|
584
|
+
margin-bottom: 6px;
|
|
585
|
+
display: flex;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
.g9-rule__item-kind {
|
|
589
|
+
font-size: 12px;
|
|
590
|
+
font-weight: 600;
|
|
591
|
+
font-family: var(--g9-font-text-600);
|
|
592
|
+
color: var(--g9-text-secondary);
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
.g9-tl__label-row {
|
|
596
|
+
align-items: center;
|
|
597
|
+
column-gap: 6px;
|
|
598
|
+
width: 100%;
|
|
599
|
+
display: flex;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
.g9-tl__code {
|
|
603
|
+
font-size: 11px;
|
|
604
|
+
font-family: var(--g9-font-text);
|
|
605
|
+
color: var(--g9-text-tertiary);
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
.g9-tl__code-mono {
|
|
609
|
+
font-family: monospace;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
.g9-tl__meta {
|
|
613
|
+
font-size: 11px;
|
|
614
|
+
font-family: var(--g9-font-text);
|
|
615
|
+
color: var(--g9-text-tertiary);
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
.g9-tl__group-text {
|
|
619
|
+
font-size: 12px;
|
|
620
|
+
font-weight: 600;
|
|
621
|
+
font-family: var(--g9-font-text-600);
|
|
622
|
+
color: var(--g9-text-secondary);
|
|
623
|
+
align-items: center;
|
|
624
|
+
display: flex;
|
|
625
|
+
position: absolute;
|
|
626
|
+
top: 0;
|
|
627
|
+
bottom: 0;
|
|
628
|
+
}
|
|
629
|
+
|
|
581
630
|
|
|
582
631
|
/*# sourceMappingURL=projects.css.map */
|
package/dist/projects.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://./src/projects.css"],"names":[],"mappings":"AAGA;EAFE,mBAAmB;EACnB,iBAAiB;EACjB,uCAAuC;EACvC,mCAAmC;EACnC,mBAAmB;EACnB,sBAAsB;EACtB,YAAY;EACZ,aAAa;EACb,aAAa;EACb,gBAAgB;AAClB;;AAKA;EAFE,WAAW;AACb;;AAKA;EAFE,UAAU;EACV,kBAAkB;EAClB,MAAM;EACN,SAAS;AACX;;AAKA;EAFE,YAAY;EACZ,qBAAqB;AACvB;;AAKA;EAFE,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AAKA;EAFE,eAAe;EACf,gBA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* The projects controls (2.5.8, G9Hub item 47). Single-class rules; every text that may truncate clips. */\n\n/* task card */\n.g9-task {\n display: flex;\n flex-direction: column;\n row-gap: 6px;\n padding: 10px;\n border-radius: 12px;\n border-width: 1px;\n border-style: solid;\n border-color: var(--g9-outline-variant);\n background-color: var(--g9-surface);\n overflow: hidden;\n}\n\n.g9-task--dragging {\n opacity: 0.4;\n}\n\n.g9-task__stripe {\n position: absolute;\n top: 0px;\n bottom: 0px;\n width: 3px;\n}\n\n.g9-task__cover {\n height: 96px;\n margin: -10px -10px 0px -10px;\n}\n\n.g9-task__top {\n display: flex;\n align-items: center;\n column-gap: 4px;\n}\n\n.g9-task__code {\n font-size: 11px;\n font-weight: 600;\n font-family: var(--g9-font-text-600);\n color: var(--g9-text-tertiary);\n direction: ltr;\n}\n\n.g9-task__blocked {\n display: flex;\n align-items: center;\n padding: 0px 4px;\n border-radius: 6px;\n background-color: rgba(245, 159, 0, 0.15);\n}\n\n.g9-task__blocked-text {\n font-size: 11px;\n font-weight: 600;\n font-family: var(--g9-font-text-600);\n color: var(--g9-warning);\n}\n\n.g9-task__spacer {\n flex: 1;\n}\n\n.g9-task__priority {\n font-size: 14px;\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n}\n\n.g9-task__title {\n font-size: 14px;\n font-weight: 500;\n font-family: var(--g9-font-text-500);\n color: var(--g9-text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.g9-task__title--done {\n color: var(--g9-text-tertiary);\n text-decoration: line-through;\n}\n\n.g9-task__labels {\n display: flex;\n flex-wrap: wrap;\n column-gap: 4px;\n row-gap: 4px;\n}\n\n.g9-task__label {\n max-width: 120px;\n padding: 0px 6px;\n border-radius: 6px;\n background-color: var(--g9-primary-container);\n}\n\n.g9-task__label-text {\n font-size: 11px;\n font-family: var(--g9-font-text);\n color: var(--g9-on-primary-container);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.g9-task__bottom {\n display: flex;\n align-items: center;\n column-gap: 8px;\n min-height: 20px;\n}\n\n.g9-task__due {\n font-size: 11px;\n font-weight: 500;\n font-family: var(--g9-font-text-500);\n}\n\n.g9-task__check {\n font-size: 11px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-tertiary);\n}\n\n.g9-task__check--done {\n color: var(--g9-success);\n}\n\n.g9-task__people {\n display: flex;\n align-items: center;\n column-gap: 2px;\n}\n\n.g9-task__more {\n font-size: 11px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-tertiary);\n}\n\n/* board */\n.g9-board {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0px;\n}\n\n.g9-board__scroller {\n flex: 1;\n}\n\n.g9-board__columns {\n display: flex;\n align-items: flex-start;\n padding: 12px;\n}\n\n.g9-board__column {\n display: flex;\n flex-direction: column;\n border-radius: 14px;\n background-color: var(--g9-surface-container);\n}\n\n.g9-board__column--target {\n background-color: var(--g9-surface-container-high);\n}\n\n.g9-board__head {\n display: flex;\n align-items: center;\n column-gap: 6px;\n height: 44px;\n padding: 0px 12px;\n}\n\n.g9-board__dot {\n width: 8px;\n height: 8px;\n border-radius: 4px;\n}\n\n.g9-board__title {\n flex: 1;\n min-width: 0px;\n font-size: 14px;\n font-weight: 600;\n font-family: var(--g9-font-text-600);\n color: var(--g9-text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.g9-board__count {\n font-size: 12px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-tertiary);\n}\n\n.g9-board__count--over {\n color: var(--g9-warning);\n}\n\n.g9-board__cards {\n max-height: 640px;\n padding: 0px 8px;\n}\n\n.g9-board__card {\n margin-bottom: 8px;\n}\n\n.g9-board__slot {\n height: 4px;\n margin: 2px 4px 10px 4px;\n border-radius: 2px;\n background-color: var(--g9-primary);\n}\n\n.g9-board__empty {\n padding: 12px 4px;\n font-size: 12px;\n font-family: var(--g9-font-text);\n text-align: center;\n color: var(--g9-text-tertiary);\n}\n\n.g9-board__add {\n padding: 10px 12px;\n}\n\n.g9-board__add-text {\n font-size: 13px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-secondary);\n}\n\n.g9-board__add-form {\n display: flex;\n flex-direction: column;\n row-gap: 6px;\n padding: 8px;\n}\n\n.g9-board__add-actions {\n display: flex;\n justify-content: flex-end;\n column-gap: 6px;\n}\n\n.g9-board__ghost {\n position: absolute;\n top: 0px;\n left: 0px;\n opacity: 0.92;\n pointer-events: none;\n}\n\n/* timeline */\n.g9-tl {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0px;\n}\n\n.g9-tl__zoom {\n display: flex;\n flex-direction: column;\n padding: 8px 12px;\n}\n\n.g9-tl__vscroll {\n flex: 1;\n}\n\n.g9-tl__frame {\n display: flex;\n}\n\n.g9-tl__labels {\n display: flex;\n flex-direction: column;\n border-right-width: 1px;\n border-right-style: solid;\n border-right-color: var(--g9-outline-variant);\n}\n\n.g9-tl__label {\n display: flex;\n align-items: center;\n padding: 0px 10px;\n}\n\n.g9-tl__label--group {\n background-color: var(--g9-surface-container);\n}\n\n.g9-tl__label-text {\n flex: 1;\n min-width: 0px;\n font-size: 13px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.g9-tl__label-text--done {\n color: var(--g9-text-tertiary);\n text-decoration: line-through;\n}\n\n.g9-tl__chart {\n flex: 1;\n}\n\n.g9-tl__canvas {\n display: flex;\n flex-direction: column;\n}\n\n.g9-tl__head {\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: var(--g9-outline-variant);\n}\n\n.g9-tl__month {\n position: absolute;\n top: 0px;\n height: 26px;\n padding: 4px 6px;\n border-left-width: 1px;\n border-left-style: solid;\n border-left-color: var(--g9-outline-variant);\n}\n\n.g9-tl__month-text {\n font-size: 12px;\n font-weight: 600;\n font-family: var(--g9-font-text-600);\n color: var(--g9-text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.g9-tl__week {\n position: absolute;\n top: 26px;\n height: 26px;\n padding: 4px;\n}\n\n.g9-tl__week-text {\n font-size: 11px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-tertiary);\n}\n\n.g9-tl__body {\n position: relative;\n}\n\n.g9-tl__weekend {\n position: absolute;\n top: 0px;\n bottom: 0px;\n background-color: rgba(127, 127, 127, 0.08);\n}\n\n.g9-tl__row {\n position: absolute;\n left: 0px;\n right: 0px;\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: rgba(127, 127, 127, 0.12);\n}\n\n.g9-tl__row--group {\n background-color: var(--g9-surface-container);\n}\n\n.g9-tl__bar {\n position: absolute;\n top: 8px;\n height: 24px;\n display: flex;\n align-items: center;\n padding: 0px 8px;\n border-radius: 6px;\n overflow: hidden;\n}\n\n.g9-tl__bar--done {\n opacity: 0.5;\n}\n\n.g9-tl__bar--blocked {\n border-width: 2px;\n border-style: solid;\n border-color: var(--g9-warning);\n}\n\n.g9-tl__bar--focused {\n border-width: 2px;\n border-style: solid;\n border-color: var(--g9-text-primary);\n}\n\n.g9-tl__progress {\n position: absolute;\n top: 0px;\n bottom: 0px;\n background-color: rgba(0, 0, 0, 0.18);\n}\n\n.g9-tl__bar-text {\n flex: 1;\n min-width: 0px;\n font-size: 12px;\n font-family: var(--g9-font-text);\n color: #ffffff;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.g9-tl__handle {\n position: absolute;\n top: 0px;\n bottom: 0px;\n width: 12px;\n}\n\n.g9-tl__outside {\n position: absolute;\n top: 12px;\n max-width: 200px;\n font-size: 12px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-secondary);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.g9-tl__milestone {\n position: absolute;\n width: 16px;\n height: 16px;\n transform: rotate(45deg);\n background-color: var(--g9-primary);\n}\n\n.g9-tl__link {\n position: absolute;\n background-color: var(--g9-text-tertiary);\n}\n\n.g9-tl__today {\n position: absolute;\n top: 0px;\n bottom: 0px;\n width: 2px;\n background-color: var(--g9-error);\n}\n\n/* rule builder */\n.g9-rule {\n display: flex;\n flex-direction: column;\n row-gap: 16px;\n}\n\n.g9-rule__steps {\n display: flex;\n flex-direction: column;\n row-gap: 16px;\n}\n\n.g9-rule__steps--columns {\n align-items: flex-start;\n column-gap: 16px;\n}\n\n.g9-rule__step {\n display: flex;\n flex-direction: column;\n row-gap: 10px;\n padding: 14px;\n border-radius: 14px;\n background-color: var(--g9-surface-container);\n}\n\n.g9-rule__step--column {\n flex: 1;\n min-width: 0px;\n}\n\n.g9-rule__head {\n display: flex;\n align-items: center;\n column-gap: 10px;\n}\n\n.g9-rule__badge {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border-radius: 12px;\n background-color: var(--g9-primary);\n}\n\n.g9-rule__badge-text {\n font-size: 12px;\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n color: var(--g9-on-primary);\n}\n\n.g9-rule__head-texts {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0px;\n}\n\n.g9-rule__title {\n font-size: 15px;\n font-weight: 600;\n font-family: var(--g9-font-text-600);\n color: var(--g9-text-primary);\n}\n\n.g9-rule__hint {\n font-size: 12px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-secondary);\n}\n\n.g9-rule__items {\n display: flex;\n flex-direction: column;\n row-gap: 8px;\n}\n\n.g9-rule__item {\n padding: 8px;\n border-radius: 10px;\n background-color: var(--g9-surface);\n}\n\n.g9-rule__item-row {\n display: flex;\n align-items: flex-start;\n column-gap: 4px;\n}\n\n.g9-rule__item-body {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0px;\n}\n\n.g9-rule__tools {\n display: flex;\n flex-direction: row;\n}\n\n.g9-rule__none {\n font-size: 13px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-secondary);\n}\n\n.g9-rule__problem {\n margin-top: 4px;\n font-size: 12px;\n font-family: var(--g9-font-text);\n color: var(--g9-error);\n}\n\n.g9-rule__footer {\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n column-gap: 8px;\n}\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack://./src/projects.css"],"names":[],"mappings":"AAGA;EAFE,mBAAmB;EACnB,iBAAiB;EACjB,uCAAuC;EACvC,mCAAmC;EACnC,mBAAmB;EACnB,sBAAsB;EACtB,YAAY;EACZ,aAAa;EACb,aAAa;EACb,gBAAgB;AAClB;;AAKA;EAFE,WAAW;AACb;;AAKA;EAFE,UAAU;EACV,kBAAkB;EAClB,MAAM;EACN,SAAS;AACX;;AAKA;EAFE,YAAY;EACZ,qBAAqB;AACvB;;AAKA;EAFE,mBAAmB;EACnB,eAAe;EACf,aAAa;AACf;;AAKA;EAFE,eAAe;EACf,gBAAgB;EAChB,oCAAoC;EACpC,8BAA8B;EAC9B,cAAc;AAChB;;AAKA;EAFE,2BAA2B;EAC3B,kBAAkB;EAClB,mBAAmB;EACnB,cAAc;EACd,aAAa;AACf;;AAKA;EAFE,eAAe;EACf,gBAAgB;EAChB,oCAAoC;EACpC,wBAAwB;AAC1B;;AAKA;EAFE,OAAO;AACT;;AAKA;EAFE,eAAe;EACf,oCAAoC;EACpC,gBAAgB;AAClB;;AAKA;EAFE,eAAe;EACf,gBAAgB;EAChB,oCAAoC;EACpC,6BAA6B;EAC7B,uBAAuB;EACvB,gBAAgB;AAClB;;AAKA;EAFE,8BAA8B;EAC9B,6BAA6B;AAC/B;;AAKA;EAFE,eAAe;EACf,QAAQ;EACR,aAAa;AACf;;AAMA;EAHE,6CAA6C;EAC7C,kBAAkB;EAClB,gBAAgB;EAChB,cAAc;AAChB;;AAMA;EAHE,eAAe;EACf,gCAAgC;EAChC,qCAAqC;EACrC,uBAAuB;EACvB,gBAAgB;AAClB;;AAMA;EAHE,mBAAmB;EACnB,eAAe;EACf,gBAAgB;EAChB,aAAa;AACf;;AAMA;EAHE,eAAe;EACf,gBAAgB;EAChB,oCAAoC;AACtC;;AAMA;EAHE,eAAe;EACf,gCAAgC;EAChC,8BAA8B;AAChC;;AAM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BAAsB;EACtB,YAAY;EACZ,aAAa;AACf;;AAiBA;EAdE,mCAAmC;EACnC,mBAAmB;EACnB,YAAY;AACd;;AAiBA;EAdE,uBAAuB;EACvB,eAAe;EACf,aAAa;AACf;;AAiBA;EAdE,sBAAsB;EACtB,OAAO;EACP,YAAY;EACZ,aAAa;AACf;;AAiBA;EAdE,mBAAmB;EACnB,aAAa;AACf;;AAiBA;EAdE,eAAe;EACf,gCAAgC;EAChC,+BAA+B;AACjC;;AAiBA;EAdE,eAAe;EACf,gCAAgC;EAChC,sBAAsB;EACtB,eAAe;AACjB;;AAiBA;EAdE,mBAAmB;EACnB,yBAAyB;EACzB,eAAe;EACf,aAAa;AACf;;AAkBA;EAfE,mBAAmB;EACnB,eAAe;EACf,kBAAkB;EAClB,aAAa;AACf;;AAkBA;EAfE,eAAe;EACf,gBAAgB;EAChB,oCAAoC;EACpC,+BAA+B;AACjC;;AAmBA;EAhBE,mBAAmB;EACnB,eAAe;EACf,WAAW;EACX,aAAa;AACf;;AAmBA;EAhBE,eAAe;EACf,gCAAgC;EAChC,8BAA8B;AAChC;;AAmBA;EAhBE,sBAAsB;AACxB;;AAmBA;EAhBE,eAAe;EACf,gCAAgC;EAChC,8BAA8B;AAChC;;AAmBA;EAhBE,eAAe;EACf,gBAAgB;EAChB,oCAAoC;EACpC,+BAA+B;EAC/B,mBAAmB;EACnB,aAAa;EACb,kBAAkB;EAClB,MAAM;EACN,SAAS;AACX","sourcesContent":["/* The projects controls (2.5.8, G9Hub item 47). Single-class rules; every text that may truncate clips. */\n\n/* task card */\n.g9-task {\n display: flex;\n flex-direction: column;\n row-gap: 6px;\n padding: 10px;\n border-radius: 12px;\n border-width: 1px;\n border-style: solid;\n border-color: var(--g9-outline-variant);\n background-color: var(--g9-surface);\n overflow: hidden;\n}\n\n.g9-task--dragging {\n opacity: 0.4;\n}\n\n.g9-task__stripe {\n position: absolute;\n top: 0px;\n bottom: 0px;\n width: 3px;\n}\n\n.g9-task__cover {\n height: 96px;\n margin: -10px -10px 0px -10px;\n}\n\n.g9-task__top {\n display: flex;\n align-items: center;\n column-gap: 4px;\n}\n\n.g9-task__code {\n font-size: 11px;\n font-weight: 600;\n font-family: var(--g9-font-text-600);\n color: var(--g9-text-tertiary);\n direction: ltr;\n}\n\n.g9-task__blocked {\n display: flex;\n align-items: center;\n padding: 0px 4px;\n border-radius: 6px;\n background-color: rgba(245, 159, 0, 0.15);\n}\n\n.g9-task__blocked-text {\n font-size: 11px;\n font-weight: 600;\n font-family: var(--g9-font-text-600);\n color: var(--g9-warning);\n}\n\n.g9-task__spacer {\n flex: 1;\n}\n\n.g9-task__priority {\n font-size: 14px;\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n}\n\n.g9-task__title {\n font-size: 14px;\n font-weight: 500;\n font-family: var(--g9-font-text-500);\n color: var(--g9-text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.g9-task__title--done {\n color: var(--g9-text-tertiary);\n text-decoration: line-through;\n}\n\n.g9-task__labels {\n display: flex;\n flex-wrap: wrap;\n column-gap: 4px;\n row-gap: 4px;\n}\n\n.g9-task__label {\n max-width: 120px;\n padding: 0px 6px;\n border-radius: 6px;\n background-color: var(--g9-primary-container);\n}\n\n.g9-task__label-text {\n font-size: 11px;\n font-family: var(--g9-font-text);\n color: var(--g9-on-primary-container);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.g9-task__bottom {\n display: flex;\n align-items: center;\n column-gap: 8px;\n min-height: 20px;\n}\n\n.g9-task__due {\n font-size: 11px;\n font-weight: 500;\n font-family: var(--g9-font-text-500);\n}\n\n.g9-task__check {\n font-size: 11px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-tertiary);\n}\n\n.g9-task__check--done {\n color: var(--g9-success);\n}\n\n.g9-task__people {\n display: flex;\n align-items: center;\n column-gap: 2px;\n}\n\n.g9-task__more {\n font-size: 11px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-tertiary);\n}\n\n/* board */\n.g9-board {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0px;\n}\n\n.g9-board__scroller {\n flex: 1;\n}\n\n.g9-board__columns {\n display: flex;\n align-items: flex-start;\n padding: 12px;\n}\n\n.g9-board__column {\n display: flex;\n flex-direction: column;\n border-radius: 14px;\n background-color: var(--g9-surface-container);\n}\n\n.g9-board__column--target {\n background-color: var(--g9-surface-container-high);\n}\n\n.g9-board__head {\n display: flex;\n align-items: center;\n column-gap: 6px;\n height: 44px;\n padding: 0px 12px;\n}\n\n.g9-board__dot {\n width: 8px;\n height: 8px;\n border-radius: 4px;\n}\n\n.g9-board__title {\n flex: 1;\n min-width: 0px;\n font-size: 14px;\n font-weight: 600;\n font-family: var(--g9-font-text-600);\n color: var(--g9-text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.g9-board__count {\n font-size: 12px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-tertiary);\n}\n\n.g9-board__count--over {\n color: var(--g9-warning);\n}\n\n.g9-board__cards {\n max-height: 640px;\n padding: 0px 8px;\n}\n\n.g9-board__card {\n margin-bottom: 8px;\n}\n\n.g9-board__slot {\n height: 4px;\n margin: 2px 4px 10px 4px;\n border-radius: 2px;\n background-color: var(--g9-primary);\n}\n\n.g9-board__empty {\n padding: 12px 4px;\n font-size: 12px;\n font-family: var(--g9-font-text);\n text-align: center;\n color: var(--g9-text-tertiary);\n}\n\n.g9-board__add {\n padding: 10px 12px;\n}\n\n.g9-board__add-text {\n font-size: 13px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-secondary);\n}\n\n.g9-board__add-form {\n display: flex;\n flex-direction: column;\n row-gap: 6px;\n padding: 8px;\n}\n\n.g9-board__add-actions {\n display: flex;\n justify-content: flex-end;\n column-gap: 6px;\n}\n\n.g9-board__ghost {\n position: absolute;\n top: 0px;\n left: 0px;\n opacity: 0.92;\n pointer-events: none;\n}\n\n/* timeline */\n.g9-tl {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0px;\n}\n\n.g9-tl__zoom {\n display: flex;\n flex-direction: column;\n padding: 8px 12px;\n}\n\n.g9-tl__vscroll {\n flex: 1;\n}\n\n.g9-tl__frame {\n display: flex;\n}\n\n.g9-tl__labels {\n display: flex;\n flex-direction: column;\n border-right-width: 1px;\n border-right-style: solid;\n border-right-color: var(--g9-outline-variant);\n}\n\n.g9-tl__label {\n display: flex;\n align-items: center;\n padding: 0px 10px;\n}\n\n.g9-tl__label--group {\n background-color: var(--g9-surface-container);\n}\n\n.g9-tl__label-text {\n flex: 1;\n min-width: 0px;\n font-size: 13px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.g9-tl__label-text--done {\n color: var(--g9-text-tertiary);\n text-decoration: line-through;\n}\n\n.g9-tl__chart {\n flex: 1;\n}\n\n.g9-tl__canvas {\n display: flex;\n flex-direction: column;\n}\n\n.g9-tl__head {\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: var(--g9-outline-variant);\n}\n\n.g9-tl__month {\n position: absolute;\n top: 0px;\n height: 26px;\n padding: 4px 6px;\n border-left-width: 1px;\n border-left-style: solid;\n border-left-color: var(--g9-outline-variant);\n}\n\n.g9-tl__month-text {\n font-size: 12px;\n font-weight: 600;\n font-family: var(--g9-font-text-600);\n color: var(--g9-text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.g9-tl__week {\n position: absolute;\n top: 26px;\n height: 26px;\n padding: 4px;\n}\n\n.g9-tl__week-text {\n font-size: 11px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-tertiary);\n}\n\n.g9-tl__body {\n position: relative;\n}\n\n.g9-tl__weekend {\n position: absolute;\n top: 0px;\n bottom: 0px;\n background-color: rgba(127, 127, 127, 0.08);\n}\n\n.g9-tl__row {\n position: absolute;\n left: 0px;\n right: 0px;\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: rgba(127, 127, 127, 0.12);\n}\n\n.g9-tl__row--group {\n background-color: var(--g9-surface-container);\n}\n\n.g9-tl__bar {\n position: absolute;\n top: 8px;\n height: 24px;\n display: flex;\n align-items: center;\n padding: 0px 8px;\n border-radius: 6px;\n overflow: hidden;\n}\n\n.g9-tl__bar--done {\n opacity: 0.5;\n}\n\n.g9-tl__bar--blocked {\n border-width: 2px;\n border-style: solid;\n border-color: var(--g9-warning);\n}\n\n.g9-tl__bar--focused {\n border-width: 2px;\n border-style: solid;\n border-color: var(--g9-text-primary);\n}\n\n.g9-tl__progress {\n position: absolute;\n top: 0px;\n bottom: 0px;\n background-color: rgba(0, 0, 0, 0.18);\n}\n\n.g9-tl__bar-text {\n flex: 1;\n min-width: 0px;\n font-size: 12px;\n font-family: var(--g9-font-text);\n color: #ffffff;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.g9-tl__handle {\n position: absolute;\n top: 0px;\n bottom: 0px;\n width: 12px;\n}\n\n.g9-tl__outside {\n position: absolute;\n top: 12px;\n max-width: 200px;\n font-size: 12px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-secondary);\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.g9-tl__milestone {\n position: absolute;\n width: 16px;\n height: 16px;\n transform: rotate(45deg);\n background-color: var(--g9-primary);\n}\n\n.g9-tl__link {\n position: absolute;\n background-color: var(--g9-text-tertiary);\n}\n\n.g9-tl__today {\n position: absolute;\n top: 0px;\n bottom: 0px;\n width: 2px;\n background-color: var(--g9-error);\n}\n\n/* rule builder */\n.g9-rule {\n display: flex;\n flex-direction: column;\n row-gap: 16px;\n}\n\n.g9-rule__steps {\n display: flex;\n flex-direction: column;\n row-gap: 16px;\n}\n\n.g9-rule__steps--columns {\n align-items: flex-start;\n column-gap: 16px;\n}\n\n.g9-rule__step {\n display: flex;\n flex-direction: column;\n row-gap: 10px;\n padding: 14px;\n border-radius: 14px;\n background-color: var(--g9-surface-container);\n}\n\n.g9-rule__step--column {\n flex: 1;\n min-width: 0px;\n}\n\n.g9-rule__head {\n display: flex;\n align-items: center;\n column-gap: 10px;\n}\n\n.g9-rule__badge {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border-radius: 12px;\n background-color: var(--g9-primary);\n}\n\n.g9-rule__badge-text {\n font-size: 12px;\n font-family: var(--g9-font-text-700);\n font-weight: 700;\n color: var(--g9-on-primary);\n}\n\n.g9-rule__head-texts {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0px;\n}\n\n.g9-rule__title {\n font-size: 15px;\n font-weight: 600;\n font-family: var(--g9-font-text-600);\n color: var(--g9-text-primary);\n}\n\n.g9-rule__hint {\n font-size: 12px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-secondary);\n}\n\n.g9-rule__items {\n display: flex;\n flex-direction: column;\n row-gap: 8px;\n}\n\n.g9-rule__item {\n padding: 8px;\n border-radius: 10px;\n background-color: var(--g9-surface);\n}\n\n.g9-rule__item-row {\n display: flex;\n align-items: flex-start;\n column-gap: 4px;\n}\n\n.g9-rule__item-body {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0px;\n}\n\n.g9-rule__tools {\n display: flex;\n flex-direction: row;\n}\n\n.g9-rule__none {\n font-size: 13px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-secondary);\n}\n\n.g9-rule__problem {\n margin-top: 4px;\n font-size: 12px;\n font-family: var(--g9-font-text);\n color: var(--g9-error);\n}\n\n.g9-rule__footer {\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n column-gap: 8px;\n}\n\n/* A rule item's head: its kind's icon and label (2.5.10). */\n.g9-rule__item-head {\n display: flex;\n align-items: center;\n column-gap: 6px;\n margin-bottom: 6px;\n}\n\n.g9-rule__item-kind {\n font-size: 12px;\n font-weight: 600;\n font-family: var(--g9-font-text-600);\n color: var(--g9-text-secondary);\n}\n\n/* The titles column's code, assignee and meta; a group's label in the chart (2.5.10). */\n.g9-tl__label-row {\n display: flex;\n align-items: center;\n column-gap: 6px;\n width: 100%;\n}\n\n.g9-tl__code {\n font-size: 11px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-tertiary);\n}\n\n.g9-tl__code-mono {\n font-family: monospace;\n}\n\n.g9-tl__meta {\n font-size: 11px;\n font-family: var(--g9-font-text);\n color: var(--g9-text-tertiary);\n}\n\n.g9-tl__group-text {\n position: absolute;\n top: 0px;\n bottom: 0px;\n display: flex;\n align-items: center;\n font-size: 12px;\n font-weight: 600;\n font-family: var(--g9-font-text-600);\n color: var(--g9-text-secondary);\n}\n"],"sourceRoot":""}
|
package/dist/rule-builder.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type G9IconInput } from '@g9tm/lynxcontrols/icon';
|
|
1
2
|
import { type ReactNode } from '@lynx-js/react';
|
|
2
3
|
import './projects.css';
|
|
3
4
|
/** A kind of trigger, condition or action. */
|
|
@@ -5,6 +6,8 @@ export interface G9RuleKind {
|
|
|
5
6
|
readonly key: string;
|
|
6
7
|
readonly label: string;
|
|
7
8
|
readonly description?: string;
|
|
9
|
+
/** Its icon: in the menus, on the trigger button and on each item's head (2.5.10). */
|
|
10
|
+
readonly icon?: G9IconInput;
|
|
8
11
|
}
|
|
9
12
|
/** The builder's words (the app's language). */
|
|
10
13
|
export interface G9RuleBuilderLabels {
|
|
@@ -54,6 +57,9 @@ export interface G9RuleBuilderProps<C, A> {
|
|
|
54
57
|
readonly layout?: 'auto' | 'columns' | 'stack';
|
|
55
58
|
/** Under the steps (preview, run, save). */
|
|
56
59
|
readonly footer?: ReactNode;
|
|
60
|
+
/** An item's kind (2.5.10): its icon and label head the item (`conditionKinds` / `actionKinds`). */
|
|
61
|
+
readonly conditionKindOf?: (item: C) => string;
|
|
62
|
+
readonly actionKindOf?: (item: A) => string;
|
|
57
63
|
}
|
|
58
64
|
/** An automation rule: When → If → Then, each step's editor the app's. */
|
|
59
65
|
export declare function G9RuleBuilder<C, A>(props: G9RuleBuilderProps<C, A>): ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rule-builder.d.ts","sourceRoot":"","sources":["../src/rule-builder.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rule-builder.d.ts","sourceRoot":"","sources":["../src/rule-builder.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAInE,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,gBAAgB,CAAC;AAC1D,OAAO,gBAAgB,CAAC;AAExB,8CAA8C;AAC9C,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,sFAAsF;IACtF,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;CAC7B;AAED,gDAAgD;AAChD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,8CAA8C;IAC9C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,M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IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IAC7D,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC1G,uBAAuB;IACvB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,oDAAoD;IACpD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IAC/C,4CAA4C;IAC5C,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;IAC5B,oGAAoG;IACpG,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAC/C,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;CAC7C;AAkCD,0EAA0E;AAC1E,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,SAAS,CAoL9E"}
|
package/dist/rule-builder.jsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { g9IdProps } from "@g9tm/lynxcontrols/base";
|
|
2
2
|
import { G9Button, G9IconButton } from "@g9tm/lynxcontrols/button";
|
|
3
|
+
import { G9Icon } from "@g9tm/lynxcontrols/icon";
|
|
3
4
|
import { G9Menu } from "@g9tm/lynxcontrols/popover";
|
|
4
5
|
import { useG9Culture, useG9Direction, useG9Layout } from "@g9tm/lynxcontrols/provider";
|
|
5
6
|
import { toNativeDigits } from "@g9tm/lynxcontrols-foundation";
|
|
@@ -49,6 +50,9 @@ function G9RuleBuilder(props) {
|
|
|
49
50
|
...k.description ? {
|
|
50
51
|
description: k.description
|
|
51
52
|
} : {},
|
|
53
|
+
...k.icon ? {
|
|
54
|
+
icon: k.icon
|
|
55
|
+
} : {},
|
|
52
56
|
...void 0 !== checked ? {
|
|
53
57
|
checked: k.key === checked
|
|
54
58
|
} : {}
|
|
@@ -60,6 +64,16 @@ function G9RuleBuilder(props) {
|
|
|
60
64
|
{p}
|
|
61
65
|
</text> : null;
|
|
62
66
|
};
|
|
67
|
+
const head = (kinds, kind)=>{
|
|
68
|
+
const k = void 0 === kind ? void 0 : kinds.find((x)=>x.key === kind);
|
|
69
|
+
return k ? <view className="g9-rule__item-head" style={{
|
|
70
|
+
flexDirection: rtl ? 'row-reverse' : 'row',
|
|
71
|
+
direction: 'ltr'
|
|
72
|
+
}}>
|
|
73
|
+
{k.icon ? <G9Icon icon={k.icon} size={14} color="var(--g9-primary)"/> : null}
|
|
74
|
+
<text className="g9-rule__item-kind">{k.label}</text>
|
|
75
|
+
</view> : null;
|
|
76
|
+
};
|
|
63
77
|
const item = (content, key, extra)=><view key={key} className="g9-rule__item">
|
|
64
78
|
<view className="g9-rule__item-row" style={{
|
|
65
79
|
flexDirection: rtl ? 'row-reverse' : 'row',
|
|
@@ -81,7 +95,12 @@ function G9RuleBuilder(props) {
|
|
|
81
95
|
<Step n={1} title={L.when} hint={L.whenHint} columns={columns} rtl={rtl} digits={digits}>
|
|
82
96
|
<G9Button {...id('Trigger') ? {
|
|
83
97
|
id: id('Trigger')
|
|
84
|
-
} : {}} text={null != (_ref = null == trigger ? void 0 : trigger.label) ? _ref : labels.chooseTrigger} variant={trigger ? 'tonal' : 'outline'}
|
|
98
|
+
} : {}} text={null != (_ref = null == trigger ? void 0 : trigger.label) ? _ref : labels.chooseTrigger} variant={trigger ? 'tonal' : 'outline'} {...(null == trigger ? void 0 : trigger.icon) ? {
|
|
99
|
+
leadingIcon: trigger.icon
|
|
100
|
+
} : {}} onPress={()=>setMenu('trigger')}/>
|
|
101
|
+
{(null == trigger ? void 0 : trigger.description) ? <text className="g9-rule__hint" style={align}>
|
|
102
|
+
{trigger.description}
|
|
103
|
+
</text> : null}
|
|
85
104
|
{props.trigger && props.renderTrigger ? props.renderTrigger(props.trigger) : null}
|
|
86
105
|
{problem('trigger', 0)}
|
|
87
106
|
</Step>
|
|
@@ -90,6 +109,7 @@ function G9RuleBuilder(props) {
|
|
|
90
109
|
{L.noConditions}
|
|
91
110
|
</text> : null}
|
|
92
111
|
{props.conditions.map((c, i)=>item(<>
|
|
112
|
+
{props.conditionKindOf ? head(props.conditionKinds, props.conditionKindOf(c)) : null}
|
|
93
113
|
{props.renderCondition(c, i)}
|
|
94
114
|
{problem('condition', i)}
|
|
95
115
|
</>, `c${i}`, <G9IconButton {...id(`Condition${i}_Remove`) ? {
|
|
@@ -104,19 +124,20 @@ function G9RuleBuilder(props) {
|
|
|
104
124
|
{L.noActions}
|
|
105
125
|
</text> : null}
|
|
106
126
|
{props.actions.map((a, i)=>item(<>
|
|
127
|
+
{props.actionKindOf ? head(props.actionKinds, props.actionKindOf(a)) : null}
|
|
107
128
|
{props.renderAction(a, i)}
|
|
108
129
|
{problem('action', i)}
|
|
109
130
|
</>, `a${i}`, <view className="g9-rule__tools">
|
|
110
131
|
{props.onMoveAction && props.actions.length > 1 ? <>
|
|
111
132
|
<G9IconButton {...id(`Action${i}_Up`) ? {
|
|
112
133
|
id: id(`Action${i}_Up`)
|
|
113
|
-
} : {}}
|
|
134
|
+
} : {}} icon="chevronUp" isGhost disabled={0 === i} accessibilityText={L.moveUp} onPress={()=>{
|
|
114
135
|
var _props_onMoveAction;
|
|
115
136
|
return null == (_props_onMoveAction = props.onMoveAction) ? void 0 : _props_onMoveAction.call(props, i, i - 1);
|
|
116
137
|
}}/>
|
|
117
138
|
<G9IconButton {...id(`Action${i}_Down`) ? {
|
|
118
139
|
id: id(`Action${i}_Down`)
|
|
119
|
-
} : {}}
|
|
140
|
+
} : {}} icon="chevronDown" isGhost disabled={i === props.actions.length - 1} accessibilityText={L.moveDown} onPress={()=>{
|
|
120
141
|
var _props_onMoveAction;
|
|
121
142
|
return null == (_props_onMoveAction = props.onMoveAction) ? void 0 : _props_onMoveAction.call(props, i, i + 1);
|
|
122
143
|
}}/>
|