@antelopejs/dms-automation 0.2.4 → 0.2.5

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.
@@ -18,7 +18,7 @@ let BuilderPageController = class BuilderPageController extends (0, page_1.PageC
18
18
  icon: "i-ph-tree-structure",
19
19
  module: "automation",
20
20
  order: 2,
21
- }, (0, layouts_1.DefaultLayout)({ fullWidth: true })) {
21
+ }, (0, layouts_1.DefaultLayout)({ fullWidth: true, fillHeight: true })) {
22
22
  static list = (0, custom_1.CustomComponent)("dms-automation-editor");
23
23
  };
24
24
  exports.BuilderPageController = BuilderPageController;
@@ -1 +1 @@
1
- {"version":3,"file":"builder.js","sourceRoot":"","sources":["../../src/pages/builder.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8E;AAC9E,kEAAwE;AACxE,oEAAuE;AACvE,sBAAoB;AAGb,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,IAAA,qBAAc,EACvD,SAAS,EACT;IACE,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,+BAA+B;IAC5C,WAAW,EAAE,qCAAqC;IAClD,IAAI,EAAE,qBAAqB;IAC3B,MAAM,EAAE,YAAY;IACpB,KAAK,EAAE,CAAC;CACT,EACD,IAAA,uBAAa,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CACnC;IACC,MAAM,CAAC,IAAI,GAAG,IAAA,wBAAe,EAAC,uBAAuB,CAAC,CAAC;;AAZ5C,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAY,GAAE;GACF,qBAAqB,CAajC"}
1
+ {"version":3,"file":"builder.js","sourceRoot":"","sources":["../../src/pages/builder.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8E;AAC9E,kEAAwE;AACxE,oEAAuE;AACvE,sBAAoB;AAGb,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,IAAA,qBAAc,EACvD,SAAS,EACT;IACE,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,+BAA+B;IAC5C,WAAW,EAAE,qCAAqC;IAClD,IAAI,EAAE,qBAAqB;IAC3B,MAAM,EAAE,YAAY;IACpB,KAAK,EAAE,CAAC;CACT,EACD,IAAA,uBAAa,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CACrD;IACC,MAAM,CAAC,IAAI,GAAG,IAAA,wBAAe,EAAC,uBAAuB,CAAC,CAAC;;AAZ5C,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAY,GAAE;GACF,qBAAqB,CAajC"}
@@ -18,7 +18,7 @@ let LibraryPageController = class LibraryPageController extends (0, page_1.PageC
18
18
  icon: "i-ph-package",
19
19
  module: "automation",
20
20
  order: 3,
21
- }, (0, layouts_1.DefaultLayout)({ fullWidth: true })) {
21
+ }, (0, layouts_1.DefaultLayout)({ fullWidth: true, fillHeight: true })) {
22
22
  static list = (0, custom_1.CustomComponent)("dms-automation-library");
23
23
  };
24
24
  exports.LibraryPageController = LibraryPageController;
