@privateaim/client-vue 0.8.36 → 0.8.38

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 ADDED
@@ -0,0 +1,20 @@
1
+ # @privateaim/client-vue 🎨
2
+
3
+ [![npm version][npm-src]][npm-href]
4
+
5
+ Reusable Vue 3 component library for building PrivateAIM client applications — forms, lists, and detail views for all domain entities.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @privateaim/client-vue
11
+ ```
12
+
13
+ ## License
14
+
15
+ Made with 💚
16
+
17
+ Published under [Apache 2.0](../../LICENSE).
18
+
19
+ [npm-src]: https://img.shields.io/npm/v/@privateaim/client-vue
20
+ [npm-href]: https://npmjs.com/package/@privateaim/client-vue
package/dist/index.mjs CHANGED
@@ -1109,7 +1109,7 @@ const FAnalysisCommand = defineComponent({
1109
1109
  },
1110
1110
  elementType: {
1111
1111
  type: String,
1112
- default: ActionCommandElementType.BUTTON
1112
+ default: "button"
1113
1113
  },
1114
1114
  withIcon: {
1115
1115
  type: Boolean,
@@ -1872,7 +1872,7 @@ var FMasterImageCommand_default = defineComponent({
1872
1872
  },
1873
1873
  elementType: {
1874
1874
  type: String,
1875
- default: ActionCommandElementType.BUTTON
1875
+ default: "button"
1876
1876
  },
1877
1877
  withIcon: {
1878
1878
  type: Boolean,
@@ -2767,16 +2767,6 @@ var FProjectNodeAssignAction_default = defineComponent({
2767
2767
  });
2768
2768
  //#endregion
2769
2769
  //#region src/components/project-node/FProjectNode.ts
2770
- var Direction$3 = /* @__PURE__ */ function(Direction) {
2771
- Direction["IN"] = "in";
2772
- Direction["OUT"] = "out";
2773
- return Direction;
2774
- }(Direction$3 || {});
2775
- var Target$1 = /* @__PURE__ */ function(Target) {
2776
- Target["PROJECT"] = "project";
2777
- Target["NODE"] = "node";
2778
- return Target;
2779
- }(Target$1 || {});
2780
2770
  var FProjectNode_default = defineComponent({
2781
2771
  props: {
2782
2772
  entity: { type: Object },
@@ -2791,8 +2781,8 @@ var FProjectNode_default = defineComponent({
2791
2781
  const manager = createEntityManager({
2792
2782
  realmId: (entity) => {
2793
2783
  if (!entity) return;
2794
- if (props.target === Target$1.PROJECT) return entity.project_realm_id;
2795
- if (props.target === Target$1.NODE) return entity.node_realm_id;
2784
+ if (props.target === "project") return entity.project_realm_id;
2785
+ if (props.target === "node") return entity.node_realm_id;
2796
2786
  },
2797
2787
  type: `${DomainType.PROJECT_NODE}`,
2798
2788
  setup,
@@ -2800,25 +2790,25 @@ var FProjectNode_default = defineComponent({
2800
2790
  socket: {
2801
2791
  processEvent(event, realmId) {
2802
2792
  if (!realmId) return true;
2803
- if (props.target === Target$1.PROJECT) return realmId === event.data.node_realm_id;
2804
- if (props.target === Target$1.NODE) return realmId === event.data.project_realm_id;
2793
+ if (props.target === "project") return realmId === event.data.node_realm_id;
2794
+ if (props.target === "node") return realmId === event.data.project_realm_id;
2805
2795
  return false;
2806
2796
  },
2807
2797
  buildChannelName(id) {
2808
- if (props.direction === Direction$3.IN) return buildDomainChannelName(DomainSubType.PROJECT_NODE_IN, id);
2809
- if (props.direction === Direction$3.OUT) return buildDomainChannelName(DomainSubType.PROJECT_NODE_OUT, id);
2798
+ if (props.direction === "in") return buildDomainChannelName(DomainSubType.PROJECT_NODE_IN, id);
2799
+ if (props.direction === "out") return buildDomainChannelName(DomainSubType.PROJECT_NODE_OUT, id);
2810
2800
  return buildDomainChannelName(DomainType.PROJECT_NODE, id);
2811
2801
  }
2812
2802
  }
2813
2803
  });
2814
2804
  await manager.resolve();
2815
- if (manager.data.value && props.target && !manager.data.value[props.target]) if (props.target === Target$1.PROJECT) manager.data.value[props.target] = await apiClient.project.getOne(manager.data.value.project_id);
2805
+ if (manager.data.value && props.target && !manager.data.value[props.target]) if (props.target === "project") manager.data.value[props.target] = await apiClient.project.getOne(manager.data.value.project_id);
2816
2806
  else manager.data.value[props.target] = await apiClient.node.getOne(manager.data.value.node_id);
2817
2807
  return () => {
2818
2808
  const fallback = () => {
2819
2809
  if (props.target && manager.data.value && manager.data.value[props.target]) {
2820
- if (props.target === Target$1.PROJECT) return h("div", [manager.data.value?.project.name]);
2821
- if (props.target === Target$1.NODE) return h("div", [manager.data.value?.node.name]);
2810
+ if (props.target === "project") return h("div", [manager.data.value?.project.name]);
2811
+ if (props.target === "node") return h("div", [manager.data.value?.node.name]);
2822
2812
  }
2823
2813
  return [manager.data?.value?.id];
2824
2814
  };
@@ -2828,11 +2818,6 @@ var FProjectNode_default = defineComponent({
2828
2818
  });
2829
2819
  //#endregion
2830
2820
  //#region src/components/project-node/FProjectNodes.ts
2831
- var Direction$2 = /* @__PURE__ */ function(Direction) {
2832
- Direction["IN"] = "in";
2833
- Direction["OUT"] = "out";
2834
- return Direction;
2835
- }(Direction$2 || {});
2836
2821
  var FProjectNodes_default = defineComponent({
2837
2822
  props: {
2838
2823
  ...defineListProps(),
@@ -2847,7 +2832,7 @@ var FProjectNodes_default = defineComponent({
2847
2832
  },
2848
2833
  direction: {
2849
2834
  type: String,
2850
- default: `${Direction$2.OUT}`
2835
+ default: `out`
2851
2836
  },
2852
2837
  includeNode: {
2853
2838
  type: Boolean,
@@ -2864,8 +2849,8 @@ var FProjectNodes_default = defineComponent({
2864
2849
  const source = computed(() => props.target === DomainType.NODE ? DomainType.PROJECT : DomainType.NODE);
2865
2850
  const isSameSocketRoom = (room) => {
2866
2851
  if (props.realmId) switch (props.direction) {
2867
- case Direction$2.IN: return room === buildDomainChannelName(DomainSubType.PROJECT_NODE_IN);
2868
- case Direction$2.OUT: return room === buildDomainChannelName(DomainSubType.PROJECT_NODE_OUT);
2852
+ case "in": return room === buildDomainChannelName(DomainSubType.PROJECT_NODE_IN);
2853
+ case "out": return room === buildDomainChannelName(DomainSubType.PROJECT_NODE_OUT);
2869
2854
  }
2870
2855
  else return room === buildDomainChannelName(DomainType.PROJECT_NODE);
2871
2856
  return false;
@@ -2891,14 +2876,14 @@ var FProjectNodes_default = defineComponent({
2891
2876
  },
2892
2877
  buildSubscribeEventName() {
2893
2878
  if (props.realmId) {
2894
- if (props.direction === Direction$2.IN) return buildDomainEventFullName(DomainSubType.PROJECT_NODE_IN, DomainEventSubscriptionName.SUBSCRIBE);
2879
+ if (props.direction === "in") return buildDomainEventFullName(DomainSubType.PROJECT_NODE_IN, DomainEventSubscriptionName.SUBSCRIBE);
2895
2880
  return buildDomainEventFullName(DomainSubType.PROJECT_NODE_OUT, DomainEventSubscriptionName.SUBSCRIBE);
2896
2881
  }
2897
2882
  return buildDomainEventFullName(DomainType.PROJECT_NODE, DomainEventSubscriptionName.SUBSCRIBE);
2898
2883
  },
2899
2884
  buildUnsubscribeEventName() {
2900
2885
  if (props.realmId) {
2901
- if (props.direction === Direction$2.IN) return buildDomainEventFullName(DomainSubType.PROJECT_NODE_IN, DomainEventSubscriptionName.UNSUBSCRIBE);
2886
+ if (props.direction === "in") return buildDomainEventFullName(DomainSubType.PROJECT_NODE_IN, DomainEventSubscriptionName.UNSUBSCRIBE);
2902
2887
  return buildDomainEventFullName(DomainSubType.PROJECT_NODE_OUT, DomainEventSubscriptionName.UNSUBSCRIBE);
2903
2888
  }
2904
2889
  return buildDomainEventFullName(DomainType.PROJECT_NODE, DomainEventSubscriptionName.UNSUBSCRIBE);
@@ -2910,7 +2895,7 @@ var FProjectNodes_default = defineComponent({
2910
2895
  else filters["project.name"] = filters.name;
2911
2896
  delete filters.name;
2912
2897
  }
2913
- if (props.realmId) if (props.direction === Direction$2.IN) filters.node_realm_id = props.realmId;
2898
+ if (props.realmId) if (props.direction === "in") filters.node_realm_id = props.realmId;
2914
2899
  else filters.project_realm_id = props.realmId;
2915
2900
  },
2916
2901
  query: () => {
@@ -3363,7 +3348,7 @@ var FEntityDelete_default = defineComponent({
3363
3348
  },
3364
3349
  elementType: {
3365
3350
  type: String,
3366
- default: `${ElementType.BUTTON}`
3351
+ default: `button`
3367
3352
  },
3368
3353
  entityId: {
3369
3354
  type: String,
@@ -3423,10 +3408,10 @@ var FEntityDelete_default = defineComponent({
3423
3408
  let tag = "button";
3424
3409
  const data = {};
3425
3410
  switch (props.elementType) {
3426
- case ElementType.LINK:
3411
+ case "link":
3427
3412
  tag = "a";
3428
3413
  break;
3429
- case ElementType.DROP_DOWN_ITEM:
3414
+ case "dropDownItem":
3430
3415
  if (instance && typeof instance.appContext.app.component("BDropdownItem") !== "undefined") tag = resolveDynamicComponent("BDropdownItem");
3431
3416
  break;
3432
3417
  }
@@ -4015,15 +4000,17 @@ var FAnalysisProgressBar_vue_vue_type_script_lang_default = defineComponent({
4015
4000
  });
4016
4001
  const buildProgress = computed(() => {
4017
4002
  if (entity.value.build_status === ProcessStatus.EXECUTED) return 100;
4018
- if (entity.value.build_status === ProcessStatus.STARTED) return 20;
4019
- if (entity.value.build_status === ProcessStatus.STARTING) return 10;
4020
- return 0;
4003
+ if (entity.value.build_status === ProcessStatus.STARTED) return 10;
4004
+ if (entity.value.build_status === ProcessStatus.STARTING) return 5;
4005
+ if (!entity.value.build_status) return 0;
4006
+ return Math.max(10, entity.value.build_progress ?? 0);
4021
4007
  });
4022
4008
  const runProgress = computed(() => {
4023
4009
  if (entity.value.execution_status === ProcessStatus.EXECUTED) return 100;
4024
- if (entity.value.execution_status === ProcessStatus.STARTED) return 20;
4025
- if (entity.value.execution_status === ProcessStatus.STARTING) return 10;
4026
- return 0;
4010
+ if (entity.value.execution_status === ProcessStatus.STARTED) return 10;
4011
+ if (entity.value.execution_status === ProcessStatus.STARTING) return 5;
4012
+ if (!entity.value.execution_status) return 0;
4013
+ return Math.max(10, entity.value.execution_progress ?? 0);
4027
4014
  });
4028
4015
  const progress = computed(() => {
4029
4016
  const total = configurationProgress.value + buildProgress.value + runProgress.value;
@@ -4697,7 +4684,7 @@ const FAnalysisBucketDownload = defineComponent({
4697
4684
  },
4698
4685
  elementType: {
4699
4686
  type: String,
4700
- default: ActionCommandElementType.BUTTON
4687
+ default: "button"
4701
4688
  },
4702
4689
  withIcon: {
4703
4690
  type: Boolean,
@@ -5278,16 +5265,6 @@ var FAnalysisNodeAssignAction_default = defineComponent({
5278
5265
  });
5279
5266
  //#endregion
5280
5267
  //#region src/components/analysis-node/FAnalysisNode.ts
5281
- var Direction$1 = /* @__PURE__ */ function(Direction) {
5282
- Direction["IN"] = "in";
5283
- Direction["OUT"] = "out";
5284
- return Direction;
5285
- }(Direction$1 || {});
5286
- var Target = /* @__PURE__ */ function(Target) {
5287
- Target["ANALYSIS"] = "analysis";
5288
- Target["NODE"] = "node";
5289
- return Target;
5290
- }(Target || {});
5291
5268
  var FAnalysisNode_default = defineComponent({
5292
5269
  props: {
5293
5270
  entity: { type: Object },
@@ -5302,8 +5279,8 @@ var FAnalysisNode_default = defineComponent({
5302
5279
  const manager = createEntityManager({
5303
5280
  realmId: (entity) => {
5304
5281
  if (!entity) return;
5305
- if (props.target === Target.ANALYSIS) return entity.analysis_realm_id;
5306
- if (props.target === Target.NODE) return entity.node_realm_id;
5282
+ if (props.target === "analysis") return entity.analysis_realm_id;
5283
+ if (props.target === "node") return entity.node_realm_id;
5307
5284
  },
5308
5285
  type: `${DomainType.ANALYSIS_NODE}`,
5309
5286
  setup,
@@ -5311,25 +5288,25 @@ var FAnalysisNode_default = defineComponent({
5311
5288
  socket: {
5312
5289
  processEvent(event, realmId) {
5313
5290
  if (!realmId) return true;
5314
- if (props.target === Target.ANALYSIS) return realmId === event.data.analysis_realm_id;
5315
- if (props.target === Target.NODE) return realmId === event.data.node_realm_id;
5291
+ if (props.target === "analysis") return realmId === event.data.analysis_realm_id;
5292
+ if (props.target === "node") return realmId === event.data.node_realm_id;
5316
5293
  return false;
5317
5294
  },
5318
5295
  buildChannelName(id) {
5319
- if (props.direction === Direction$1.IN) return buildDomainChannelName(DomainSubType.ANALYSIS_NODE_IN, id);
5320
- if (props.direction === Direction$1.OUT) return buildDomainChannelName(DomainSubType.ANALYSIS_NODE_OUT, id);
5296
+ if (props.direction === "in") return buildDomainChannelName(DomainSubType.ANALYSIS_NODE_IN, id);
5297
+ if (props.direction === "out") return buildDomainChannelName(DomainSubType.ANALYSIS_NODE_OUT, id);
5321
5298
  return buildDomainChannelName(DomainType.ANALYSIS_NODE, id);
5322
5299
  }
5323
5300
  }
5324
5301
  });
5325
5302
  await manager.resolve();
5326
- if (manager.data.value && props.target && !manager.data.value[props.target]) if (props.target === Target.ANALYSIS) manager.data.value[props.target] = await apiClient.analysis.getOne(manager.data.value.analysis_id);
5303
+ if (manager.data.value && props.target && !manager.data.value[props.target]) if (props.target === "analysis") manager.data.value[props.target] = await apiClient.analysis.getOne(manager.data.value.analysis_id);
5327
5304
  else manager.data.value[props.target] = await apiClient.node.getOne(manager.data.value.node_id);
5328
5305
  return () => {
5329
5306
  const fallback = () => {
5330
5307
  if (props.target && manager.data.value && manager.data.value[props.target]) {
5331
- if (props.target === Target.ANALYSIS) return h("div", [manager.data.value?.analysis.name]);
5332
- if (props.target === Target.NODE) return h("div", [manager.data.value?.node.name]);
5308
+ if (props.target === "analysis") return h("div", [manager.data.value?.analysis.name]);
5309
+ if (props.target === "node") return h("div", [manager.data.value?.node.name]);
5333
5310
  }
5334
5311
  return [manager.data?.value?.id];
5335
5312
  };
@@ -5339,11 +5316,6 @@ var FAnalysisNode_default = defineComponent({
5339
5316
  });
5340
5317
  //#endregion
5341
5318
  //#region src/components/analysis-node/FAnalysisNodes.ts
5342
- var Direction = /* @__PURE__ */ function(Direction) {
5343
- Direction["IN"] = "in";
5344
- Direction["OUT"] = "out";
5345
- return Direction;
5346
- }(Direction || {});
5347
5319
  var FAnalysisNodes_default = defineComponent({
5348
5320
  props: {
5349
5321
  ...defineListProps(),
@@ -5358,7 +5330,7 @@ var FAnalysisNodes_default = defineComponent({
5358
5330
  },
5359
5331
  direction: {
5360
5332
  type: String,
5361
- default: `${Direction.OUT}`
5333
+ default: `out`
5362
5334
  }
5363
5335
  },
5364
5336
  emits: defineListEvents(),
@@ -5367,8 +5339,8 @@ var FAnalysisNodes_default = defineComponent({
5367
5339
  const source = computed(() => props.target === DomainType.NODE ? DomainType.ANALYSIS : DomainType.NODE);
5368
5340
  const isSameSocketRoom = (room) => {
5369
5341
  if (props.realmId) switch (props.direction) {
5370
- case Direction.IN: return room === buildDomainChannelName(DomainSubType.ANALYSIS_NODE_IN);
5371
- case Direction.OUT: return room === buildDomainChannelName(DomainSubType.ANALYSIS_NODE_OUT);
5342
+ case "in": return room === buildDomainChannelName(DomainSubType.ANALYSIS_NODE_IN);
5343
+ case "out": return room === buildDomainChannelName(DomainSubType.ANALYSIS_NODE_OUT);
5372
5344
  }
5373
5345
  else return room === buildDomainChannelName(DomainType.ANALYSIS_NODE);
5374
5346
  return false;
@@ -5393,14 +5365,14 @@ var FAnalysisNodes_default = defineComponent({
5393
5365
  },
5394
5366
  buildSubscribeEventName() {
5395
5367
  if (props.realmId) {
5396
- if (props.direction === Direction.IN) return buildDomainEventFullName(DomainSubType.ANALYSIS_NODE_IN, DomainEventSubscriptionName.SUBSCRIBE);
5368
+ if (props.direction === "in") return buildDomainEventFullName(DomainSubType.ANALYSIS_NODE_IN, DomainEventSubscriptionName.SUBSCRIBE);
5397
5369
  return buildDomainEventFullName(DomainSubType.ANALYSIS_NODE_OUT, DomainEventSubscriptionName.SUBSCRIBE);
5398
5370
  }
5399
5371
  return buildDomainEventFullName(DomainType.ANALYSIS_NODE, DomainEventSubscriptionName.SUBSCRIBE);
5400
5372
  },
5401
5373
  buildUnsubscribeEventName() {
5402
5374
  if (props.realmId) {
5403
- if (props.direction === Direction.IN) return buildDomainEventFullName(DomainSubType.ANALYSIS_NODE_IN, DomainEventSubscriptionName.UNSUBSCRIBE);
5375
+ if (props.direction === "in") return buildDomainEventFullName(DomainSubType.ANALYSIS_NODE_IN, DomainEventSubscriptionName.UNSUBSCRIBE);
5404
5376
  return buildDomainEventFullName(DomainSubType.ANALYSIS_NODE_OUT, DomainEventSubscriptionName.UNSUBSCRIBE);
5405
5377
  }
5406
5378
  return buildDomainEventFullName(DomainType.ANALYSIS_NODE, DomainEventSubscriptionName.UNSUBSCRIBE);
@@ -5412,7 +5384,7 @@ var FAnalysisNodes_default = defineComponent({
5412
5384
  else filters["analysis.name"] = filters.name;
5413
5385
  delete filters.name;
5414
5386
  }
5415
- if (props.realmId) if (props.direction === Direction.IN) filters.node_realm_id = props.realmId;
5387
+ if (props.realmId) if (props.direction === "in") filters.node_realm_id = props.realmId;
5416
5388
  else filters.analysis_realm_id = props.realmId;
5417
5389
  },
5418
5390
  query: () => {
@@ -6175,7 +6147,7 @@ var FBucketFile_vue_vue_type_script_lang_default = defineComponent({
6175
6147
  },
6176
6148
  elementType: {
6177
6149
  type: String,
6178
- default: ActionCommandElementType.BUTTON
6150
+ default: "button"
6179
6151
  },
6180
6152
  withIcon: {
6181
6153
  type: Boolean,