@antcde/component-library 0.1.14-rc.44f7de3 → 0.1.14-rc.528dd66

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.
Files changed (99) hide show
  1. package/README.md +2 -2
  2. package/dist/index.js +43188 -35133
  3. package/dist/types/{components → src/components}/BaseDeleteDialog.vue.d.ts +8 -1
  4. package/dist/types/src/components/DmsFilePicker/composables/usePickerNavigation.d.ts +196 -0
  5. package/dist/types/src/components/DmsFilePicker/composables/usePickerUpload.d.ts +22 -0
  6. package/dist/types/src/components/DmsFilePicker/index.vue.d.ts +28 -0
  7. package/dist/types/src/components/DmsFilePicker/utils/fileFormatting.d.ts +6 -0
  8. package/dist/types/src/components/FilePreviewContent/index.vue.d.ts +31 -0
  9. package/dist/types/src/components/FlowWindowContent/index.vue.d.ts +113 -0
  10. package/dist/types/src/components/RichTextEditor/index.vue.d.ts +51 -0
  11. package/dist/types/{components → src/components}/StackedLabels/_LabelsMenuCard.vue.d.ts +1 -1
  12. package/dist/types/src/components/TasksFlow/components/_FlowBreadcrumb.vue.d.ts +17 -0
  13. package/dist/types/src/components/TasksFlow/components/_FlowEdgeConditionsDialog.vue.d.ts +10 -0
  14. package/dist/types/{components/TasksFlow/components/nodes/_triggerNode.vue.d.ts → src/components/TasksFlow/components/_FlowSearch.vue.d.ts} +4 -3
  15. package/dist/types/src/components/TasksFlow/components/_FlowStats.vue.d.ts +5 -0
  16. package/dist/types/src/components/TasksFlow/components/_InsertTemplateDialog.vue.d.ts +17 -0
  17. package/dist/types/src/components/TasksFlow/components/_SubflowPanel.vue.d.ts +125 -0
  18. package/dist/types/src/components/TasksFlow/components/_VersionDiffView.vue.d.ts +14 -0
  19. package/dist/types/src/components/TasksFlow/components/_VersionPublishDialog.vue.d.ts +14 -0
  20. package/dist/types/src/components/TasksFlow/components/_flowEditor.vue.d.ts +13 -0
  21. package/dist/types/src/components/TasksFlow/components/nodes/_DurationEditor.vue.d.ts +33 -0
  22. package/dist/types/src/components/TasksFlow/components/nodes/_NodeContextMenu.vue.d.ts +35 -0
  23. package/dist/types/src/components/TasksFlow/components/nodes/_UserPicker.vue.d.ts +32 -0
  24. package/dist/types/{components → src/components}/TasksFlow/components/nodes/_taskNode.vue.d.ts +2 -2
  25. package/dist/types/src/components/TasksFlow/components/nodes/_triggerNode.vue.d.ts +10 -0
  26. package/dist/types/src/components/TasksFlow/components/nodes/useTaskNodeState.d.ts +86 -0
  27. package/dist/types/src/components/TasksFlow/composables/useAutoLayout.d.ts +22 -0
  28. package/dist/types/src/components/TasksFlow/composables/useCriticalPath.d.ts +8 -0
  29. package/dist/types/src/components/TasksFlow/composables/useFlowCache.d.ts +17 -0
  30. package/dist/types/src/components/TasksFlow/composables/useFlowCrud.d.ts +21 -0
  31. package/dist/types/src/components/TasksFlow/composables/useFlowEditor.d.ts +54 -0
  32. package/dist/types/src/components/TasksFlow/composables/useFlowFetch.d.ts +33 -0
  33. package/dist/types/src/components/TasksFlow/composables/useFlowKeyboard.d.ts +15 -0
  34. package/dist/types/src/components/TasksFlow/composables/useFlowNotifications.d.ts +15 -0
  35. package/dist/types/src/components/TasksFlow/composables/useFlowOperations.d.ts +8 -0
  36. package/dist/types/src/components/TasksFlow/composables/useFlowRealtime.d.ts +23 -0
  37. package/dist/types/src/components/TasksFlow/composables/useFlowSearch.d.ts +14 -0
  38. package/dist/types/src/components/TasksFlow/composables/useFlowSubflows.d.ts +22 -0
  39. package/dist/types/src/components/TasksFlow/composables/useFlowUsers.d.ts +27 -0
  40. package/dist/types/src/components/TasksFlow/composables/useFlowViewport.d.ts +28 -0
  41. package/dist/types/src/components/TasksFlow/composables/useTaskFlow.d.ts +321 -0
  42. package/dist/types/{components → src/components}/TasksFlow/composables/useTaskFlowDragDrop.d.ts +0 -1
  43. package/dist/types/src/components/TasksFlow/composables/useTaskFlowEdgeConditions.d.ts +10 -0
  44. package/dist/types/src/components/TasksFlow/composables/useTaskFlowEdges.d.ts +18 -0
  45. package/dist/types/src/components/TasksFlow/composables/useTaskFlowMappers.d.ts +4 -0
  46. package/dist/types/src/components/TasksFlow/composables/useTaskFlowTypes.d.ts +76 -0
  47. package/dist/types/src/components/TasksFlow/composables/useTemplateVersioning.d.ts +188 -0
  48. package/dist/types/src/components/TasksFlow/composables/useTemplateVersioningState.d.ts +176 -0
  49. package/dist/types/src/components/TasksFlow/composables/useTriggerExecution.d.ts +21 -0
  50. package/dist/types/src/components/TasksFlow/index.vue.d.ts +39 -0
  51. package/dist/types/src/components/UnifiedWindow/index.vue.d.ts +67 -0
  52. package/dist/types/src/components/UnifiedWindow/useWindowDrag.d.ts +28 -0
  53. package/dist/types/src/components/VersionPublishDialog.vue.d.ts +24 -0
  54. package/dist/types/{index.d.ts → src/index.d.ts} +11 -1
  55. package/lib/GisViewer/GisViewer.vue +3 -2
  56. package/lib/build/layer-order.css +33 -0
  57. package/lib/build/uno.ts +117 -0
  58. package/lib/build/vite.ts +104 -0
  59. package/lib/build/vuetify-overrides.css +14 -0
  60. package/lib/build/vuetify.ts +230 -0
  61. package/lib/test/TESTING.claude.md +225 -0
  62. package/lib/test/createMockAppContext.ts +211 -0
  63. package/lib/test/createTestPinia.ts +31 -0
  64. package/lib/test/createTestRouter.ts +31 -0
  65. package/lib/test/index.ts +41 -0
  66. package/lib/test/mockVueRouter.ts +93 -0
  67. package/lib/test/mocks/createMockApi.ts +43 -0
  68. package/lib/test/mocks/createMockContext.ts +109 -0
  69. package/lib/test/mocks/createMockSignal.ts +30 -0
  70. package/lib/test/mocks/createMockUser.ts +87 -0
  71. package/lib/test/mocks/index.ts +11 -0
  72. package/lib/test/mountApp.ts +47 -0
  73. package/lib/test/mountWithContext.ts +94 -0
  74. package/lib/test/setup.ts +151 -0
  75. package/lib/test/testAppSetup.ts +110 -0
  76. package/lib/test/vitest.ts +69 -0
  77. package/package.json +127 -30
  78. package/dist/types/components/TasksFlow/components/_flowEditor.vue.d.ts +0 -16
  79. package/dist/types/components/TasksFlow/composables/useTaskFlow.d.ts +0 -103
  80. package/dist/types/components/TasksFlow/index.vue.d.ts +0 -51
  81. /package/dist/types/{components → src/components}/BaseAntButton.vue.d.ts +0 -0
  82. /package/dist/types/{components → src/components}/BaseAntCard.vue.d.ts +0 -0
  83. /package/dist/types/{components → src/components}/BaseAntCreateCard.vue.d.ts +0 -0
  84. /package/dist/types/{components → src/components}/BaseAntDatePicker.vue.d.ts +0 -0
  85. /package/dist/types/{components → src/components}/BaseAntInput.vue.d.ts +0 -0
  86. /package/dist/types/{components → src/components}/BaseAntLoading.vue.d.ts +0 -0
  87. /package/dist/types/{components → src/components}/BaseAppCard.vue.d.ts +0 -0
  88. /package/dist/types/{components → src/components}/BaseAppCardSkeleton.vue.d.ts +0 -0
  89. /package/dist/types/{components → src/components}/BaseClickableIcon.vue.d.ts +0 -0
  90. /package/dist/types/{components → src/components}/BaseConfirmDialog.vue.d.ts +0 -0
  91. /package/dist/types/{components → src/components}/BaseDialog.vue.d.ts +0 -0
  92. /package/dist/types/{components → src/components}/BaseLimitedButton.vue.d.ts +0 -0
  93. /package/dist/types/{components → src/components}/BaseResizePanel.vue.d.ts +0 -0
  94. /package/dist/types/{components → src/components}/BulkLabelsMenu.vue.d.ts +0 -0
  95. /package/dist/types/{components → src/components}/GlobalLabelBadge.vue.d.ts +0 -0
  96. /package/dist/types/{components → src/components}/RBAC/Permissions/PermissionCard.vue.d.ts +0 -0
  97. /package/dist/types/{components → src/components}/StackedLabels/index.vue.d.ts +0 -0
  98. /package/dist/types/{components → src/components}/TasksFlow/components/_dropzoneBackground.vue.d.ts +0 -0
  99. /package/dist/types/{components → src/components}/TasksFlow/components/_flowEdge.vue.d.ts +0 -0
