@agile-team/mach-table-vue 0.4.0 → 0.5.0
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 +57 -5
- package/dist/RobotGrid-2KWWM4C4.js +7 -0
- package/dist/RobotGrid-2KWWM4C4.js.map +1 -0
- package/dist/RobotGrid-LELHEO4W.cjs +7 -0
- package/dist/RobotGrid-LELHEO4W.cjs.map +1 -0
- package/dist/async.cjs +23 -0
- package/dist/async.cjs.map +1 -0
- package/dist/async.d.cts +21 -0
- package/dist/async.d.ts +21 -0
- package/dist/async.js +23 -0
- package/dist/async.js.map +1 -0
- package/dist/chunk-345ZEGIE.cjs +21 -0
- package/dist/chunk-345ZEGIE.cjs.map +1 -0
- package/dist/chunk-CHEQLQW4.js +78 -0
- package/dist/chunk-CHEQLQW4.js.map +1 -0
- package/dist/chunk-JJQDDIQU.js +21 -0
- package/dist/chunk-JJQDDIQU.js.map +1 -0
- package/dist/chunk-S3NR7DIG.cjs +78 -0
- package/dist/chunk-S3NR7DIG.cjs.map +1 -0
- package/dist/globalRegistration-CQ2dTNzy.d.cts +25 -0
- package/dist/globalRegistration-CQ2dTNzy.d.ts +25 -0
- package/dist/index.cjs +36 -122
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -11
- package/dist/index.d.ts +9 -11
- package/dist/index.js +20 -79
- package/dist/index.js.map +1 -1
- package/dist/mach-table.css +1384 -0
- package/dist/mach-table.css.d.ts +2 -0
- package/package.json +28 -7
package/README.md
CHANGED
|
@@ -6,16 +6,28 @@
|
|
|
6
6
|
|
|
7
7
|
Official Vue 3 adapter for MachTable. It provides `<MachTable>` / `<RobotGrid>`, `useMachTable`, Vue cell/detail renderer factories, reactive option updates and automatic lifecycle cleanup.
|
|
8
8
|
|
|
9
|
+
## Install
|
|
10
|
+
|
|
9
11
|
```bash
|
|
10
|
-
pnpm add @agile-team/mach-table
|
|
12
|
+
pnpm add @agile-team/mach-table-vue
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Import the stylesheet once from your application entry:
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import "@agile-team/mach-table-vue/styles.css";
|
|
11
19
|
```
|
|
12
20
|
|
|
21
|
+
## Integration modes
|
|
22
|
+
|
|
23
|
+
### Local, route-level import
|
|
24
|
+
|
|
25
|
+
Best when only a few routes use a grid. A lazy-loaded route naturally keeps MachTable in that route's chunk.
|
|
26
|
+
|
|
13
27
|
```vue
|
|
14
28
|
<script setup lang="ts">
|
|
15
29
|
import { ref } from "vue";
|
|
16
|
-
import { MachTable, useMachTable } from "@agile-team/mach-table-vue";
|
|
17
|
-
import type { ColDef } from "@agile-team/mach-table";
|
|
18
|
-
import "@agile-team/mach-table/styles/mach-table.css";
|
|
30
|
+
import { MachTable, useMachTable, type ColDef } from "@agile-team/mach-table-vue";
|
|
19
31
|
|
|
20
32
|
interface Row { id: string; name: string }
|
|
21
33
|
const grid = useMachTable<Row>();
|
|
@@ -36,7 +48,47 @@ const columns: ColDef<Row>[] = [{ field: "name", headerName: "Name", flex: 1 }];
|
|
|
36
48
|
</template>
|
|
37
49
|
```
|
|
38
50
|
|
|
39
|
-
|
|
51
|
+
### Global synchronous plugin
|
|
52
|
+
|
|
53
|
+
Best when most screens render tables. Components are available in every template without page-level runtime imports.
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
// main.ts
|
|
57
|
+
import { createApp } from "vue";
|
|
58
|
+
import { MachTablePlugin } from "@agile-team/mach-table-vue";
|
|
59
|
+
import "@agile-team/mach-table-vue/styles.css";
|
|
60
|
+
import App from "./App.vue";
|
|
61
|
+
|
|
62
|
+
createApp(App).use(MachTablePlugin).mount("#app");
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Global async plugin
|
|
66
|
+
|
|
67
|
+
Best for large admin or low-code applications. The plugin is registered at startup, while the component and Core stay in a separate chunk until the first `<MachTable>` is rendered.
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
// main.ts
|
|
71
|
+
import { createApp } from "vue";
|
|
72
|
+
import AsyncMachTablePlugin, { preloadMachTable } from "@agile-team/mach-table-vue/async";
|
|
73
|
+
import "@agile-team/mach-table-vue/styles.css";
|
|
74
|
+
import App from "./App.vue";
|
|
75
|
+
|
|
76
|
+
createApp(App).use(AsyncMachTablePlugin).mount("#app");
|
|
77
|
+
|
|
78
|
+
// Optional route-hover prefetch; dynamic imports are cached and idempotent.
|
|
79
|
+
void preloadMachTable();
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
After either global plugin is installed, pages can use `<MachTable>` or `<RobotGrid>` directly. Global component types are included for Volar and `vue-tsc`. A custom name and legacy alias policy are also supported:
|
|
83
|
+
|
|
84
|
+
```ts
|
|
85
|
+
app.use(MachTablePlugin, {
|
|
86
|
+
componentName: "BusinessTable",
|
|
87
|
+
registerRobotGridAlias: false
|
|
88
|
+
});
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The adapter installs the matching `@agile-team/mach-table` core automatically and re-exports its complete API and types. Only `vue >= 3.2` remains a peer dependency supplied by the host application. Existing local imports remain fully supported.
|
|
40
92
|
|
|
41
93
|
Documentation: [Vue guide](https://github.com/ChenyCHENYU/MachTable/blob/main/docs/guide/vue.md) · [Enterprise integration](https://github.com/ChenyCHENYU/MachTable/blob/main/docs/guide/enterprise-integration.md) · [Element Plus](https://github.com/ChenyCHENYU/MachTable/blob/main/docs/guide/element-plus.md) · [Naive UI](https://github.com/ChenyCHENYU/MachTable/blob/main/docs/guide/naive-ui.md)
|
|
42
94
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["d:\\office-project\\wl\\MachTable\\packages\\vue\\dist\\RobotGrid-LELHEO4W.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,gDAAC","file":"D:\\office-project\\wl\\MachTable\\packages\\vue\\dist\\RobotGrid-LELHEO4W.cjs"}
|
package/dist/async.cjs
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }
|
|
2
|
+
|
|
3
|
+
var _chunk345ZEGIEcjs = require('./chunk-345ZEGIE.cjs');
|
|
4
|
+
|
|
5
|
+
// src/async.ts
|
|
6
|
+
var _vue = require('vue');
|
|
7
|
+
var preloadMachTable = () => Promise.resolve().then(() => _interopRequireWildcard(require("./RobotGrid-LELHEO4W.cjs"))).then(({ RobotGrid }) => RobotGrid);
|
|
8
|
+
var AsyncMachTable = _vue.defineAsyncComponent.call(void 0, {
|
|
9
|
+
loader: preloadMachTable
|
|
10
|
+
});
|
|
11
|
+
var AsyncMachTablePlugin = Object.freeze({
|
|
12
|
+
install(app, options = {}) {
|
|
13
|
+
_chunk345ZEGIEcjs.registerGlobalMachTable.call(void 0, app, AsyncMachTable, options);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
var async_default = AsyncMachTablePlugin;
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
exports.AsyncMachTable = AsyncMachTable; exports.AsyncMachTablePlugin = AsyncMachTablePlugin; exports.default = async_default; exports.preloadMachTable = preloadMachTable;
|
|
23
|
+
//# sourceMappingURL=async.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["d:\\office-project\\wl\\MachTable\\packages\\vue\\dist\\async.cjs"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;AACA,0BAA0C;AAC1C,IAAI,iBAAiB,EAAE,CAAC,EAAE,GAAG,4DAAM,CAAC,0BAA0B,GAAC,CAAC,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,EAAE,GAAG,SAAS,CAAC;AAClG,IAAI,eAAe,EAAE,uCAAoB;AACzC,EAAE,MAAM,EAAE;AACV,CAAC,CAAC;AACF,IAAI,qBAAqB,EAAE,MAAM,CAAC,MAAM,CAAC;AACzC,EAAE,OAAO,CAAC,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE;AAC7B,IAAI,uDAAuB,GAAI,EAAE,cAAc,EAAE,OAAO,CAAC;AACzD,EAAE;AACF,CAAC,CAAC;AACF,IAAI,cAAc,EAAE,oBAAoB;AACxC;AACE;AACA;AACA;AACA;AACF,2KAAC","file":"D:\\office-project\\wl\\MachTable\\packages\\vue\\dist\\async.cjs","sourcesContent":[null]}
|
package/dist/async.d.cts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { App } from 'vue';
|
|
3
|
+
import { R as RobotGridVueProps, M as MachTablePluginOptions } from './globalRegistration-CQ2dTNzy.cjs';
|
|
4
|
+
import '@agile-team/mach-table';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Starts loading the Vue adapter ahead of first render. The browser and bundler
|
|
8
|
+
* cache the promise, so calling this on route hover is safe and idempotent.
|
|
9
|
+
*/
|
|
10
|
+
declare const preloadMachTable: () => Promise<vue.DefineComponent<RobotGridVueProps<any>>>;
|
|
11
|
+
/** Async global component used by AsyncMachTablePlugin. */
|
|
12
|
+
declare const AsyncMachTable: vue.DefineComponent<RobotGridVueProps<any>>;
|
|
13
|
+
/**
|
|
14
|
+
* Registers `<MachTable>` globally while keeping the component and Core in a
|
|
15
|
+
* separate chunk until the first table is rendered.
|
|
16
|
+
*/
|
|
17
|
+
declare const AsyncMachTablePlugin: Readonly<{
|
|
18
|
+
install(app: App, options?: MachTablePluginOptions): void;
|
|
19
|
+
}>;
|
|
20
|
+
|
|
21
|
+
export { AsyncMachTable, AsyncMachTablePlugin, MachTablePluginOptions, AsyncMachTablePlugin as default, preloadMachTable };
|
package/dist/async.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { App } from 'vue';
|
|
3
|
+
import { R as RobotGridVueProps, M as MachTablePluginOptions } from './globalRegistration-CQ2dTNzy.js';
|
|
4
|
+
import '@agile-team/mach-table';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Starts loading the Vue adapter ahead of first render. The browser and bundler
|
|
8
|
+
* cache the promise, so calling this on route hover is safe and idempotent.
|
|
9
|
+
*/
|
|
10
|
+
declare const preloadMachTable: () => Promise<vue.DefineComponent<RobotGridVueProps<any>>>;
|
|
11
|
+
/** Async global component used by AsyncMachTablePlugin. */
|
|
12
|
+
declare const AsyncMachTable: vue.DefineComponent<RobotGridVueProps<any>>;
|
|
13
|
+
/**
|
|
14
|
+
* Registers `<MachTable>` globally while keeping the component and Core in a
|
|
15
|
+
* separate chunk until the first table is rendered.
|
|
16
|
+
*/
|
|
17
|
+
declare const AsyncMachTablePlugin: Readonly<{
|
|
18
|
+
install(app: App, options?: MachTablePluginOptions): void;
|
|
19
|
+
}>;
|
|
20
|
+
|
|
21
|
+
export { AsyncMachTable, AsyncMachTablePlugin, MachTablePluginOptions, AsyncMachTablePlugin as default, preloadMachTable };
|
package/dist/async.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
registerGlobalMachTable
|
|
3
|
+
} from "./chunk-JJQDDIQU.js";
|
|
4
|
+
|
|
5
|
+
// src/async.ts
|
|
6
|
+
import { defineAsyncComponent } from "vue";
|
|
7
|
+
var preloadMachTable = () => import("./RobotGrid-2KWWM4C4.js").then(({ RobotGrid }) => RobotGrid);
|
|
8
|
+
var AsyncMachTable = defineAsyncComponent({
|
|
9
|
+
loader: preloadMachTable
|
|
10
|
+
});
|
|
11
|
+
var AsyncMachTablePlugin = Object.freeze({
|
|
12
|
+
install(app, options = {}) {
|
|
13
|
+
registerGlobalMachTable(app, AsyncMachTable, options);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
var async_default = AsyncMachTablePlugin;
|
|
17
|
+
export {
|
|
18
|
+
AsyncMachTable,
|
|
19
|
+
AsyncMachTablePlugin,
|
|
20
|
+
async_default as default,
|
|
21
|
+
preloadMachTable
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=async.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/async.ts"],"sourcesContent":["import { defineAsyncComponent, type App } from \"vue\";\nimport { registerGlobalMachTable, type MachTablePluginOptions } from \"./globalRegistration\";\n\n/**\n * Starts loading the Vue adapter ahead of first render. The browser and bundler\n * cache the promise, so calling this on route hover is safe and idempotent.\n */\nexport const preloadMachTable = () => import(\"./RobotGrid\").then(({ RobotGrid }) => RobotGrid);\n\n/** Async global component used by AsyncMachTablePlugin. */\nexport const AsyncMachTable = defineAsyncComponent({\n loader: preloadMachTable\n});\n\n/**\n * Registers `<MachTable>` globally while keeping the component and Core in a\n * separate chunk until the first table is rendered.\n */\nexport const AsyncMachTablePlugin = Object.freeze({\n install(app: App, options: MachTablePluginOptions = {}): void {\n registerGlobalMachTable(app, AsyncMachTable, options);\n }\n});\n\nexport type { MachTablePluginOptions } from \"./globalRegistration\";\nexport default AsyncMachTablePlugin;\n"],"mappings":";;;;;AAAA,SAAS,4BAAsC;AAOxC,IAAM,mBAAmB,MAAM,OAAO,yBAAa,EAAE,KAAK,CAAC,EAAE,UAAU,MAAM,SAAS;AAGtF,IAAM,iBAAiB,qBAAqB;AAAA,EACjD,QAAQ;AACV,CAAC;AAMM,IAAM,uBAAuB,OAAO,OAAO;AAAA,EAChD,QAAQ,KAAU,UAAkC,CAAC,GAAS;AAC5D,4BAAwB,KAAK,gBAAgB,OAAO;AAAA,EACtD;AACF,CAAC;AAGD,IAAO,gBAAQ;","names":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }// src/globalRegistration.ts
|
|
2
|
+
function registerGlobalMachTable(app, component, options = {}) {
|
|
3
|
+
const componentName = _nullishCoalesce(options.componentName, () => ( "MachTable"));
|
|
4
|
+
if (!componentName.trim()) {
|
|
5
|
+
throw new Error("[MachTable] Global componentName must not be empty.");
|
|
6
|
+
}
|
|
7
|
+
const names = /* @__PURE__ */ new Set([componentName]);
|
|
8
|
+
if (options.registerRobotGridAlias !== false) names.add("RobotGrid");
|
|
9
|
+
for (const name of names) {
|
|
10
|
+
const existing = app.component(name);
|
|
11
|
+
if (existing && existing !== component) {
|
|
12
|
+
throw new Error(`[MachTable] Cannot register global component "${name}" because that name is already in use.`);
|
|
13
|
+
}
|
|
14
|
+
if (!existing) app.component(name, component);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
exports.registerGlobalMachTable = registerGlobalMachTable;
|
|
21
|
+
//# sourceMappingURL=chunk-345ZEGIE.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["d:\\office-project\\wl\\MachTable\\packages\\vue\\dist\\chunk-345ZEGIE.cjs"],"names":[],"mappings":"AAAA;AACA,SAAS,uBAAuB,CAAC,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE;AAC/D,EAAE,MAAM,cAAc,mBAAE,OAAO,CAAC,aAAc,UAAG,aAAW;AAC5D,EAAE,GAAG,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,EAAE;AAC7B,IAAI,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC;AAC1E,EAAE;AACF,EAAE,MAAM,MAAM,kBAAkB,IAAI,GAAG,CAAC,CAAC,aAAa,CAAC,CAAC;AACxD,EAAE,GAAG,CAAC,OAAO,CAAC,uBAAuB,IAAI,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC;AACtE,EAAE,IAAI,CAAC,MAAM,KAAK,GAAG,KAAK,EAAE;AAC5B,IAAI,MAAM,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC;AACxC,IAAI,GAAG,CAAC,SAAS,GAAG,SAAS,IAAI,SAAS,EAAE;AAC5C,MAAM,MAAM,IAAI,KAAK,CAAC,CAAC,8CAA8C,EAAE,IAAI,CAAC,sCAAsC,CAAC,CAAC;AACpH,IAAI;AACJ,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC;AACjD,EAAE;AACF;AACA;AACA;AACE;AACF,0DAAC","file":"D:\\office-project\\wl\\MachTable\\packages\\vue\\dist\\chunk-345ZEGIE.cjs","sourcesContent":[null]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// src/RobotGrid.ts
|
|
2
|
+
import { defineComponent, h, onBeforeUnmount, onMounted, ref, watch } from "vue";
|
|
3
|
+
import {
|
|
4
|
+
createGrid,
|
|
5
|
+
DIRECT_GRID_OPTION_KEYS,
|
|
6
|
+
EVENT_TYPES,
|
|
7
|
+
GRID_OPTION_KEYS,
|
|
8
|
+
GRID_OPTION_META
|
|
9
|
+
} from "@agile-team/mach-table";
|
|
10
|
+
var ADAPTER_OPTION_KEYS = GRID_OPTION_KEYS.filter((key) => key !== "className");
|
|
11
|
+
var DIRECT_OPTION_KEYS = DIRECT_GRID_OPTION_KEYS.filter((key) => key !== "className");
|
|
12
|
+
var runtimeProps = {};
|
|
13
|
+
for (const key of ADAPTER_OPTION_KEYS) {
|
|
14
|
+
const kind = GRID_OPTION_META[key].kind;
|
|
15
|
+
const type = kind === "boolean" ? Boolean : kind === "number" ? Number : kind === "array" ? Array : kind === "function" ? Function : kind === "boolean-object" ? [Boolean, Object] : kind === "object" ? Object : kind === "string" ? String : void 0;
|
|
16
|
+
runtimeProps[key] = { ...type ? { type } : {}, default: void 0 };
|
|
17
|
+
}
|
|
18
|
+
runtimeProps.className = { type: String, default: void 0 };
|
|
19
|
+
runtimeProps.gridClassName = { type: String, default: void 0 };
|
|
20
|
+
function handlerNameOf(eventType) {
|
|
21
|
+
return "on" + eventType.charAt(0).toUpperCase() + eventType.slice(1);
|
|
22
|
+
}
|
|
23
|
+
var RobotGridImpl = defineComponent({
|
|
24
|
+
name: "RobotGrid",
|
|
25
|
+
inheritAttrs: false,
|
|
26
|
+
props: runtimeProps,
|
|
27
|
+
emits: [...EVENT_TYPES],
|
|
28
|
+
setup(rawProps, { expose, attrs, emit }) {
|
|
29
|
+
const props = rawProps;
|
|
30
|
+
const host = ref(null);
|
|
31
|
+
let api = null;
|
|
32
|
+
onMounted(() => {
|
|
33
|
+
if (!host.value) return;
|
|
34
|
+
const options = {};
|
|
35
|
+
for (const key of ADAPTER_OPTION_KEYS) {
|
|
36
|
+
const value = props[key];
|
|
37
|
+
if (value !== void 0) options[key] = value;
|
|
38
|
+
}
|
|
39
|
+
if (props.gridClassName !== void 0) options.className = props.gridClassName;
|
|
40
|
+
for (const type of EVENT_TYPES) {
|
|
41
|
+
options[handlerNameOf(type)] = (event) => emit(type, event);
|
|
42
|
+
}
|
|
43
|
+
api = createGrid(host.value, options);
|
|
44
|
+
});
|
|
45
|
+
onBeforeUnmount(() => {
|
|
46
|
+
api?.destroy();
|
|
47
|
+
api = null;
|
|
48
|
+
});
|
|
49
|
+
watch(() => props.rowData, (value) => api?.setRowData(value));
|
|
50
|
+
watch(() => props.columnDefs, (value) => api?.setColumnDefs(value));
|
|
51
|
+
watch(() => props.quickFilterText, (value) => api?.setQuickFilter(value));
|
|
52
|
+
watch(() => props.gridClassName, (value) => api?.updateOptions({ className: value }));
|
|
53
|
+
watch(
|
|
54
|
+
() => DIRECT_OPTION_KEYS.map((key) => props[key]),
|
|
55
|
+
(values, previous) => {
|
|
56
|
+
if (!api) return;
|
|
57
|
+
const changed = {};
|
|
58
|
+
values.forEach((value, index) => {
|
|
59
|
+
if (!Object.is(value, previous[index])) changed[DIRECT_OPTION_KEYS[index]] = value;
|
|
60
|
+
});
|
|
61
|
+
if (Object.keys(changed).length > 0) api.updateOptions(changed);
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
expose({ getApi: () => api });
|
|
65
|
+
return () => h("div", {
|
|
66
|
+
...attrs,
|
|
67
|
+
ref: host,
|
|
68
|
+
class: ["mach-vue-host", props.className, attrs.class].filter(Boolean),
|
|
69
|
+
style: attrs.style
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
var RobotGrid = RobotGridImpl;
|
|
74
|
+
|
|
75
|
+
export {
|
|
76
|
+
RobotGrid
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=chunk-CHEQLQW4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/RobotGrid.ts"],"sourcesContent":["import { defineComponent, h, onBeforeUnmount, onMounted, ref, watch, type DefineComponent } from \"vue\";\nimport {\n createGrid,\n DIRECT_GRID_OPTION_KEYS,\n EVENT_TYPES,\n GRID_OPTION_KEYS,\n GRID_OPTION_META\n} from \"@agile-team/mach-table\";\nimport type { GridApi, GridOptions } from \"@agile-team/mach-table\";\n\nexport type RobotGridVueProps<TData = any> = Omit<GridOptions<TData>, \"className\"> & {\n /** CSS class applied to the Vue host element. */\n className?: string;\n /** CSS class forwarded to MachTable's inner grid root. */\n gridClassName?: string;\n};\n\nconst ADAPTER_OPTION_KEYS = GRID_OPTION_KEYS.filter((key) => key !== \"className\");\nconst DIRECT_OPTION_KEYS = DIRECT_GRID_OPTION_KEYS.filter((key) => key !== \"className\");\n\nconst runtimeProps: Record<string, { type?: any; default: undefined }> = {};\nfor (const key of ADAPTER_OPTION_KEYS) {\n const kind = GRID_OPTION_META[key].kind;\n const type = kind === \"boolean\"\n ? Boolean\n : kind === \"number\"\n ? Number\n : kind === \"array\"\n ? Array\n : kind === \"function\"\n ? Function\n : kind === \"boolean-object\"\n ? [Boolean, Object]\n : kind === \"object\"\n ? Object\n : kind === \"string\"\n ? String\n : undefined;\n runtimeProps[key] = { ...(type ? { type } : {}), default: undefined };\n}\nruntimeProps.className = { type: String, default: undefined };\nruntimeProps.gridClassName = { type: String, default: undefined };\n\nfunction handlerNameOf(eventType: string): string {\n return \"on\" + eventType.charAt(0).toUpperCase() + eventType.slice(1);\n}\n\nconst RobotGridImpl = defineComponent({\n name: \"RobotGrid\",\n inheritAttrs: false,\n props: runtimeProps,\n emits: [...EVENT_TYPES] as unknown as string[],\n setup(rawProps, { expose, attrs, emit }) {\n const props = rawProps as Readonly<Record<string, any>>;\n const host = ref<HTMLDivElement | null>(null);\n let api: GridApi | null = null;\n\n onMounted(() => {\n if (!host.value) return;\n const options: Record<string, unknown> = {};\n for (const key of ADAPTER_OPTION_KEYS) {\n const value = props[key];\n if (value !== undefined) options[key] = value;\n }\n if (props.gridClassName !== undefined) options.className = props.gridClassName;\n for (const type of EVENT_TYPES) {\n options[handlerNameOf(type)] = (event: unknown) => emit(type, event);\n }\n api = createGrid(host.value, options as GridOptions<any>);\n });\n\n onBeforeUnmount(() => {\n api?.destroy();\n api = null;\n });\n\n watch(() => props.rowData, (value) => api?.setRowData(value));\n watch(() => props.columnDefs, (value) => api?.setColumnDefs(value));\n watch(() => props.quickFilterText, (value) => api?.setQuickFilter(value));\n watch(() => props.gridClassName, (value) => api?.updateOptions({ className: value }));\n\n watch(\n () => DIRECT_OPTION_KEYS.map((key) => props[key]),\n (values, previous) => {\n if (!api) return;\n const changed: Record<string, unknown> = {};\n values.forEach((value, index) => {\n if (!Object.is(value, previous[index])) changed[DIRECT_OPTION_KEYS[index]] = value;\n });\n if (Object.keys(changed).length > 0) api.updateOptions(changed as Partial<GridOptions<any>>);\n }\n );\n\n expose({ getApi: (): GridApi | null => api });\n\n return () => h(\"div\", {\n ...attrs,\n ref: host,\n class: [\"mach-vue-host\", props.className, attrs.class].filter(Boolean),\n style: attrs.style\n });\n }\n});\n\nexport const RobotGrid = RobotGridImpl as unknown as DefineComponent<RobotGridVueProps<any>>;\n"],"mappings":";AAAA,SAAS,iBAAiB,GAAG,iBAAiB,WAAW,KAAK,aAAmC;AACjG;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAUP,IAAM,sBAAsB,iBAAiB,OAAO,CAAC,QAAQ,QAAQ,WAAW;AAChF,IAAM,qBAAqB,wBAAwB,OAAO,CAAC,QAAQ,QAAQ,WAAW;AAEtF,IAAM,eAAmE,CAAC;AAC1E,WAAW,OAAO,qBAAqB;AACrC,QAAM,OAAO,iBAAiB,GAAG,EAAE;AACnC,QAAM,OAAO,SAAS,YAClB,UACA,SAAS,WACP,SACA,SAAS,UACP,QACA,SAAS,aACP,WACA,SAAS,mBACP,CAAC,SAAS,MAAM,IAChB,SAAS,WACP,SACA,SAAS,WACP,SACA;AAChB,eAAa,GAAG,IAAI,EAAE,GAAI,OAAO,EAAE,KAAK,IAAI,CAAC,GAAI,SAAS,OAAU;AACtE;AACA,aAAa,YAAY,EAAE,MAAM,QAAQ,SAAS,OAAU;AAC5D,aAAa,gBAAgB,EAAE,MAAM,QAAQ,SAAS,OAAU;AAEhE,SAAS,cAAc,WAA2B;AAChD,SAAO,OAAO,UAAU,OAAO,CAAC,EAAE,YAAY,IAAI,UAAU,MAAM,CAAC;AACrE;AAEA,IAAM,gBAAgB,gBAAgB;AAAA,EACpC,MAAM;AAAA,EACN,cAAc;AAAA,EACd,OAAO;AAAA,EACP,OAAO,CAAC,GAAG,WAAW;AAAA,EACtB,MAAM,UAAU,EAAE,QAAQ,OAAO,KAAK,GAAG;AACvC,UAAM,QAAQ;AACd,UAAM,OAAO,IAA2B,IAAI;AAC5C,QAAI,MAAsB;AAE1B,cAAU,MAAM;AACd,UAAI,CAAC,KAAK,MAAO;AACjB,YAAM,UAAmC,CAAC;AAC1C,iBAAW,OAAO,qBAAqB;AACrC,cAAM,QA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O,MAAM;AAAA,IACf,CAAC;AAAA,EACH;AACF,CAAC;AAEM,IAAM,YAAY;","names":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/globalRegistration.ts
|
|
2
|
+
function registerGlobalMachTable(app, component, options = {}) {
|
|
3
|
+
const componentName = options.componentName ?? "MachTable";
|
|
4
|
+
if (!componentName.trim()) {
|
|
5
|
+
throw new Error("[MachTable] Global componentName must not be empty.");
|
|
6
|
+
}
|
|
7
|
+
const names = /* @__PURE__ */ new Set([componentName]);
|
|
8
|
+
if (options.registerRobotGridAlias !== false) names.add("RobotGrid");
|
|
9
|
+
for (const name of names) {
|
|
10
|
+
const existing = app.component(name);
|
|
11
|
+
if (existing && existing !== component) {
|
|
12
|
+
throw new Error(`[MachTable] Cannot register global component "${name}" because that name is already in use.`);
|
|
13
|
+
}
|
|
14
|
+
if (!existing) app.component(name, component);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
registerGlobalMachTable
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=chunk-JJQDDIQU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/globalRegistration.ts"],"sourcesContent":["import type { App, Component } from \"vue\";\nimport type { RobotGrid } from \"./RobotGrid\";\n\ndeclare module \"vue\" {\n export interface GlobalComponents {\n MachTable: typeof RobotGrid;\n RobotGrid: typeof RobotGrid;\n }\n}\n\nexport interface MachTablePluginOptions {\n /** Global component name. Defaults to `MachTable`. */\n componentName?: string;\n /** Also register the backwards-compatible `RobotGrid` name. Defaults to true. */\n registerRobotGridAlias?: boolean;\n}\n\nexport function registerGlobalMachTable(\n app: App,\n component: Component,\n options: MachTablePluginOptions = {}\n): void {\n const componentName = options.componentName ?? \"MachTable\";\n if (!componentName.trim()) {\n throw new Error(\"[MachTable] Global componentName must not be empty.\");\n }\n\n const names = new Set([componentName]);\n if (options.registerRobotGridAlias !== false) names.add(\"RobotGrid\");\n\n for (const name of names) {\n const existing = app.component(name);\n if (existing && existing !== component) {\n throw new Error(`[MachTable] Cannot register global component \\\"${name}\\\" because that name is already in use.`);\n }\n if (!existing) app.component(name, component);\n }\n}\n"],"mappings":";AAiBO,SAAS,wBACd,KACA,WACA,UAAkC,CAAC,GAC7B;AACN,QAAM,gBAAgB,QAAQ,iBAAiB;AAC/C,MAAI,CAAC,cAAc,KAAK,GAAG;AACzB,UAAM,IAAI,MAAM,qDAAqD;AAAA,EACvE;AAEA,QAAM,QAAQ,oBAAI,IAAI,CAAC,aAAa,CAAC;AACrC,MAAI,QAAQ,2BAA2B,MAAO,OAAM,IAAI,WAAW;AAEnE,aAAW,QAAQ,OAAO;AACxB,UAAM,WAAW,IAAI,UAAU,IAAI;AACnC,QAAI,YAAY,aAAa,WAAW;AACtC,YAAM,IAAI,MAAM,iDAAkD,IAAI,wCAAyC;AAAA,IACjH;AACA,QAAI,CAAC,SAAU,KAAI,UAAU,MAAM,SAAS;AAAA,EAC9C;AACF;","names":[]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/RobotGrid.ts
|
|
2
|
+
var _vue = require('vue');
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _machtable = require('@agile-team/mach-table');
|
|
10
|
+
var ADAPTER_OPTION_KEYS = _machtable.GRID_OPTION_KEYS.filter((key) => key !== "className");
|
|
11
|
+
var DIRECT_OPTION_KEYS = _machtable.DIRECT_GRID_OPTION_KEYS.filter((key) => key !== "className");
|
|
12
|
+
var runtimeProps = {};
|
|
13
|
+
for (const key of ADAPTER_OPTION_KEYS) {
|
|
14
|
+
const kind = _machtable.GRID_OPTION_META[key].kind;
|
|
15
|
+
const type = kind === "boolean" ? Boolean : kind === "number" ? Number : kind === "array" ? Array : kind === "function" ? Function : kind === "boolean-object" ? [Boolean, Object] : kind === "object" ? Object : kind === "string" ? String : void 0;
|
|
16
|
+
runtimeProps[key] = { ...type ? { type } : {}, default: void 0 };
|
|
17
|
+
}
|
|
18
|
+
runtimeProps.className = { type: String, default: void 0 };
|
|
19
|
+
runtimeProps.gridClassName = { type: String, default: void 0 };
|
|
20
|
+
function handlerNameOf(eventType) {
|
|
21
|
+
return "on" + eventType.charAt(0).toUpperCase() + eventType.slice(1);
|
|
22
|
+
}
|
|
23
|
+
var RobotGridImpl = _vue.defineComponent.call(void 0, {
|
|
24
|
+
name: "RobotGrid",
|
|
25
|
+
inheritAttrs: false,
|
|
26
|
+
props: runtimeProps,
|
|
27
|
+
emits: [..._machtable.EVENT_TYPES],
|
|
28
|
+
setup(rawProps, { expose, attrs, emit }) {
|
|
29
|
+
const props = rawProps;
|
|
30
|
+
const host = _vue.ref.call(void 0, null);
|
|
31
|
+
let api = null;
|
|
32
|
+
_vue.onMounted.call(void 0, () => {
|
|
33
|
+
if (!host.value) return;
|
|
34
|
+
const options = {};
|
|
35
|
+
for (const key of ADAPTER_OPTION_KEYS) {
|
|
36
|
+
const value = props[key];
|
|
37
|
+
if (value !== void 0) options[key] = value;
|
|
38
|
+
}
|
|
39
|
+
if (props.gridClassName !== void 0) options.className = props.gridClassName;
|
|
40
|
+
for (const type of _machtable.EVENT_TYPES) {
|
|
41
|
+
options[handlerNameOf(type)] = (event) => emit(type, event);
|
|
42
|
+
}
|
|
43
|
+
api = _machtable.createGrid.call(void 0, host.value, options);
|
|
44
|
+
});
|
|
45
|
+
_vue.onBeforeUnmount.call(void 0, () => {
|
|
46
|
+
_optionalChain([api, 'optionalAccess', _ => _.destroy, 'call', _2 => _2()]);
|
|
47
|
+
api = null;
|
|
48
|
+
});
|
|
49
|
+
_vue.watch.call(void 0, () => props.rowData, (value) => _optionalChain([api, 'optionalAccess', _3 => _3.setRowData, 'call', _4 => _4(value)]));
|
|
50
|
+
_vue.watch.call(void 0, () => props.columnDefs, (value) => _optionalChain([api, 'optionalAccess', _5 => _5.setColumnDefs, 'call', _6 => _6(value)]));
|
|
51
|
+
_vue.watch.call(void 0, () => props.quickFilterText, (value) => _optionalChain([api, 'optionalAccess', _7 => _7.setQuickFilter, 'call', _8 => _8(value)]));
|
|
52
|
+
_vue.watch.call(void 0, () => props.gridClassName, (value) => _optionalChain([api, 'optionalAccess', _9 => _9.updateOptions, 'call', _10 => _10({ className: value })]));
|
|
53
|
+
_vue.watch.call(void 0,
|
|
54
|
+
() => DIRECT_OPTION_KEYS.map((key) => props[key]),
|
|
55
|
+
(values, previous) => {
|
|
56
|
+
if (!api) return;
|
|
57
|
+
const changed = {};
|
|
58
|
+
values.forEach((value, index) => {
|
|
59
|
+
if (!Object.is(value, previous[index])) changed[DIRECT_OPTION_KEYS[index]] = value;
|
|
60
|
+
});
|
|
61
|
+
if (Object.keys(changed).length > 0) api.updateOptions(changed);
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
expose({ getApi: () => api });
|
|
65
|
+
return () => _vue.h.call(void 0, "div", {
|
|
66
|
+
...attrs,
|
|
67
|
+
ref: host,
|
|
68
|
+
class: ["mach-vue-host", props.className, attrs.class].filter(Boolean),
|
|
69
|
+
style: attrs.style
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
var RobotGrid = RobotGridImpl;
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
exports.RobotGrid = RobotGrid;
|
|
78
|
+
//# sourceMappingURL=chunk-S3NR7DIG.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC;AACvE,MAAM;AACN,IAAI,CAAC;AACL,IAAI,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;AACjC,IAAI,OAAO,CAAC,EAAE,GAAG,oBAAC,KAAM,EAAE;AAC1B,MAAM,GAAG,KAAK;AACd,MAAM,GAAG,EAAE,IAAI;AACf,MAAM,KAAK,EAAE,CAAC,eAAe,EAAE,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;AAC5E,MAAM,KAAK,EAAE,KAAK,CAAC;AACnB,IAAI,CAAC,CAAC;AACN,EAAE;AACF,CAAC,CAAC;AACF,IAAI,UAAU,EAAE,aAAa;AAC7B;AACA;AACE;AACF,8BAAC","file":"D:\\office-project\\wl\\MachTable\\packages\\vue\\dist\\chunk-S3NR7DIG.cjs","sourcesContent":[null]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
import { GridOptions } from '@agile-team/mach-table';
|
|
3
|
+
|
|
4
|
+
type RobotGridVueProps<TData = any> = Omit<GridOptions<TData>, "className"> & {
|
|
5
|
+
/** CSS class applied to the Vue host element. */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** CSS class forwarded to MachTable's inner grid root. */
|
|
8
|
+
gridClassName?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const RobotGrid: DefineComponent<RobotGridVueProps<any>>;
|
|
11
|
+
|
|
12
|
+
declare module "vue" {
|
|
13
|
+
interface GlobalComponents {
|
|
14
|
+
MachTable: typeof RobotGrid;
|
|
15
|
+
RobotGrid: typeof RobotGrid;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
interface MachTablePluginOptions {
|
|
19
|
+
/** Global component name. Defaults to `MachTable`. */
|
|
20
|
+
componentName?: string;
|
|
21
|
+
/** Also register the backwards-compatible `RobotGrid` name. Defaults to true. */
|
|
22
|
+
registerRobotGridAlias?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { type MachTablePluginOptions as M, type RobotGridVueProps as R, RobotGrid as a };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DefineComponent } from 'vue';
|
|
2
|
+
import { GridOptions } from '@agile-team/mach-table';
|
|
3
|
+
|
|
4
|
+
type RobotGridVueProps<TData = any> = Omit<GridOptions<TData>, "className"> & {
|
|
5
|
+
/** CSS class applied to the Vue host element. */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** CSS class forwarded to MachTable's inner grid root. */
|
|
8
|
+
gridClassName?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const RobotGrid: DefineComponent<RobotGridVueProps<any>>;
|
|
11
|
+
|
|
12
|
+
declare module "vue" {
|
|
13
|
+
interface GlobalComponents {
|
|
14
|
+
MachTable: typeof RobotGrid;
|
|
15
|
+
RobotGrid: typeof RobotGrid;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
interface MachTablePluginOptions {
|
|
19
|
+
/** Global component name. Defaults to `MachTable`. */
|
|
20
|
+
componentName?: string;
|
|
21
|
+
/** Also register the backwards-compatible `RobotGrid` name. Defaults to true. */
|
|
22
|
+
registerRobotGridAlias?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { type MachTablePluginOptions as M, type RobotGridVueProps as R, RobotGrid as a };
|