@fbkworks/adapter-naive-ui 0.2.0 → 0.3.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/dist/index.d.ts +1 -2
- package/dist/index.mjs +9 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
- package/dist/primitives/Empty.d.ts +0 -13
- package/dist/primitives/Empty.mjs +0 -26
- package/dist/primitives/Empty.mjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -11,11 +11,10 @@ import { Pagination } from './primitives/Pagination.js';
|
|
|
11
11
|
import { Dialog } from './primitives/Dialog.js';
|
|
12
12
|
import { Drawer } from './primitives/Drawer.js';
|
|
13
13
|
import { Tag } from './primitives/Tag.js';
|
|
14
|
-
import { Empty } from './primitives/Empty.js';
|
|
15
14
|
import { Spin } from './primitives/Spin.js';
|
|
16
15
|
import { naiveTheme, naiveProviderProps } from './theme.js';
|
|
17
16
|
import { RootProvider } from './root-provider.js';
|
|
18
17
|
export declare const naiveCapabilities: Capabilities;
|
|
19
18
|
export declare const naiveUiAdapter: UiAdapter;
|
|
20
19
|
export { naiveTheme, naiveProviderProps, RootProvider };
|
|
21
|
-
export { Button, Input, Select, Checkbox, DatePicker, Radio, Form, FormItem, DataGrid, Pagination, Dialog, Drawer, Tag,
|
|
20
|
+
export { Button, Input, Select, Checkbox, DatePicker, Radio, Form, FormItem, DataGrid, Pagination, Dialog, Drawer, Tag, Spin };
|
package/dist/index.mjs
CHANGED
|
@@ -11,7 +11,6 @@ import { Pagination } from "./primitives/Pagination.mjs";
|
|
|
11
11
|
import { Dialog } from "./primitives/Dialog.mjs";
|
|
12
12
|
import { Drawer } from "./primitives/Drawer.mjs";
|
|
13
13
|
import { Tag } from "./primitives/Tag.mjs";
|
|
14
|
-
import { Empty } from "./primitives/Empty.mjs";
|
|
15
14
|
import { Spin } from "./primitives/Spin.mjs";
|
|
16
15
|
import { naiveTheme } from "./theme.mjs";
|
|
17
16
|
import { naiveProviderProps } from "./theme.mjs";
|
|
@@ -21,10 +20,14 @@ const naiveCapabilities = {
|
|
|
21
20
|
presentation: "table",
|
|
22
21
|
selection: true,
|
|
23
22
|
sort: "custom",
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
/* 下面四个位此前声明为 true,但 DataGridProps 里根本没有对应 prop ——
|
|
24
|
+
也就是说它们不只是没实现,而是连请求的入口都不存在。声明 true 会让
|
|
25
|
+
调用方按能力位分支却拿到一条平铺的表。要真支持,需要先加 prop、
|
|
26
|
+
三个适配器各实现、再补一致性用例,那是一轮独立设计。 */
|
|
27
|
+
expandable: false,
|
|
28
|
+
tree: false,
|
|
29
|
+
virtualScroll: false,
|
|
30
|
+
stickyHeader: false
|
|
28
31
|
},
|
|
29
32
|
form: {
|
|
30
33
|
layout: "horizontal",
|
|
@@ -48,7 +51,7 @@ const naiveUiAdapter = {
|
|
|
48
51
|
platform: "desktop"
|
|
49
52
|
},
|
|
50
53
|
capabilities: naiveCapabilities,
|
|
51
|
-
primitives: { Button, Input, Select, Checkbox, DatePicker, Radio, Form, FormItem, DataGrid, Pagination, Dialog, Drawer, Tag,
|
|
54
|
+
primitives: { Button, Input, Select, Checkbox, DatePicker, Radio, Form, FormItem, DataGrid, Pagination, Dialog, Drawer, Tag, Spin },
|
|
52
55
|
feedback,
|
|
53
56
|
RootProvider,
|
|
54
57
|
theme: naiveTheme
|
|
@@ -60,7 +63,6 @@ export {
|
|
|
60
63
|
DatePicker,
|
|
61
64
|
Dialog,
|
|
62
65
|
Drawer,
|
|
63
|
-
Empty,
|
|
64
66
|
Form,
|
|
65
67
|
FormItem,
|
|
66
68
|
Input,
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":["import type { Capabilities, UiAdapter } from '@fbkworks/adapter-core'\nimport { Button } from './primitives/Button'\nimport { Input } from './primitives/Input'\nimport { Select } from './primitives/Select'\nimport { Checkbox } from './primitives/Checkbox'\nimport { DatePicker } from './primitives/DatePicker'\nimport { Radio } from './primitives/Radio'\nimport { feedback } from './feedback'\nimport { Form, FormItem } from './primitives/Form'\nimport { DataGrid } from './primitives/DataGrid'\nimport { Pagination } from './primitives/Pagination'\nimport { Dialog } from './primitives/Dialog'\nimport { Drawer } from './primitives/Drawer'\nimport { Tag } from './primitives/Tag'\nimport {
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":["import type { Capabilities, UiAdapter } from '@fbkworks/adapter-core'\nimport { Button } from './primitives/Button'\nimport { Input } from './primitives/Input'\nimport { Select } from './primitives/Select'\nimport { Checkbox } from './primitives/Checkbox'\nimport { DatePicker } from './primitives/DatePicker'\nimport { Radio } from './primitives/Radio'\nimport { feedback } from './feedback'\nimport { Form, FormItem } from './primitives/Form'\nimport { DataGrid } from './primitives/DataGrid'\nimport { Pagination } from './primitives/Pagination'\nimport { Dialog } from './primitives/Dialog'\nimport { Drawer } from './primitives/Drawer'\nimport { Tag } from './primitives/Tag'\nimport { Spin } from './primitives/Spin'\nimport { naiveTheme, naiveProviderProps } from './theme'\nimport { RootProvider } from './root-provider'\n\nexport const naiveCapabilities: Capabilities = {\n dataGrid: {\n presentation: 'table',\n selection: true,\n sort: 'custom',\n /* 下面四个位此前声明为 true,但 DataGridProps 里根本没有对应 prop ——\n 也就是说它们不只是没实现,而是连请求的入口都不存在。声明 true 会让\n 调用方按能力位分支却拿到一条平铺的表。要真支持,需要先加 prop、\n 三个适配器各实现、再补一致性用例,那是一轮独立设计。 */\n expandable: false,\n tree: false,\n virtualScroll: false,\n stickyHeader: false,\n },\n form: {\n layout: 'horizontal',\n labelWidth: true,\n validateOn: ['change', 'blur', 'submit'],\n asyncValidator: true,\n },\n overlay: { kind: 'dialog', supportsDrawer: true, supportsTeleport: true },\n pagination: { mode: 'pages', pageSizes: true, jumper: true },\n // 只有契约里真实存在的两个 API;notification / loading 没有对应实现,不声明\n feedback: { message: true, notification: false, confirm: true, loading: false },\n theme: { darkMode: true, cssVariables: false, provider: true },\n features: { 'table.fixedColumns': true, 'table.summary': true, 'form.inline': true },\n}\n\nexport const naiveUiAdapter: UiAdapter = {\n meta: {\n apiVersion: 3,\n name: 'naive-ui',\n version: '0.1.0',\n uiLibrary: { name: 'naive-ui', version: '^2.40.0' },\n platform: 'desktop',\n },\n capabilities: naiveCapabilities,\n primitives: { Button, Input, Select, Checkbox, DatePicker, Radio, Form, FormItem, DataGrid, Pagination, Dialog, Drawer, Tag, Spin },\n feedback,\n RootProvider,\n theme: naiveTheme,\n}\n\nexport { naiveTheme, naiveProviderProps, RootProvider }\nexport { Button, Input, Select, Checkbox, DatePicker, Radio, Form, FormItem, DataGrid, Pagination, Dialog, Drawer, Tag, Spin }\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAkBO,MAAM,oBAAkC;AAAA,EAC7C,UAAU;AAAA,IACR,cAAc;AAAA,IACd,WAAW;AAAA,IACX,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,IAKN,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,eAAe;AAAA,IACf,cAAc;AAAA,EAAA;AAAA,EAEhB,MAAM;AAAA,IACJ,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,YAAY,CAAC,UAAU,QAAQ,QAAQ;AAAA,IACvC,gBAAgB;AAAA,EAAA;AAAA,EAElB,SAAS,EAAE,MAAM,UAAU,gBAAgB,MAAM,kBAAkB,KAAA;AAAA,EACnE,YAAY,EAAE,MAAM,SAAS,WAAW,MAAM,QAAQ,KAAA;AAAA;AAAA,EAEtD,UAAU,EAAE,SAAS,MAAM,cAAc,OAAO,SAAS,MAAM,SAAS,MAAA;AAAA,EACxE,OAAO,EAAE,UAAU,MAAM,cAAc,OAAO,UAAU,KAAA;AAAA,EACxD,UAAU,EAAE,sBAAsB,MAAM,iBAAiB,MAAM,eAAe,KAAA;AAChF;AAEO,MAAM,iBAA4B;AAAA,EACvC,MAAM;AAAA,IACJ,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,WAAW,EAAE,MAAM,YAAY,SAAS,UAAA;AAAA,IACxC,UAAU;AAAA,EAAA;AAAA,EAEZ,cAAc;AAAA,EACd,YAAY,EAAE,QAAQ,OAAO,QAAQ,UAAU,YAAY,OAAO,MAAM,UAAU,UAAU,YAAY,QAAQ,QAAQ,KAAK,KAAA;AAAA,EAC7H;AAAA,EACA;AAAA,EACA,OAAO;AACT;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fbkworks/adapter-naive-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"**/*.css"
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"./package.json": "./package.json"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@fbkworks/adapter-core": "^0.
|
|
25
|
-
"@fbkworks/shared": "^0.
|
|
26
|
-
"@fbkworks/tokens": "^0.
|
|
24
|
+
"@fbkworks/adapter-core": "^0.3.0",
|
|
25
|
+
"@fbkworks/shared": "^0.3.0",
|
|
26
|
+
"@fbkworks/tokens": "^0.3.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"naive-ui": "^2.40.0",
|
|
@@ -40,15 +40,15 @@
|
|
|
40
40
|
"adapter"
|
|
41
41
|
],
|
|
42
42
|
"license": "MIT",
|
|
43
|
-
"author": "
|
|
44
|
-
"homepage": "https://github.com/
|
|
43
|
+
"author": "socalledPF",
|
|
44
|
+
"homepage": "https://github.com/socalledPF/fbkworks#readme",
|
|
45
45
|
"repository": {
|
|
46
46
|
"type": "git",
|
|
47
|
-
"url": "git+https://github.com/
|
|
47
|
+
"url": "git+https://github.com/socalledPF/fbkworks.git",
|
|
48
48
|
"directory": "packages/adapters/naive-ui"
|
|
49
49
|
},
|
|
50
50
|
"bugs": {
|
|
51
|
-
"url": "https://github.com/
|
|
51
|
+
"url": "https://github.com/socalledPF/fbkworks/issues"
|
|
52
52
|
},
|
|
53
53
|
"engines": {
|
|
54
54
|
"node": ">=20.11.0"
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const Empty: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
-
description: {
|
|
3
|
-
type: StringConstructor;
|
|
4
|
-
default: string;
|
|
5
|
-
};
|
|
6
|
-
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
7
|
-
description: {
|
|
8
|
-
type: StringConstructor;
|
|
9
|
-
default: string;
|
|
10
|
-
};
|
|
11
|
-
}>> & Readonly<{}>, {
|
|
12
|
-
description: string;
|
|
13
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { defineComponent, createVNode, mergeProps } from "vue";
|
|
2
|
-
import { NEmpty } from "naive-ui";
|
|
3
|
-
const Empty = /* @__PURE__ */ defineComponent({
|
|
4
|
-
name: "FbkNaiveEmpty",
|
|
5
|
-
inheritAttrs: false,
|
|
6
|
-
props: {
|
|
7
|
-
description: {
|
|
8
|
-
type: String,
|
|
9
|
-
default: "暂无数据"
|
|
10
|
-
}
|
|
11
|
-
},
|
|
12
|
-
setup(props, {
|
|
13
|
-
attrs,
|
|
14
|
-
slots
|
|
15
|
-
}) {
|
|
16
|
-
return () => createVNode(NEmpty, mergeProps(attrs, {
|
|
17
|
-
"description": props.description
|
|
18
|
-
}), {
|
|
19
|
-
default: () => [slots.default?.()]
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
export {
|
|
24
|
-
Empty
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=Empty.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Empty.mjs","sources":["../../src/primitives/Empty.tsx"],"sourcesContent":["import { defineComponent } from 'vue'\nimport { NEmpty } from 'naive-ui'\n\nexport const Empty = defineComponent({\n name: 'FbkNaiveEmpty',\n inheritAttrs: false,\n props: { description: { type: String, default: '暂无数据' } },\n setup(props, { attrs, slots }) {\n return () => (\n <NEmpty {...attrs} description={props.description}>\n {slots.default?.()}\n </NEmpty>\n )\n },\n})\n"],"names":["Empty","defineComponent","name","inheritAttrs","props","description","type","String","default","setup","attrs","slots","_createVNode","NEmpty","_mergeProps"],"mappings":";;AAGO,MAAMA,QAAQC,gCAAgB;AAAA,EACnCC,MAAM;AAAA,EACNC,cAAc;AAAA,EACdC,OAAO;AAAA,IAAEC,aAAa;AAAA,MAAEC,MAAMC;AAAAA,MAAQC,SAAS;AAAA,IAAO;AAAA;EACtDC,MAAML,OAAO;AAAA,IAAEM;AAAAA,IAAOC;AAAAA,EAAM,GAAG;AAC7B,WAAO,MAAAC,YAAAC,QAAAC,WACOJ,OAAK;AAAA,MAAA,eAAeN,MAAMC;AAAAA,IAAW,CAAA,GAAA;AAAA,MAAAG,SAAAA,MAAA,CAC9CG,MAAMH,UAAO,CAAI;AAAA,KAAA;AAAA,EAGxB;AACF,CAAC;"}
|