@bizdoc/core 1.13.0-next.11 → 1.13.0-next.15
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/esm2020/lib/compose/trace/flow.component.mjs +47 -63
- package/esm2020/lib/compose/trace/trace.component.mjs +4 -5
- package/esm2020/lib/core/models.mjs +1 -1
- package/esm2020/lib/core/translations.mjs +2 -2
- package/fesm2015/bizdoc-core.mjs +50 -67
- package/fesm2015/bizdoc-core.mjs.map +1 -1
- package/fesm2020/bizdoc-core.mjs +50 -67
- package/fesm2020/bizdoc-core.mjs.map +1 -1
- package/lib/core/models.d.ts +0 -1
- package/package.json +1 -1
package/fesm2015/bizdoc-core.mjs
CHANGED
@@ -2074,7 +2074,7 @@ const STRINGS = {
|
|
2074
2074
|
ReceivedTime: 'Received {0}',
|
2075
2075
|
ReceivedBy: 'Received by {0} {1}',
|
2076
2076
|
ActionTakenBy: '{0} {1} this document on behalf of {2} {3}',
|
2077
|
-
ActionTakenByTo: '{0} {1} this document
|
2077
|
+
ActionTakenByTo: '{0} {1} this document on behalf of {3} to {2} {4}',
|
2078
2078
|
YouTakenActionBy: '{0} {1} this document on your behalf {2}',
|
2079
2079
|
YouTakenActionByTo: '{0} {1} this document to {2} on your behalf {3}',
|
2080
2080
|
ActionTakenByYou: 'You {0} this document on behalf of {1} {2}',
|
@@ -13445,14 +13445,7 @@ class FlowViewComponent extends TraceBase {
|
|
13445
13445
|
_prepare() {
|
13446
13446
|
return __awaiter(this, void 0, void 0, function* () {
|
13447
13447
|
const { connectors: dconnectors, nodes: dnodes } = this.model.workflow;
|
13448
|
-
const indicators = [], connectors =
|
13449
|
-
sourceID: c.sourceId,
|
13450
|
-
targetID: c.targetId,
|
13451
|
-
addInfo: {
|
13452
|
-
estimate: c.estimate,
|
13453
|
-
time: c.time
|
13454
|
-
}
|
13455
|
-
})), nodes = [];
|
13448
|
+
const indicators = [], connectors = [], nodes = [];
|
13456
13449
|
let zIndex = 500;
|
13457
13450
|
for (let node of dnodes) {
|
13458
13451
|
if (nodes.find(n => n.id == node.id))
|
@@ -13507,29 +13500,6 @@ class FlowViewComponent extends TraceBase {
|
|
13507
13500
|
}
|
13508
13501
|
}]
|
13509
13502
|
};
|
13510
|
-
r > 0 &&
|
13511
|
-
// more than one recipient to node,
|
13512
|
-
dconnectors.forEach(c => {
|
13513
|
-
if (c.targetId === node.id)
|
13514
|
-
// add inbound connectors
|
13515
|
-
connectors.push({
|
13516
|
-
sourceID: c.sourceId,
|
13517
|
-
targetID: nod.id,
|
13518
|
-
addInfo: {
|
13519
|
-
estimate: c.estimate
|
13520
|
-
}
|
13521
|
-
});
|
13522
|
-
if (c.sourceId === node.id &&
|
13523
|
-
// add outbound no origin or originated by the recipient
|
13524
|
-
(!c.originId || c.originId === recipient.id))
|
13525
|
-
connectors.push({
|
13526
|
-
sourceID: nod.id,
|
13527
|
-
targetID: c.targetId,
|
13528
|
-
addInfo: {
|
13529
|
-
estimate: c.estimate
|
13530
|
-
}
|
13531
|
-
});
|
13532
|
-
});
|
13533
13503
|
nodes.push(nod);
|
13534
13504
|
// add action indicator
|
13535
13505
|
if (recipient.action) {
|
@@ -13612,9 +13582,7 @@ class FlowViewComponent extends TraceBase {
|
|
13612
13582
|
offset: shape.type === 'Path' ? {
|
13613
13583
|
y: 1
|
13614
13584
|
} : { x: .5 },
|
13615
|
-
style: {
|
13616
|
-
//bold: true
|
13617
|
-
},
|
13585
|
+
style: {},
|
13618
13586
|
verticalAlignment: shape.type === 'Path' ? 'Top' : 'Center'
|
13619
13587
|
}]
|
13620
13588
|
});
|
@@ -13655,6 +13623,23 @@ class FlowViewComponent extends TraceBase {
|
|
13655
13623
|
}
|
13656
13624
|
}
|
13657
13625
|
}
|
13626
|
+
for (let connector of dconnectors) {
|
13627
|
+
let sources = nodes.filter(n => n.addInfo.node.id === connector.sourceId), targets = nodes.filter(n => n.addInfo.node.id === connector.targetId);
|
13628
|
+
for (let source of sources) {
|
13629
|
+
for (let target of targets) {
|
13630
|
+
if (!connector.originId || !source.addInfo.recipient ||
|
13631
|
+
connector.originId === source.addInfo.recipient.id)
|
13632
|
+
connectors.push({
|
13633
|
+
sourceID: source.id,
|
13634
|
+
targetID: target.id,
|
13635
|
+
addInfo: {
|
13636
|
+
estimate: connector.estimate,
|
13637
|
+
time: connector.time
|
13638
|
+
}
|
13639
|
+
});
|
13640
|
+
}
|
13641
|
+
}
|
13642
|
+
}
|
13658
13643
|
return { connectors, nodes, indicators };
|
13659
13644
|
});
|
13660
13645
|
}
|
@@ -13776,17 +13761,21 @@ class FlowViewComponent extends TraceBase {
|
|
13776
13761
|
}
|
13777
13762
|
if (recipient.replied) {
|
13778
13763
|
const time = this._fromNow(recipient.replied);
|
13764
|
+
const targets = this.model.recipients.filter(r => r.originId === recipient.id), to = [];
|
13765
|
+
if (targets.length)
|
13766
|
+
for (let sibling of targets) {
|
13767
|
+
const who = yield this._accounts.get(sibling.userId).toPromise();
|
13768
|
+
to.push(who.name);
|
13769
|
+
}
|
13779
13770
|
if (recipient.byId) {
|
13780
13771
|
if (recipient.byId === this._session.profile.byId) {
|
13781
13772
|
const action = this._action(recipient.action, this._session.profile.byGender);
|
13782
|
-
if (
|
13783
|
-
const origin = this.model.recipients.find(r => r.id === recipient.originId);
|
13784
|
-
const to = yield this._accounts.get(origin.userId).toPromise();
|
13773
|
+
if (to.length) {
|
13785
13774
|
if (recipient.userId === this._session.profile.userId)
|
13786
|
-
tooltip.note = this._translate.get('ActionTakenByYouTo', action, to
|
13775
|
+
tooltip.note = this._translate.get('ActionTakenByYouTo', action, this._translate.join(to), this._session.profile.name, time);
|
13787
13776
|
else {
|
13788
13777
|
const who = yield this._accounts.get(recipient.userId).toPromise();
|
13789
|
-
tooltip.note = this._translate.get('ActionTakenByYouTo', action, to
|
13778
|
+
tooltip.note = this._translate.get('ActionTakenByYouTo', action, this._translate.join(to), who.name, time);
|
13790
13779
|
}
|
13791
13780
|
}
|
13792
13781
|
else if (recipient.userId === this._session.profile.userId)
|
@@ -13800,40 +13789,34 @@ class FlowViewComponent extends TraceBase {
|
|
13800
13789
|
const by = yield this._accounts.get(recipient.byId).toPromise();
|
13801
13790
|
const action = this._action(recipient.action, by.gender);
|
13802
13791
|
if (recipient.userId === this._session.profile.userId) {
|
13803
|
-
if (
|
13804
|
-
|
13805
|
-
const to = yield this._accounts.get(origin.userId).toPromise();
|
13806
|
-
tooltip.note = this._translate.get('YouTakenActionByTo', by.name, action, to.name, time);
|
13792
|
+
if (to.length) {
|
13793
|
+
tooltip.note = this._translate.get('YouTakenActionByTo', by.name, action, this._translate.join(to), time);
|
13807
13794
|
}
|
13808
13795
|
else
|
13809
13796
|
tooltip.note = this._translate.get('YouTakenActionBy', by.name, action, time);
|
13810
13797
|
}
|
13811
13798
|
else {
|
13812
13799
|
const who = yield this._accounts.get(recipient.userId).toPromise();
|
13813
|
-
if (
|
13814
|
-
|
13815
|
-
const to = yield this._accounts.get(origin.userId).toPromise();
|
13816
|
-
tooltip.note = this._translate.get('ActionTakenByTo', by.name, action, to.name, who.name, time);
|
13800
|
+
if (to.length) {
|
13801
|
+
tooltip.note = this._translate.get('ActionTakenByTo', by.name, action, this._translate.join(to), who.name, time);
|
13817
13802
|
}
|
13818
13803
|
else
|
13819
13804
|
tooltip.note = this._translate.get('ActionTakenBy', by.name, action, who.name, time);
|
13820
13805
|
}
|
13821
13806
|
}
|
13822
13807
|
}
|
13823
|
-
else if (
|
13824
|
-
const origin = this.model.recipients.find(r => r.id === recipient.originId);
|
13825
|
-
const to = yield this._accounts.get(origin.userId).toPromise();
|
13808
|
+
else if (to.length) {
|
13826
13809
|
if (recipient.userId === this._session.profile.userId) {
|
13827
13810
|
const action = this._action(recipient.action, this._session.profile.gender);
|
13828
13811
|
if (this._session.isImpersonating)
|
13829
|
-
tooltip.note = this._translate.get('ActionTakenTo', this._session.profile.name, action, to
|
13812
|
+
tooltip.note = this._translate.get('ActionTakenTo', this._session.profile.name, action, this._translate.join(to), time);
|
13830
13813
|
else
|
13831
|
-
tooltip.note = this._translate.get('YouTakenActionTo', action, to
|
13814
|
+
tooltip.note = this._translate.get('YouTakenActionTo', action, this._translate.join(to), time);
|
13832
13815
|
}
|
13833
13816
|
else {
|
13834
13817
|
const who = yield this._accounts.get(recipient.userId).toPromise();
|
13835
13818
|
const action = this._action(recipient.action, who.gender);
|
13836
|
-
tooltip.note = this._translate.get('ActionTakenTo', who.name, action, to
|
13819
|
+
tooltip.note = this._translate.get('ActionTakenTo', who.name, action, this._translate.join(to));
|
13837
13820
|
}
|
13838
13821
|
}
|
13839
13822
|
else if (this._session.isImpersonating) {
|
@@ -13850,17 +13833,18 @@ class FlowViewComponent extends TraceBase {
|
|
13850
13833
|
tooltip.note = this._translate.get('ActionTaken', who.name, action, time);
|
13851
13834
|
}
|
13852
13835
|
}
|
13853
|
-
else if (!node.estimate) {
|
13854
|
-
const time = this._fromNow(recipient.received);
|
13855
|
-
if (this._session.isImpersonating)
|
13856
|
-
tooltip.note = this._translate.personalize('ReceivedBy', this._session.profile.gender, this._session.profile.name, time);
|
13857
|
-
else
|
13858
|
-
tooltip.note = this._translate.get('YouReceived', time);
|
13859
|
-
}
|
13860
13836
|
else if (!recipient.estimate) {
|
13861
|
-
const who = yield this._accounts.get(recipient.userId).toPromise();
|
13862
13837
|
const time = this._fromNow(recipient.received);
|
13863
|
-
|
13838
|
+
if (recipient.userId === this._session.userId) {
|
13839
|
+
if (this._session.isImpersonating)
|
13840
|
+
tooltip.note = this._translate.personalize('ReceivedBy', this._session.profile.gender, this._session.profile.name, time);
|
13841
|
+
else
|
13842
|
+
tooltip.note = this._translate.get('YouReceived', time);
|
13843
|
+
}
|
13844
|
+
else {
|
13845
|
+
const who = yield this._accounts.get(recipient.userId).toPromise();
|
13846
|
+
tooltip.note = this._translate.personalize('ReceivedTime', who.gender, time);
|
13847
|
+
}
|
13864
13848
|
}
|
13865
13849
|
if (recipient.substitutingId) {
|
13866
13850
|
if (recipient.substitutingId === this._session.userId)
|
@@ -14025,14 +14009,13 @@ class TraceViewComponent extends TraceBase {
|
|
14025
14009
|
if (to.length) {
|
14026
14010
|
const users = [];
|
14027
14011
|
for (let who of to) {
|
14028
|
-
let profile = yield
|
14012
|
+
let profile = yield profileOf(who.substitutingId || who.userId);
|
14029
14013
|
users.push(nameOf(profile));
|
14030
14014
|
}
|
14031
14015
|
return me._translate.get('ActionTo', name, me._translate.join(users));
|
14032
14016
|
}
|
14033
14017
|
}
|
14034
|
-
|
14035
|
-
return name;
|
14018
|
+
return name;
|
14036
14019
|
});
|
14037
14020
|
}
|
14038
14021
|
const trace = [];
|
@@ -14150,7 +14133,7 @@ class TraceViewComponent extends TraceBase {
|
|
14150
14133
|
}
|
14151
14134
|
}
|
14152
14135
|
for (let recipient of recipients) {
|
14153
|
-
if (!recipient.pending && !recipient.estimate)
|
14136
|
+
if (!recipient.pending && !recipient.estimate && !recipient.fyi)
|
14154
14137
|
continue;
|
14155
14138
|
let step = {
|
14156
14139
|
time: recipient.received,
|