@@ -1 +1 @@
1
- {"version":3,"file":"library.js","sourceRoot":"","sources":["../../src/pages/library.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8E;AAC9E,kEAAwE;AACxE,oEAAuE;AACvE,sBAAoB;AAGb,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,IAAA,qBAAc,EACvD,SAAS,EACT;IACE,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,+BAA+B;IAC5C,WAAW,EAAE,qCAAqC;IAClD,IAAI,EAAE,cAAc;IACpB,MAAM,EAAE,YAAY;IACpB,KAAK,EAAE,CAAC;CACT,EACD,IAAA,uBAAa,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CACnC;IACC,MAAM,CAAC,IAAI,GAAG,IAAA,wBAAe,EAAC,wBAAwB,CAAC,CAAC;;AAZ7C,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAY,GAAE;GACF,qBAAqB,CAajC"}
1
+ {"version":3,"file":"library.js","sourceRoot":"","sources":["../../src/pages/library.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8E;AAC9E,kEAAwE;AACxE,oEAAuE;AACvE,sBAAoB;AAGb,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,IAAA,qBAAc,EACvD,SAAS,EACT;IACE,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,+BAA+B;IAC5C,WAAW,EAAE,qCAAqC;IAClD,IAAI,EAAE,cAAc;IACpB,MAAM,EAAE,YAAY;IACpB,KAAK,EAAE,CAAC;CACT,EACD,IAAA,uBAAa,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CACrD;IACC,MAAM,CAAC,IAAI,GAAG,IAAA,wBAAe,EAAC,wBAAwB,CAAC,CAAC;;AAZ7C,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAY,GAAE;GACF,qBAAqB,CAajC"}
@@ -83,7 +83,16 @@ async function onSave(payload: { enabled: boolean; config: string }) {
83
83
  </script>
84
84
 
85
85
  <template>
86
- <div :class="embedded ? 'flex flex-col gap-5' : 'flex flex-col gap-6 p-4 sm:p-6'">
86
+ <!-- Embedded in the library page, which fills the panel: from `lg` up the
87
+ list and the detail share the height and scroll inside; below, where
88
+ they stack, the catalog scrolls as a whole. -->
89
+ <div
90
+ :class="
91
+ embedded
92
+ ? 'flex min-h-0 flex-1 flex-col gap-5 max-lg:overflow-y-auto'
93
+ : 'flex flex-col gap-6 p-4 sm:p-6'
94
+ "
95
+ >
87
96
  <section v-if="!embedded" class="flex flex-wrap items-center gap-4">
88
97
  <div
89
98
  class="grid size-11 shrink-0 place-items-center rounded-xl bg-primary/10 text-primary ring ring-primary/20"
@@ -120,16 +129,17 @@ async function onSave(payload: { enabled: boolean; config: string }) {
120
129
  />
121
130
 
122
131
  <div
123
- class="grid grid-cols-1 gap-5 lg:grid-cols-[minmax(280px,340px)_1fr] lg:items-start"
132
+ class="grid grid-cols-1 gap-5 lg:min-h-0 lg:flex-1 lg:grid-cols-[minmax(280px,340px)_1fr]"
124
133
  >
125
134
  <DmsAutomationTypeList
126
135
  :types="items"
127
136
  :model-value="selectedId"
128
137
  :title="$t('dms_automation.actions.listLabel')"
129
- class="lg:max-h-[calc(100vh-12rem)]"
138
+ class="lg:min-h-0"
130
139
  @update:model-value="selectedId = $event"
131
140
  />
132
141
  <DmsAutomationTypeConfigForm
142
+ class="lg:min-h-0 lg:overflow-y-auto"
133
143
  :type="selectedType"
134
144
  :schema="selectedType?.inputSchema"
135
145
  :saved-config="selectedConfig"
@@ -73,7 +73,16 @@ function categoryOf(t: DataNodeTypeItem): string {
73
73
  </script>
74
74
 
75
75
  <template>
76
- <div :class="embedded ? 'flex flex-col gap-5' : 'flex flex-col gap-6 p-4 sm:p-6'">
76
+ <!-- Embedded in the library page, which fills the panel: from `lg` up the
77
+ list and the detail share the height and scroll inside; below, where
78
+ they stack, the catalog scrolls as a whole. -->
79
+ <div
80
+ :class="
81
+ embedded
82
+ ? 'flex min-h-0 flex-1 flex-col gap-5 max-lg:overflow-y-auto'
83
+ : 'flex flex-col gap-6 p-4 sm:p-6'
84
+ "
85
+ >
77
86
  <section v-if="!embedded" class="flex flex-wrap items-center gap-4">
78
87
  <div
79
88
  class="grid size-11 shrink-0 place-items-center rounded-xl bg-primary/10 text-primary ring ring-primary/20"
@@ -110,18 +119,22 @@ function categoryOf(t: DataNodeTypeItem): string {
110
119
  />
111
120
 
112
121
  <div
113
- class="grid grid-cols-1 gap-5 lg:grid-cols-[minmax(280px,340px)_1fr] lg:items-start"
122
+ class="grid grid-cols-1 gap-5 lg:min-h-0 lg:flex-1 lg:grid-cols-[minmax(280px,340px)_1fr]"
114
123
  >
115
124
  <DmsAutomationTypeList
116
125
  :types="items"
117
126
  :model-value="selectedId"
118
127
  :group-by="categoryOf"
119
128
  :title="$t('dms_automation.data_nodes.listLabel')"
120
- class="lg:max-h-[calc(100vh-12rem)]"
129
+ class="lg:min-h-0"
121
130
  @update:model-value="selectedId = $event"
122
131
  />
123
132
 
124
- <DmsCard v-if="selectedType" :padded="false" class="flex flex-col">
133
+ <DmsCard
134
+ v-if="selectedType"
135
+ :padded="false"
136
+ class="flex flex-col lg:min-h-0 lg:overflow-y-auto"
137
+ >
125
138
  <div class="flex items-start gap-3 border-b border-default px-5 py-4 sm:px-6">
126
139
  <div
127
140
  class="grid size-10 shrink-0 place-items-center rounded-lg bg-primary/10 text-primary ring ring-primary/20"
@@ -1,6 +1,5 @@
1
1
  <script setup lang="ts">
2
2
  import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'
3
- import { useElementBounding } from '@vueuse/core'
4
3
  import type { BreadcrumbItem } from '@nuxt/ui'
5
4
  import type { NodeKindEntry } from '../composables/useAutomationNodeKinds'
6
5
  import { type ListEnvelope, newId, unwrapList } from '../utils/automation'
@@ -33,30 +32,6 @@ const props = withDefaults(
33
32
 
34
33
  const route = useDmsRoute()
35
34
 
36
- // Editor height.
37
- //
38
- // The graph canvas must fill the page instead of growing with its content,
39
- // otherwise the whole page scrolls under a canvas that pans on its own. The
40
- // dms layout drops page components into plain block containers (UContainer >
41
- // dms-page-stack), so there is no flex parent whose height we could claim —
42
- // the height has to come from the viewport.
43
- //
44
- // The offset to subtract is measured rather than hardcoded: everything above
45
- // us (dashboard header, the native page header, the panel's responsive
46
- // padding) belongs to the dms layer and shifts between its releases and
47
- // across breakpoints. `100dvh` keeps the viewport half reactive in CSS, so
48
- // only the offset needs re-measuring. Before the first measurement (SSR,
49
- // pre-mount) no height is applied and the `min-h-96` floor takes over.
50
- const editorRoot = ref<HTMLElement | null>(null)
51
- const { top: editorRootTop } = useElementBounding(editorRoot)
52
- // Breathing room below the editor, matching the layout panel's bottom padding.
53
- const EDITOR_BOTTOM_GAP_PX = 24
54
- const editorHeight = computed(() =>
55
- editorRootTop.value > 0
56
- ? `calc(100dvh - ${Math.round(editorRootTop.value)}px - ${EDITOR_BOTTOM_GAP_PX}px)`
57
- : undefined,
58
- )
59
-
60
35
  const templateQueryId = computed<string | null>(() => {
61
36
  const q = route.query.template
62
37
  if (typeof q === 'string' && q.length > 0) return q
@@ -2115,11 +2090,11 @@ async function onRun() {
2115
2090
  <!--
2116
2091
  The page (src/pages/builder.ts) renders the native dms header
2117
2092
  (icon / title / description), so the editor doesn't repeat one here.
2118
- Height comes from `editorHeight` (see above); the `min-h-0` / `flex-1`
2119
- chain below passes it down to the canvas, and `min-h-96` keeps the
2120
- canvas usable on short viewports at the cost of scrolling there.
2093
+ The page fills the panel (`fillHeight`): the editor takes the height
2094
+ left under that header, and the `min-h-0` / `flex-1` chain below passes
2095
+ it down to the canvas, which pans inside it instead of growing.
2121
2096
  -->
2122
- <div ref="editorRoot" class="flex min-h-96 flex-col gap-4" :style="{ height: editorHeight }">
2097
+ <div class="flex min-h-0 flex-1 flex-col gap-4">
2123
2098
  <UAlert
2124
2099
  v-if="loadError"
2125
2100
  color="error"
@@ -23,9 +23,11 @@ const tabs = computed<
23
23
  <template>
24
24
  <!--
25
25
  Title / icon / description come from the page's native dms header
26
- (src/pages/library.ts), so this component starts at its tabs.
26
+ (src/pages/library.ts), so this component starts at its tabs. The page
27
+ fills the panel (`fillHeight`): the active catalog takes the height
28
+ under the tabs.
27
29
  -->
28
- <div class="flex flex-col gap-5">
30
+ <div class="flex min-h-0 flex-1 flex-col gap-5">
29
31
  <!-- Tabs -->
30
32
  <div class="border-b border-default">
31
33
  <div class="flex flex-wrap items-center gap-1">
@@ -291,7 +291,16 @@ function schemaTypeOf(p: TemplatePort): string {
291
291
  </script>
292
292
 
293
293
  <template>
294
- <div :class="embedded ? 'flex flex-col gap-5' : 'flex flex-col gap-6 p-4 sm:p-6'">
294
+ <!-- Embedded in the library page, which fills the panel: from `lg` up the
295
+ list and the detail share the height and scroll inside; below, where
296
+ they stack, the catalog scrolls as a whole. -->
297
+ <div
298
+ :class="
299
+ embedded
300
+ ? 'flex min-h-0 flex-1 flex-col gap-5 max-lg:overflow-y-auto'
301
+ : 'flex flex-col gap-6 p-4 sm:p-6'
302
+ "
303
+ >
295
304
  <section v-if="!embedded" class="flex flex-wrap items-center gap-4">
296
305
  <div
297
306
  class="grid size-11 shrink-0 place-items-center rounded-xl bg-primary/10 text-primary ring ring-primary/20"
@@ -328,9 +337,9 @@ function schemaTypeOf(p: TemplatePort): string {
328
337
  />
329
338
 
330
339
  <div
331
- class="grid grid-cols-1 gap-5 lg:grid-cols-[minmax(280px,360px)_1fr] lg:items-start"
340
+ class="grid grid-cols-1 gap-5 lg:min-h-0 lg:flex-1 lg:grid-cols-[minmax(280px,360px)_1fr]"
332
341
  >
333
- <div class="flex flex-col gap-3">
342
+ <div class="flex flex-col gap-3 lg:min-h-0">
334
343
  <UInput
335
344
  v-model="search"
336
345
  icon="i-ph-magnifying-glass"
@@ -338,7 +347,7 @@ function schemaTypeOf(p: TemplatePort): string {
338
347
  />
339
348
  <DmsCard
340
349
  :padded="false"
341
- class="flex flex-col overflow-hidden lg:max-h-[calc(100vh-16rem)]"
350
+ class="flex flex-col overflow-hidden lg:min-h-0 lg:flex-1"
342
351
  >
343
352
  <div
344
353
  v-if="items.length === 0"
@@ -388,7 +397,11 @@ function schemaTypeOf(p: TemplatePort): string {
388
397
  </DmsCard>
389
398
  </div>
390
399
 
391
- <DmsCard v-if="selected" :padded="false" class="flex flex-col">
400
+ <DmsCard
401
+ v-if="selected"
402
+ :padded="false"
403
+ class="flex flex-col lg:min-h-0 lg:overflow-y-auto"
404
+ >
392
405
  <div class="flex items-start gap-3 border-b border-default px-5 py-4 sm:px-6">
393
406
  <div
394
407
  class="grid size-10 shrink-0 place-items-center rounded-lg bg-primary/10 text-primary ring ring-primary/20"
@@ -79,7 +79,16 @@ async function onSave(payload: { enabled: boolean; config: string }) {
79
79
  </script>
80
80
 
81
81
  <template>
82
- <div :class="embedded ? 'flex flex-col gap-5' : 'flex flex-col gap-6 p-4 sm:p-6'">
82
+ <!-- Embedded in the library page, which fills the panel: from `lg` up the
83
+ list and the detail share the height and scroll inside; below, where
84
+ they stack, the catalog scrolls as a whole. -->
85
+ <div
86
+ :class="
87
+ embedded
88
+ ? 'flex min-h-0 flex-1 flex-col gap-5 max-lg:overflow-y-auto'
89
+ : 'flex flex-col gap-6 p-4 sm:p-6'
90
+ "
91
+ >
83
92
  <section v-if="!embedded" class="flex flex-wrap items-center gap-4">
84
93
  <div
85
94
  class="grid size-11 shrink-0 place-items-center rounded-xl bg-primary/10 text-primary ring ring-primary/20"
@@ -116,16 +125,17 @@ async function onSave(payload: { enabled: boolean; config: string }) {
116
125
  />
117
126
 
118
127
  <div
119
- class="grid grid-cols-1 gap-5 lg:grid-cols-[minmax(280px,340px)_1fr] lg:items-start"
128
+ class="grid grid-cols-1 gap-5 lg:min-h-0 lg:flex-1 lg:grid-cols-[minmax(280px,340px)_1fr]"
120
129
  >
121
130
  <DmsAutomationTypeList
122
131
  :types="items"
123
132
  :model-value="selectedId"
124
133
  :title="$t('dms_automation.triggers.listLabel')"
125
- class="lg:max-h-[calc(100vh-12rem)]"
134
+ class="lg:min-h-0"
126
135
  @update:model-value="selectedId = $event"
127
136
  />
128
137
  <DmsAutomationTypeConfigForm
138
+ class="lg:min-h-0 lg:overflow-y-auto"
129
139
  :type="selectedType"
130
140
  :schema="selectedType?.configSchema"
131
141
  :saved-config="selectedConfig"
@@ -13,7 +13,6 @@
13
13
  },
14
14
  "dependencies": {
15
15
  "@vue-flow/core": "^1.48.2",
16
- "@vueuse/core": "^14.3.0",
17
16
  "vue": "^3.5.18"
18
17
  },
19
18
  "devDependencies": {
@@ -11,9 +11,6 @@ importers:
11
11
  '@vue-flow/core':
12
12
  specifier: ^1.48.2
13
13
  version: 1.48.2(vue@3.5.34(typescript@5.9.3))
14
- '@vueuse/core':
15
- specifier: ^14.3.0
16
- version: 14.3.0(vue@3.5.34(typescript@5.9.3))
17
14
  vue:
18
15
  specifier: ^3.5.18
19
16
  version: 3.5.34(typescript@5.9.3)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antelopejs/dms-automation",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,16 +33,16 @@
33
33
  "@antelopejs/interface-api-util": ">=0.1.2 <1.0.0",
34
34
  "@antelopejs/interface-core": ">=0.1.1 <1.0.0",
35
35
  "@antelopejs/interface-data-api": ">=0.1.9 <1.0.0",
36
- "@antelopejs/interface-database": ">=0.1.7 <1.0.0",
37
- "@antelopejs/interface-database-decorators": ">=0.1.6 <1.0.0",
38
- "@antelopejs/interface-dms": ">=0.2.0 <1.0.0",
36
+ "@antelopejs/interface-database": ">=0.1.8 <1.0.0",
37
+ "@antelopejs/interface-database-decorators": ">=0.1.7 <1.0.0",
38
+ "@antelopejs/interface-dms": ">=0.2.8 <1.0.0",
39
39
  "@antelopejs/interface-dms-automation": ">=0.1.1 <0.2.0",
40
40
  "defu": "^6.1.4",
41
41
  "node-cron": "^4.2.1",
42
42
  "zod": "^3.25.76"
43
43
  },
44
44
  "devDependencies": {
45
- "@antelopejs/core": "1.9.1",
45
+ "@antelopejs/core": "1.10.1",
46
46
  "@antelopejs/tooling-configs": ">=0.0.7 <1.0.0",
47
47
  "@types/node": "^24.0.0",
48
48
  "@types/node-cron": "^3.0.11",