@@ -0,0 +1,151 @@
1
+ import type { I18nOptions } from 'vue-i18n'
2
+ import { config, enableAutoUnmount } from '@vue/test-utils'
3
+ import { afterEach, vi } from 'vitest'
4
+ import { ref } from 'vue'
5
+ import { createI18n } from 'vue-i18n'
6
+ import { createVuetify } from 'vuetify'
7
+ import * as components from 'vuetify/components'
8
+ import * as directives from 'vuetify/directives'
9
+
10
+ interface HappyDOMWindow {
11
+ Response: typeof Response
12
+ }
13
+
14
+ interface HappyDOMHandle {
15
+ settings?: {
16
+ fetch?: {
17
+ interceptor?: {
18
+ beforeAsyncRequest?: (ctx: { window: HappyDOMWindow }) => Promise<unknown>
19
+ }
20
+ }
21
+ }
22
+ }
23
+
24
+ declare global {
25
+ interface Window {
26
+ happyDOM?: HappyDOMHandle
27
+ }
28
+ // eslint-disable-next-line vars-on-top
29
+ var __antTestMockComms: Record<string, unknown> | undefined
30
+ // eslint-disable-next-line vars-on-top
31
+ var __antTestMockColorMode: unknown
32
+ // eslint-disable-next-line vars-on-top
33
+ var __antTestMockI18n: unknown
34
+ }
35
+
36
+ /**
37
+ * Builds an i18n instance with ANT test defaults. Missing keys fall back to the
38
+ * key itself so tests can assert `expect(html).toContain('foo.bar')`.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const i18n = createTestI18n({ messages: { en: { greeting: 'Hi' } } })
43
+ * mount(MyComponent, { global: { plugins: [i18n] } })
44
+ * ```
45
+ */
46
+ export function createTestI18n(overrides: Partial<I18nOptions> = {}) {
47
+ return createI18n({
48
+ legacy: false,
49
+ locale: 'en',
50
+ fallbackLocale: 'en',
51
+ missing: (_locale, key) => key,
52
+ messages: { en: {} },
53
+ ...overrides,
54
+ })
55
+ }
56
+
57
+ config.global.plugins = [
58
+ createVuetify({ components, directives }),
59
+ createTestI18n(),
60
+ ]
61
+
62
+ enableAutoUnmount(afterEach)
63
+
64
+ const happyDOM = window.happyDOM
65
+ if (happyDOM?.settings?.fetch) {
66
+ happyDOM.settings.fetch.interceptor = {
67
+ beforeAsyncRequest: async ({ window: w }) => new w.Response('', { status: 200 }),
68
+ }
69
+ }
70
+
71
+ Object.defineProperty(window, 'scrollTo', { value: () => null, writable: true })
72
+
73
+ if (!globalThis.ResizeObserver) {
74
+ globalThis.ResizeObserver = class ResizeObserver {
75
+ observe() {}
76
+ unobserve() {}
77
+ disconnect() {}
78
+ }
79
+ }
80
+
81
+ if (!globalThis.visualViewport) {
82
+ Object.defineProperty(globalThis, 'visualViewport', {
83
+ value: {
84
+ width: 1024,
85
+ height: 768,
86
+ offsetLeft: 0,
87
+ offsetTop: 0,
88
+ pageLeft: 0,
89
+ pageTop: 0,
90
+ scale: 1,
91
+ addEventListener: () => {},
92
+ removeEventListener: () => {},
93
+ dispatchEvent: () => true,
94
+ },
95
+ writable: true,
96
+ })
97
+ }
98
+
99
+ vi.mock('@antcde/vue-utils', async (importOriginal) => {
100
+ const imported = await importOriginal<Record<string, any>>()
101
+ const real = { ...imported, ...(imported.default ?? {}) }
102
+
103
+ if (!real.useSingleton) {
104
+ for (const key of Object.getOwnPropertyNames(imported)) {
105
+ if (!(key in real))
106
+ real[key] = imported[key]
107
+ }
108
+ }
109
+
110
+ return {
111
+ ...real,
112
+
113
+ useApi: (serviceFn: (...args: any[]) => Promise<any>, defaultValue: any) => {
114
+ const state = ref(structuredClone(defaultValue))
115
+ const isLoading = ref(false)
116
+ const error = ref(null)
117
+ const execute = vi.fn(async (...args: any[]) => {
118
+ isLoading.value = true
119
+ try {
120
+ const result = await serviceFn(...args)
121
+ state.value = result ?? structuredClone(defaultValue)
122
+ error.value = null
123
+ return result
124
+ }
125
+ catch (e: any) {
126
+ error.value = e
127
+ return undefined
128
+ }
129
+ finally {
130
+ isLoading.value = false
131
+ }
132
+ })
133
+ return { state, isLoading, error, execute, isReady: ref(true), executeDelayed: vi.fn() }
134
+ },
135
+
136
+ useCommsClient: () => {
137
+ const mocks = globalThis.__antTestMockComms
138
+ if (!mocks)
139
+ throw new Error('createMockAppContext() must be called before mounting. It sets up mock comms for the real context plugin.')
140
+ return mocks
141
+ },
142
+
143
+ useAntColorMode: () => {
144
+ return globalThis.__antTestMockColorMode ?? ref('light')
145
+ },
146
+
147
+ useAntI18n: () => {
148
+ return globalThis.__antTestMockI18n ?? { t: (k: string) => k, locale: ref('en') }
149
+ },
150
+ }
151
+ })
@@ -0,0 +1,110 @@
1
+ import type { Component, Plugin } from 'vue'
2
+ import type { MockAppContext } from './createMockAppContext'
3
+ import { flushPromises, mount } from '@vue/test-utils'
4
+ import { describe, expect, it } from 'vitest'
5
+ import { nextTick } from 'vue'
6
+
7
+ export interface TestAppSetupOptions {
8
+ /**
9
+ * The real `provideContext` plugin from your app's `@/plugins/context`.
10
+ * Tests use real Vue provide/inject — if context plugin is missing, tests fail.
11
+ */
12
+ provideContext: Plugin
13
+ plugins?: Plugin[]
14
+ props?: Record<string, any>
15
+ }
16
+
17
+ /**
18
+ * Verifies the app correctly integrates with ANT-OS:
19
+ * 1. Mounts with real context (provide/inject)
20
+ * 2. Fails without context plugin (catches wiring bugs)
21
+ * 3. Implements dark mode from host colorMode preference
22
+ * 4. Has working i18n from context
23
+ * 5. useApi works with connect service mocks
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * import { createMockAppContext, testAppSetup } from '@antcde/component-library/test'
28
+ * import { provideContext } from '@/plugins/context'
29
+ * import App from '@/App.vue'
30
+ *
31
+ * const mockContext = createMockAppContext({
32
+ * connect: { myService: { getItems: vi.fn().mockResolvedValue([]) } },
33
+ * })
34
+ *
35
+ * testAppSetup(App, mockContext, { provideContext })
36
+ * ```
37
+ */
38
+ export function testAppSetup(
39
+ App: Component,
40
+ mockContext: MockAppContext,
41
+ options: TestAppSetupOptions,
42
+ ) {
43
+ const mountApp = () => {
44
+ return mount(App, {
45
+ global: {
46
+ plugins: [options.provideContext, ...(options.plugins ?? [])],
47
+ stubs: { Transition: false, TransitionGroup: false },
48
+ config: { warnHandler: () => {} },
49
+ },
50
+ props: options.props,
51
+ })
52
+ }
53
+
54
+ describe('app setup', () => {
55
+ it('mounts with context provided', () => {
56
+ const wrapper = mountApp()
57
+ expect(wrapper.vm).toBeTruthy()
58
+ wrapper.unmount()
59
+ })
60
+
61
+ it('fails without provideContext plugin', () => {
62
+ expect(() => mount(App, {
63
+ global: {
64
+ plugins: [...(options.plugins ?? [])],
65
+ stubs: { Transition: false, TransitionGroup: false },
66
+ config: { warnHandler: () => {} },
67
+ },
68
+ props: options.props,
69
+ })).toThrow()
70
+ })
71
+
72
+ it('responds to dark mode preference from host', async () => {
73
+ const wrapper = mountApp()
74
+ await nextTick()
75
+ const lightOutput = wrapper.html()
76
+
77
+ mockContext.colorMode.value = 'dark'
78
+ await nextTick()
79
+ const darkOutput = wrapper.html()
80
+
81
+ expect(darkOutput).not.toBe(lightOutput)
82
+
83
+ mockContext.colorMode.value = 'light'
84
+ await nextTick()
85
+
86
+ expect(wrapper.html()).not.toBe(darkOutput)
87
+ wrapper.unmount()
88
+ })
89
+
90
+ it('has working i18n from context', () => {
91
+ const wrapper = mountApp()
92
+ const text = wrapper.text().trim()
93
+ expect(text.length).toBeGreaterThan(0)
94
+ expect(mockContext.i18n.t('test.key')).toBe('test.key')
95
+ wrapper.unmount()
96
+ })
97
+
98
+ it('useApi resolves connect service mocks', async () => {
99
+ const wrapper = mountApp()
100
+ await flushPromises()
101
+ expect(wrapper.vm).toBeTruthy()
102
+
103
+ const services = Object.entries(mockContext.comms.connect)
104
+ .filter(([key]) => key !== 'httpClient')
105
+ expect(services.length).toBeGreaterThan(0)
106
+
107
+ wrapper.unmount()
108
+ })
109
+ })
110
+ }
@@ -0,0 +1,69 @@
1
+ import { fileURLToPath, URL } from 'node:url'
2
+ import vue from '@vitejs/plugin-vue'
3
+ import vuetify from 'vite-plugin-vuetify'
4
+ import { defineConfig, mergeConfig } from 'vitest/config'
5
+
6
+ /**
7
+ * Creates a Vitest config pre-configured for ANT platform packages.
8
+ *
9
+ * Includes: vue plugin, vuetify auto-import, happy-dom environment,
10
+ * vuetify dep inlining, path alias resolution, and the shared setup file
11
+ * that registers Vuetify + i18n on `config.global.plugins` and mocks
12
+ * `@antcde/vue-utils`.
13
+ *
14
+ * @param appRoot - Pass `import.meta.url` from your vitest.config.ts.
15
+ * @param overrides - Additional config merged via `mergeConfig()`.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * import { createAntVitestConfig } from '@antcde/component-library/test/vitest'
20
+ * export default createAntVitestConfig(import.meta.url)
21
+ * ```
22
+ */
23
+ export function createAntVitestConfig(appRoot: string | URL, overrides: Record<string, any> = {}) {
24
+ const rootDir = fileURLToPath(new URL('.', appRoot))
25
+ const sharedSetup = fileURLToPath(new URL('./setup.ts', import.meta.url))
26
+
27
+ const base = defineConfig({
28
+ plugins: [
29
+ vue(),
30
+ vuetify({ autoImport: true }),
31
+ ],
32
+ resolve: {
33
+ extensions: ['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json', '.vue'],
34
+ alias: {
35
+ '@': fileURLToPath(new URL('./src', appRoot)),
36
+ },
37
+ },
38
+ test: {
39
+ globals: true,
40
+ environment: 'happy-dom',
41
+ environmentOptions: {
42
+ happyDOM: {
43
+ settings: {
44
+ navigator: {
45
+ maxTouchPoints: 0,
46
+ },
47
+ disableCSSFileLoading: true,
48
+ disableJavaScriptFileLoading: true,
49
+ handleDisabledFileLoadingAsSuccess: true,
50
+ },
51
+ },
52
+ },
53
+ root: rootDir,
54
+ include: [
55
+ 'src/**/*.{test,spec}.ts',
56
+ 'tests/**/*.{test,spec}.ts',
57
+ ],
58
+ exclude: ['node_modules'],
59
+ server: {
60
+ deps: {
61
+ inline: ['vuetify'],
62
+ },
63
+ },
64
+ setupFiles: [sharedSetup],
65
+ },
66
+ })
67
+
68
+ return mergeConfig(base, overrides)
69
+ }
package/package.json CHANGED
@@ -1,17 +1,42 @@
1
1
  {
2
2
  "name": "@antcde/component-library",
3
3
  "type": "module",
4
- "version": "0.1.14-rc.44f7de3",
4
+ "version": "0.1.14-rc.528dd66",
5
5
  "description": "Helper to use ant components in Vue 3",
6
6
  "author": "CollaborAll",
7
7
  "exports": {
8
8
  ".": {
9
- "types": "./dist/types/index.d.ts",
9
+ "types": "./dist/types/src/index.d.ts",
10
10
  "import": "./dist/index.js",
11
11
  "require": "./dist/index.cjs.js"
12
12
  },
13
13
  "./composables/*": {
14
- "types": "./dist/types/composables/*.d.ts"
14
+ "types": "./dist/types/src/composables/*.d.ts"
15
+ },
16
+ "./build/uno": {
17
+ "import": "./lib/build/uno.ts"
18
+ },
19
+ "./build/vite": {
20
+ "import": "./lib/build/vite.ts"
21
+ },
22
+ "./build/vuetify": {
23
+ "import": "./lib/build/vuetify.ts"
24
+ },
25
+ "./build/layer-order.css": "./lib/build/layer-order.css",
26
+ "./test": {
27
+ "import": "./lib/test/index.ts"
28
+ },
29
+ "./test/vitest": {
30
+ "import": "./lib/test/vitest.ts"
31
+ },
32
+ "./test/mocks": {
33
+ "import": "./lib/test/mocks/index.ts"
34
+ },
35
+ "./test/mount": {
36
+ "import": "./lib/test/mountWithContext.ts"
37
+ },
38
+ "./test/mockVueRouter": {
39
+ "import": "./lib/test/mockVueRouter.ts"
15
40
  },
16
41
  "./lib/ForgeViewer": {
17
42
  "import": "./lib/ForgeViewer/index.ts"
@@ -40,7 +65,7 @@
40
65
  },
41
66
  "main": "./dist/index.js",
42
67
  "module": "./dist/index.js",
43
- "types": "./dist/types/index.d.ts",
68
+ "types": "./dist/types/src/index.d.ts",
44
69
  "files": [
45
70
  "/dist",
46
71
  "/lib",
@@ -60,48 +85,120 @@
60
85
  "format": "prettier --write src/"
61
86
  },
62
87
  "peerDependencies": {
88
+ "@iconify/vue": ">=5.0.0",
89
+ "@intlify/unplugin-vue-i18n": ">=11.0.0",
90
+ "@pinia/testing": ">=1.0.0",
91
+ "@unocss/preset-rem-to-px": "*",
92
+ "@unocss/preset-wind4": "*",
93
+ "@vitejs/plugin-vue": ">=6.0.0",
94
+ "@vue/test-utils": ">=2.4.0",
95
+ "happy-dom": ">=20.0.0",
96
+ "pinia": ">=3.0.0",
97
+ "unocss": "*",
98
+ "unplugin-auto-import": "*",
99
+ "unplugin-icons": "*",
100
+ "unplugin-vue-components": "*",
101
+ "vite": ">=8.0.0",
102
+ "vite-plugin-vuetify": ">=2.0.0",
103
+ "vitest": ">=4.0.0",
63
104
  "vue": "^3.5.29",
64
- "vuetify": "^3.12.1"
105
+ "vue-router": ">=4.0.0",
106
+ "vuetify": "^4.0.4"
107
+ },
108
+ "peerDependenciesMeta": {
109
+ "@iconify/vue": {
110
+ "optional": true
111
+ },
112
+ "@intlify/unplugin-vue-i18n": {
113
+ "optional": true
114
+ },
115
+ "@unocss/preset-rem-to-px": {
116
+ "optional": true
117
+ },
118
+ "@unocss/preset-wind4": {
119
+ "optional": true
120
+ },
121
+ "@vitejs/plugin-vue": {
122
+ "optional": true
123
+ },
124
+ "unocss": {
125
+ "optional": true
126
+ },
127
+ "unplugin-auto-import": {
128
+ "optional": true
129
+ },
130
+ "unplugin-icons": {
131
+ "optional": true
132
+ },
133
+ "unplugin-vue-components": {
134
+ "optional": true
135
+ },
136
+ "vite": {
137
+ "optional": true
138
+ },
139
+ "vite-plugin-vuetify": {
140
+ "optional": true
141
+ },
142
+ "@vue/test-utils": {
143
+ "optional": true
144
+ },
145
+ "vitest": {
146
+ "optional": true
147
+ },
148
+ "happy-dom": {
149
+ "optional": true
150
+ },
151
+ "pinia": {
152
+ "optional": true
153
+ },
154
+ "@pinia/testing": {
155
+ "optional": true
156
+ },
157
+ "vue-router": {
158
+ "optional": true
159
+ }
65
160
  },
66
161
  "dependencies": {
67
- "@antcde/connect-ts": "0.4.17-rc.44f7de3",
68
- "@antcde/vue-utils": "0.2.13-rc.44f7de3",
162
+ "@antcde/connect-ts": "0.4.18-rc.528dd66",
163
+ "@antcde/vue-utils": "0.2.14-rc.528dd66",
69
164
  "@arcgis/core": "^4.34.8",
70
165
  "@mdi/font": "^7.4.47",
166
+ "@tiptap/extension-link": "^3.26.0",
167
+ "@tiptap/extension-mention": "^3.26.0",
168
+ "@tiptap/extension-placeholder": "^3.26.0",
169
+ "@tiptap/starter-kit": "^3.26.0",
170
+ "@tiptap/suggestion": "^3.26.0",
171
+ "@tiptap/vue-3": "^3.26.0",
71
172
  "@vue-flow/background": "^1.3.2",
72
173
  "@vue-flow/core": "^1.48.2",
73
174
  "@vue-flow/minimap": "^1.5.4",
74
- "@vueuse/core": "^14.2.1",
75
- "dayjs": "^1.11.20",
76
- "qs": "^6.15.0",
77
- "uuid": "^13.0.0",
78
- "vue-i18n": "^11.3.2",
79
- "vue-router": "^5.0.4"
175
+ "@vueuse/core": "^14.3.0",
176
+ "qs": "^6.15.2",
177
+ "sanitize-html": "^2.17.4",
178
+ "vue-i18n": "^11.4.5"
80
179
  },
81
180
  "devDependencies": {
82
181
  "@arcgis/core": "^4.30.9",
83
182
  "@iconify-json/mdi": "^1.2.3",
84
- "@iconify/vue": "^5.0.0",
85
- "@intlify/unplugin-vue-i18n": "^11.0.7",
183
+ "@iconify/vue": "^5.0.1",
184
+ "@intlify/unplugin-vue-i18n": "^11.2.3",
86
185
  "@mdi/font": "^7.2.96",
87
- "@tsconfig/node20": "^20.1.9",
88
- "@types/node": "^22.19.17",
89
- "@types/qs": "^6.15.0",
90
- "@vitejs/plugin-vue": "^6.0.5",
91
- "@vue/tsconfig": "^0.8.1",
92
- "axios": "^1.14.0",
93
- "esbuild": "0.27.2",
94
- "glob": "^13.0.6",
95
- "npm-run-all2": "^6.2.6",
186
+ "@tsconfig/node22": "^22.0.5",
187
+ "@types/node": "^25.9.2",
188
+ "@types/qs": "^6.15.1",
189
+ "@vitejs/plugin-vue": "^6.0.7",
190
+ "@vue/test-utils": "^2.4.11",
191
+ "@vue/tsconfig": "^0.9.1",
192
+ "happy-dom": "^20.10.2",
96
193
  "pinia": "^3.0.4",
97
- "rxjs": "^7.8.2",
98
- "sass": "^1.99.0",
99
- "typescript": "~5.9.3",
194
+ "sass": "^1.100.0",
195
+ "typescript": "~6.0.3",
100
196
  "unplugin-icons": "^23.0.1",
101
- "vite": "^7.3.2",
102
- "vite-plugin-css-injected-by-js": "^3.5.2",
197
+ "vite": "^8.0.16",
198
+ "vite-plugin-css-injected-by-js": "^5.0.1",
103
199
  "vite-plugin-dts": "^4.5.4",
104
200
  "vite-plugin-vuetify": "^2.1.3",
105
- "vue-tsc": "^3.2.6"
201
+ "vitest": "^4.1.8",
202
+ "vue-tsc": "^3.3.4"
106
203
  }
107
204
  }
@@ -1,16 +0,0 @@
1
- type __VLS_Props = {
2
- isDark: boolean;
3
- };
4
- declare function createTaskAtViewportCenter(): Promise<void>;
5
- declare function createTriggerAtViewportCenter(triggerId: string): Promise<void>;
6
- declare const _default: import('vue').DefineComponent<__VLS_Props, {
7
- createTaskAtViewportCenter: typeof createTaskAtViewportCenter;
8
- createTriggerAtViewportCenter: typeof createTriggerAtViewportCenter;
9
- }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
- editTask: (...args: any[]) => void;
11
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
12
- onEditTask?: ((...args: any[]) => any) | undefined;
13
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
14
- containerEl: HTMLDivElement;
15
- }, HTMLDivElement>;
16
- export default _default;
@@ -1,103 +0,0 @@
1
- import { AntConnect, Event, Notepad, TableQueryShort, Task } from '@antcde/connect-ts';
2
- import { Ref } from 'vue';
3
- export declare function useTaskFlow(antConnect: AntConnect, notepad: Notepad): {
4
- showTask: (taskId: string) => PromiseLike<boolean>;
5
- setHighlightedNode: (taskId: string) => Promise<unknown>;
6
- flowParent: Ref<Task | null, Task | null>;
7
- flowNodes: Ref<TaskFlowNode[], TaskFlowNode[]>;
8
- flowEdges: Ref<TaskFlowEdge[], TaskFlowEdge[]>;
9
- highlightedNodeId: Ref<string | null, string | null>;
10
- projectQueries: Ref<TableQueryShort[], TableQueryShort[]>;
11
- isAutoRefreshEnabled: Ref<boolean, boolean>;
12
- fetchFlowParent: (taskId: string) => Promise<boolean>;
13
- updateFlowParent: (title: string) => Promise<void>;
14
- deleteFlowParent: () => Promise<void>;
15
- toggleLockFlowParent: (is_locked: boolean) => Promise<void>;
16
- fetchFlowNodesAndEdges: () => Promise<void>;
17
- createNode: (position?: {
18
- x: number;
19
- y: number;
20
- }) => Promise<string | null>;
21
- updateNode: (data: {
22
- id: string;
23
- position_x: number;
24
- position_y: number;
25
- }) => Promise<void>;
26
- deleteNode: (nodeId: string) => Promise<void>;
27
- createEdge: (source: string, target: string, type: "BLOCKED_BY" | "NON_BLOCKING") => Promise<void>;
28
- deleteEdge: (edgeId: string) => Promise<void>;
29
- createTriggerNode: (triggerId: string, position?: {
30
- x: number;
31
- y: number;
32
- }) => Promise<string | null>;
33
- addRelationQuery: (edgeId: string, queryId: string) => Promise<void>;
34
- deleteRelationQuery: (edgeId: string, queryId: string) => Promise<void>;
35
- setEdgeRelationType: (edgeId: string, newType: "BLOCKED_BY" | "NON_BLOCKING") => Promise<void>;
36
- addTaskRelationQueryApi: import('@antcde/vue-utils').UseApiReturn<import('@antcde/connect-ts').TableQuery | null, [taskId: string, relationId: string, queryId: string], true>;
37
- deleteTaskRelationQueryApi: import('@antcde/vue-utils').UseApiReturn<{
38
- id: string;
39
- } | null, [taskId: string, relationId: string, queryId: string], true>;
40
- deleteFlowParentApi: import('@antcde/vue-utils').UseApiReturn<import('@antcde/connect-ts').MessageResponse | null, [taskId: string, method: string], true>;
41
- getFlowNodesApi: import('@antcde/vue-utils').UseApiReturn<import('@antcde/connect-ts/services/TaskService').GetTasksResponse<Task> | null, [licenseId: string, query?: string | undefined], true>;
42
- deletedFlowId: Ref<string | null, string | null>;
43
- updateFlowTask: (task: Task) => void;
44
- enableAutoRefresh: () => void;
45
- disableAutoRefresh: () => void;
46
- };
47
- export interface TaskFlowNode {
48
- id: string;
49
- type: string;
50
- data: {
51
- status: string;
52
- title: string;
53
- description?: string;
54
- progress: number;
55
- script?: string;
56
- isLocked: boolean;
57
- app?: {
58
- title: string;
59
- color: string;
60
- icon: string;
61
- } | null;
62
- assigned_to: string | {
63
- id: string;
64
- firstname: string;
65
- lastname: string;
66
- email: string;
67
- } | null;
68
- trigger?: {
69
- id: string;
70
- name: string;
71
- is_active: boolean;
72
- close_task_after_execution: boolean;
73
- event: Pick<Event, 'id' | 'name' | 'code' | 'description'>;
74
- };
75
- trigger_id?: string;
76
- isTriggerTask?: boolean;
77
- };
78
- draggable: boolean;
79
- position: {
80
- x: number;
81
- y: number;
82
- };
83
- isLoading: boolean;
84
- }
85
- export interface TaskFlowEdge {
86
- id: string;
87
- source: string;
88
- target: string;
89
- type: string;
90
- sourceHandle: string;
91
- data: {
92
- relationType: 'BLOCKED_BY' | 'NON_BLOCKING';
93
- queries: TaskFlowQuery[];
94
- };
95
- }
96
- export interface TaskFlowQuery {
97
- id: string;
98
- name: string;
99
- }
100
- type TaskFlowStore = ReturnType<typeof useTaskFlow>;
101
- export declare function provideTaskFlow(instance: TaskFlowStore): TaskFlowStore;
102
- export declare function injectTaskFlow(): TaskFlowStore;
103
- export {};