@26lights/orcha 0.7.8 → 0.7.9
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/orcha.cjs.js +1 -1
- package/dist/orcha.es.js +42 -59
- package/dist/orcha.umd.js +1 -1
- package/dist/src/views/AoTemplateDetails.vue.d.ts +1 -1
- package/package.json +1 -1
package/dist/orcha.es.js
CHANGED
|
@@ -2450,7 +2450,7 @@ const k3 = /* @__PURE__ */ x({
|
|
|
2450
2450
|
DAYS: "days",
|
|
2451
2451
|
WEEKS: "weeks",
|
|
2452
2452
|
MONTHS: "months"
|
|
2453
|
-
},
|
|
2453
|
+
}, ce = {
|
|
2454
2454
|
TEMPLATES: "templates",
|
|
2455
2455
|
PHASES: "phases",
|
|
2456
2456
|
MILESTONES: "milestones",
|
|
@@ -2475,24 +2475,7 @@ const Fd = {
|
|
|
2475
2475
|
},
|
|
2476
2476
|
emits: ["addMilestone", "updateMilestone", "updatePhase", "removeMilestone"],
|
|
2477
2477
|
setup(s, { emit: e }) {
|
|
2478
|
-
const t = s
|
|
2479
|
-
v({
|
|
2480
|
-
get() {
|
|
2481
|
-
return [...t.phase.milestones || []].sort((p, c) => p.order - c.order);
|
|
2482
|
-
},
|
|
2483
|
-
set(l) {
|
|
2484
|
-
const p = l.map((c, h) => (c.order = h, c));
|
|
2485
|
-
e("updatePhase", {
|
|
2486
|
-
itemType: de.PHASES,
|
|
2487
|
-
id: t.phase.id,
|
|
2488
|
-
templateId: t.templateId,
|
|
2489
|
-
data: {
|
|
2490
|
-
milestones: p
|
|
2491
|
-
}
|
|
2492
|
-
});
|
|
2493
|
-
}
|
|
2494
|
-
});
|
|
2495
|
-
const n = () => {
|
|
2478
|
+
const t = s, n = () => {
|
|
2496
2479
|
e("addMilestone", { phaseId: t.phase.id });
|
|
2497
2480
|
}, a = (l) => {
|
|
2498
2481
|
e("removeMilestone", { phaseId: t.phase.id, id: l });
|
|
@@ -2501,8 +2484,8 @@ const Fd = {
|
|
|
2501
2484
|
}, i = (l) => {
|
|
2502
2485
|
if (l.moved) {
|
|
2503
2486
|
const p = R1(l, t.phase.milestones);
|
|
2504
|
-
e("
|
|
2505
|
-
itemType:
|
|
2487
|
+
e("updateMilestone", {
|
|
2488
|
+
itemType: ce.MILESTONES,
|
|
2506
2489
|
id: l.moved.element.id,
|
|
2507
2490
|
templateId: t.templateId,
|
|
2508
2491
|
data: {
|
|
@@ -2776,8 +2759,8 @@ function K3(s, e, t) {
|
|
|
2776
2759
|
let m = r1.value || /* istanbul ignore next */
|
|
2777
2760
|
[], T = [];
|
|
2778
2761
|
return m.forEach((Q) => {
|
|
2779
|
-
H1(Q[u.value]).forEach((
|
|
2780
|
-
T.push(Object.assign({},
|
|
2762
|
+
H1(Q[u.value]).forEach((de) => {
|
|
2763
|
+
T.push(Object.assign({}, de, Q[P.value] ? { [P.value]: !0 } : {}));
|
|
2781
2764
|
});
|
|
2782
2765
|
}), T;
|
|
2783
2766
|
} else {
|
|
@@ -2814,13 +2797,13 @@ function K3(s, e, t) {
|
|
|
2814
2797
|
let m = St.value;
|
|
2815
2798
|
return Nt((m || /* istanbul ignore next */
|
|
2816
2799
|
[]).map((T, Q) => {
|
|
2817
|
-
const
|
|
2800
|
+
const de = H1(T[u.value]);
|
|
2818
2801
|
return {
|
|
2819
2802
|
...T,
|
|
2820
2803
|
index: Q,
|
|
2821
2804
|
group: !0,
|
|
2822
|
-
[u.value]: E1(
|
|
2823
|
-
__VISIBLE__: E1(
|
|
2805
|
+
[u.value]: E1(de, !1).map((Qe) => Object.assign({}, Qe, T[P.value] ? { [P.value]: !0 } : {})),
|
|
2806
|
+
__VISIBLE__: E1(de).map((Qe) => Object.assign({}, Qe, T[P.value] ? { [P.value]: !0 } : {}))
|
|
2824
2807
|
};
|
|
2825
2808
|
}));
|
|
2826
2809
|
}), k1 = v(() => {
|
|
@@ -2954,26 +2937,26 @@ function K3(s, e, t) {
|
|
|
2954
2937
|
) : m.filter((T) => Z.value ? T.__VISIBLE__.length : !0), E1 = (m, T = !0) => {
|
|
2955
2938
|
let Q = m;
|
|
2956
2939
|
if (Z.value && j.value) {
|
|
2957
|
-
let
|
|
2958
|
-
|
|
2940
|
+
let de = re.value;
|
|
2941
|
+
de || (de = (Qe, Pd) => {
|
|
2959
2942
|
let tt = j1($t(Qe[Ae.value]), he.value);
|
|
2960
2943
|
return ae.value ? tt.startsWith(j1(Z.value, he.value)) : tt.indexOf(j1(Z.value, he.value)) !== -1;
|
|
2961
|
-
}), Q = Q.filter(
|
|
2944
|
+
}), Q = Q.filter(de);
|
|
2962
2945
|
}
|
|
2963
|
-
return l.value && T && (Q = Q.filter((
|
|
2946
|
+
return l.value && T && (Q = Q.filter((de) => !Pt(de))), Q;
|
|
2964
2947
|
}, H1 = (m) => {
|
|
2965
2948
|
let T = m;
|
|
2966
2949
|
return z3(T) && (T = Object.keys(T).map((Q) => {
|
|
2967
|
-
let
|
|
2968
|
-
return { [D.value]: Q, [Ae.value]:
|
|
2950
|
+
let de = T[Q];
|
|
2951
|
+
return { [D.value]: Q, [Ae.value]: de, [h.value]: de };
|
|
2969
2952
|
})), T = T.map((Q) => typeof Q == "object" ? Q : { [D.value]: Q, [Ae.value]: Q, [h.value]: Q }), T;
|
|
2970
2953
|
}, d1 = () => {
|
|
2971
2954
|
ke(M.value) || (U.value = u1(M.value));
|
|
2972
2955
|
}, c1 = (m) => (Me.value = !0, new Promise((T, Q) => {
|
|
2973
|
-
n.value(Z.value, ee).then((
|
|
2974
|
-
He.value =
|
|
2975
|
-
}).catch((
|
|
2976
|
-
console.error(
|
|
2956
|
+
n.value(Z.value, ee).then((de) => {
|
|
2957
|
+
He.value = de || [], typeof m == "function" && m(de), Me.value = !1;
|
|
2958
|
+
}).catch((de) => {
|
|
2959
|
+
console.error(de), He.value = [], Me.value = !1;
|
|
2977
2960
|
}).finally(() => {
|
|
2978
2961
|
T();
|
|
2979
2962
|
});
|
|
@@ -2989,8 +2972,8 @@ function K3(s, e, t) {
|
|
|
2989
2972
|
U.value.forEach((m, T) => {
|
|
2990
2973
|
let Q = Ee(U.value[T][D.value]);
|
|
2991
2974
|
if (Q !== void 0) {
|
|
2992
|
-
let
|
|
2993
|
-
U.value[T][h.value] =
|
|
2975
|
+
let de = Q[h.value];
|
|
2976
|
+
U.value[T][h.value] = de, V.value && (M.value[T][h.value] = de);
|
|
2994
2977
|
}
|
|
2995
2978
|
});
|
|
2996
2979
|
}, Ut = (m) => {
|
|
@@ -4959,7 +4942,7 @@ const $5 = /* @__PURE__ */ x({
|
|
|
4959
4942
|
emits: ["update:rule", "close"],
|
|
4960
4943
|
setup(s, { emit: e }) {
|
|
4961
4944
|
const t = s, n = m1(
|
|
4962
|
-
t.rule.itemType ||
|
|
4945
|
+
t.rule.itemType || ce.ACTIVITIES
|
|
4963
4946
|
), a = v({
|
|
4964
4947
|
get() {
|
|
4965
4948
|
return n.value;
|
|
@@ -4971,7 +4954,7 @@ const $5 = /* @__PURE__ */ x({
|
|
|
4971
4954
|
subItemId: void 0
|
|
4972
4955
|
});
|
|
4973
4956
|
}
|
|
4974
|
-
}), o = v(() => Object.values(
|
|
4957
|
+
}), o = v(() => Object.values(ce)), i = v({
|
|
4975
4958
|
get() {
|
|
4976
4959
|
return t.rule.subItemId;
|
|
4977
4960
|
},
|
|
@@ -4985,9 +4968,9 @@ const $5 = /* @__PURE__ */ x({
|
|
|
4985
4968
|
}), l = v(() => {
|
|
4986
4969
|
var b;
|
|
4987
4970
|
return !t.templateActivities || !t.templateMilestones || !t.templatePhases ? null : (b = {
|
|
4988
|
-
[
|
|
4989
|
-
[
|
|
4990
|
-
[
|
|
4971
|
+
[ce.ACTIVITIES]: t.templateActivities,
|
|
4972
|
+
[ce.MILESTONES]: t.templateMilestones,
|
|
4973
|
+
[ce.PHASES]: t.templatePhases
|
|
4991
4974
|
}[n.value]) == null ? void 0 : b.map((j) => ({
|
|
4992
4975
|
value: j.id,
|
|
4993
4976
|
label: j.name
|
|
@@ -5194,7 +5177,7 @@ const A5 = {
|
|
|
5194
5177
|
templateId: t.templateId
|
|
5195
5178
|
};
|
|
5196
5179
|
e("addItem", {
|
|
5197
|
-
type:
|
|
5180
|
+
type: ce.PHASES,
|
|
5198
5181
|
templateId: t.templateId,
|
|
5199
5182
|
item: k
|
|
5200
5183
|
});
|
|
@@ -5202,12 +5185,12 @@ const A5 = {
|
|
|
5202
5185
|
e("updateItem", {
|
|
5203
5186
|
templateId: t.templateId,
|
|
5204
5187
|
id: t.templateId,
|
|
5205
|
-
itemType:
|
|
5188
|
+
itemType: ce.TEMPLATES,
|
|
5206
5189
|
data: { name: u }
|
|
5207
5190
|
});
|
|
5208
5191
|
}, V = (u) => {
|
|
5209
5192
|
e("removeItem", {
|
|
5210
|
-
type:
|
|
5193
|
+
type: ce.PHASES,
|
|
5211
5194
|
templateId: t.templateId,
|
|
5212
5195
|
data: {
|
|
5213
5196
|
id: u
|
|
@@ -5217,7 +5200,7 @@ const A5 = {
|
|
|
5217
5200
|
e("updateItem", {
|
|
5218
5201
|
templateId: t.templateId,
|
|
5219
5202
|
id: u,
|
|
5220
|
-
itemType:
|
|
5203
|
+
itemType: ce.PHASES,
|
|
5221
5204
|
data: { name: $ }
|
|
5222
5205
|
});
|
|
5223
5206
|
}, O = (u) => {
|
|
@@ -5231,14 +5214,14 @@ const A5 = {
|
|
|
5231
5214
|
phaseId: u.phaseId
|
|
5232
5215
|
};
|
|
5233
5216
|
e("addItem", {
|
|
5234
|
-
type:
|
|
5217
|
+
type: ce.MILESTONES,
|
|
5235
5218
|
templateId: t.templateId,
|
|
5236
5219
|
phaseId: u.phaseId,
|
|
5237
5220
|
item: P
|
|
5238
5221
|
});
|
|
5239
5222
|
}, b = (u) => {
|
|
5240
5223
|
e("removeItem", {
|
|
5241
|
-
type:
|
|
5224
|
+
type: ce.MILESTONES,
|
|
5242
5225
|
templateId: t.templateId,
|
|
5243
5226
|
phaseId: u.phaseId,
|
|
5244
5227
|
data: {
|
|
@@ -5248,7 +5231,7 @@ const A5 = {
|
|
|
5248
5231
|
}, j = (u) => {
|
|
5249
5232
|
const { id: $, ...S } = u;
|
|
5250
5233
|
e("updateItem", {
|
|
5251
|
-
itemType:
|
|
5234
|
+
itemType: ce.MILESTONES,
|
|
5252
5235
|
id: $,
|
|
5253
5236
|
templateId: t.templateId,
|
|
5254
5237
|
data: S
|
|
@@ -5263,14 +5246,14 @@ const A5 = {
|
|
|
5263
5246
|
milestoneId: $
|
|
5264
5247
|
};
|
|
5265
5248
|
e("addItem", {
|
|
5266
|
-
type:
|
|
5249
|
+
type: ce.ACTIVITIES,
|
|
5267
5250
|
milestoneId: $,
|
|
5268
5251
|
item: ae
|
|
5269
5252
|
});
|
|
5270
5253
|
}, te = (u) => {
|
|
5271
5254
|
const { phaseId: $, milestoneId: S } = u;
|
|
5272
5255
|
e("removeItem", {
|
|
5273
|
-
type:
|
|
5256
|
+
type: ce.ACTIVITIES,
|
|
5274
5257
|
templateId: t.templateId,
|
|
5275
5258
|
phaseId: $,
|
|
5276
5259
|
milestoneId: S,
|
|
@@ -5281,7 +5264,7 @@ const A5 = {
|
|
|
5281
5264
|
}, D = (u) => {
|
|
5282
5265
|
const { id: $, ...S } = u;
|
|
5283
5266
|
e("updateItem", {
|
|
5284
|
-
itemType:
|
|
5267
|
+
itemType: ce.ACTIVITIES,
|
|
5285
5268
|
id: $,
|
|
5286
5269
|
templateId: t.templateId,
|
|
5287
5270
|
data: S
|
|
@@ -5297,7 +5280,7 @@ const A5 = {
|
|
|
5297
5280
|
if (u.moved) {
|
|
5298
5281
|
const S = R1(u, (($ = a.value) == null ? void 0 : $.phases) ?? []);
|
|
5299
5282
|
e("updateItem", {
|
|
5300
|
-
itemType:
|
|
5283
|
+
itemType: ce.PHASES,
|
|
5301
5284
|
id: u.moved.element.id,
|
|
5302
5285
|
templateId: t.templateId,
|
|
5303
5286
|
data: {
|
|
@@ -5307,7 +5290,7 @@ const A5 = {
|
|
|
5307
5290
|
}
|
|
5308
5291
|
}, B = (u) => {
|
|
5309
5292
|
!o.value || !i.value || !c.value || e("addItem", {
|
|
5310
|
-
type:
|
|
5293
|
+
type: ce.SUBTASKS,
|
|
5311
5294
|
activityId: u.activityId,
|
|
5312
5295
|
milestoneId: i.value.id,
|
|
5313
5296
|
phaseId: o.value.id,
|
|
@@ -6256,7 +6239,7 @@ const X7 = { class: "ao-fieldset" }, Q7 = { class: "ao-fieldset__title" }, J7 =
|
|
|
6256
6239
|
}), l = (f) => {
|
|
6257
6240
|
const { id: g } = f;
|
|
6258
6241
|
o.value && o.value.projectId && e("update:activity", {
|
|
6259
|
-
itemType:
|
|
6242
|
+
itemType: ce.ACTIVITIES,
|
|
6260
6243
|
id: g,
|
|
6261
6244
|
projectId: o.value.projectId,
|
|
6262
6245
|
data: {
|
|
@@ -6393,7 +6376,7 @@ const X7 = { class: "ao-fieldset" }, Q7 = { class: "ao-fieldset__title" }, J7 =
|
|
|
6393
6376
|
e("addTemplate", h);
|
|
6394
6377
|
}, o = (l, p) => {
|
|
6395
6378
|
e("updateItem", {
|
|
6396
|
-
itemType:
|
|
6379
|
+
itemType: ce.TEMPLATES,
|
|
6397
6380
|
id: l,
|
|
6398
6381
|
templateId: l,
|
|
6399
6382
|
data: {
|
|
@@ -6404,7 +6387,7 @@ const X7 = { class: "ao-fieldset" }, Q7 = { class: "ao-fieldset__title" }, J7 =
|
|
|
6404
6387
|
if (l.moved) {
|
|
6405
6388
|
const p = R1(l, t.templates ?? []);
|
|
6406
6389
|
e("updateItem", {
|
|
6407
|
-
itemType:
|
|
6390
|
+
itemType: ce.TEMPLATES,
|
|
6408
6391
|
id: l.moved.element.id,
|
|
6409
6392
|
templateId: l.moved.element.id,
|
|
6410
6393
|
data: {
|
|
@@ -7842,6 +7825,6 @@ export {
|
|
|
7842
7825
|
E3 as ruleComparators,
|
|
7843
7826
|
O3 as ruleDurationUnits,
|
|
7844
7827
|
H3 as ruleTriggerTypes,
|
|
7845
|
-
|
|
7828
|
+
ce as templateItemType,
|
|
7846
7829
|
t1 as templateRouteNames
|
|
7847
7830
|
};
|