@steedos-widgets/ag-grid 3.6.2-beta.10

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.
@@ -0,0 +1 @@
1
+ function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}!function(e,t){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).BuilderAgGrid={},e.React)}(this,(function(e,t){window;function o(e){return e&&"object"===_typeof(e)&&"default"in e?e:{default:e}}var n=o(t);e.AmisAgGrid=function(e){var o=e.config,r=e.className;!function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(o[n[r]]=e[n[r]])}}(e,["config","className"]);var f=t.useRef(null),i=window.agGrid;return t.useEffect((function(){i&&i.createGrid(f.current,o)}),[]),n.default.createElement("div",{ref:f,className:"".concat(r," ag-theme-quartz")})},Object.defineProperty(e,"__esModule",{value:!0})}));
@@ -0,0 +1,32 @@
1
+ {
2
+ "packages": [
3
+ {
4
+ "package": "ag-grid-enterprise",
5
+ "urls": [
6
+ "https://unpkg.steedos.cn/ag-grid-enterprise@31.0.2/dist/ag-grid-enterprise.min.js"
7
+ ],
8
+ "library": "agGrid"
9
+ },
10
+ {
11
+ "package": "@steedos-widgets/ag-grid",
12
+ "urls": [
13
+ "http://127.0.0.1:8080/@steedos-widgets/ag-grid/dist/ag-grid.umd.js",
14
+ "http://127.0.0.1:8080/@steedos-widgets/ag-grid/dist/ag-grid.umd.css"
15
+ ],
16
+ "library": "BuilderAgGrid"
17
+ }
18
+ ],
19
+ "components": [
20
+ {
21
+ "exportName": "BuilderAgGridMeta",
22
+ "npm": {
23
+ "package": "@steedos-widgets/ag-grid"
24
+ },
25
+ "url": "http://127.0.0.1:8080/@steedos-widgets/ag-grid/dist/meta.js",
26
+ "urls": {
27
+ "default": "http://127.0.0.1:8080/@steedos-widgets/ag-grid/dist/meta.js",
28
+ "design": "http://127.0.0.1:8080/@steedos-widgets/ag-grid/dist/meta.js"
29
+ }
30
+ }
31
+ ]
32
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "packages": [
3
+ {
4
+ "package": "ag-grid-enterprise",
5
+ "urls": [
6
+ "https://unpkg.steedos.cn/ag-grid-enterprise@31.0.2/dist/ag-grid-enterprise.min.js"
7
+ ],
8
+ "library": "agGrid"
9
+ },
10
+ {
11
+ "package": "@steedos-widgets/ag-grid",
12
+ "urls": [
13
+ "https://unpkg.com/@steedos-widgets/ag-grid@3.6.2-beta.10/dist/ag-grid.umd.js",
14
+ "https://unpkg.com/@steedos-widgets/ag-grid@3.6.2-beta.10/dist/ag-grid.umd.css"
15
+ ],
16
+ "library": "BuilderAgGrid"
17
+ }
18
+ ],
19
+ "components": [
20
+ {
21
+ "exportName": "BuilderAgGridMeta",
22
+ "npm": {
23
+ "package": "@steedos-widgets/ag-grid"
24
+ },
25
+ "url": "https://unpkg.com/@steedos-widgets/ag-grid@3.6.2-beta.10/dist/meta.js",
26
+ "urls": {
27
+ "default": "https://unpkg.com/@steedos-widgets/ag-grid@3.6.2-beta.10/dist/meta.js",
28
+ "design": "https://unpkg.com/@steedos-widgets/ag-grid@3.6.2-beta.10/dist/meta.js"
29
+ }
30
+ }
31
+ ]
32
+ }
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export declare const AmisAgGrid: ({ config, className, ...props }: {
3
+ [x: string]: any;
4
+ config: any;
5
+ className: any;
6
+ }) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './AgGrid';
@@ -0,0 +1,3 @@
1
+ export * from './components';
2
+ import "ag-grid-community/styles/ag-grid.css";
3
+ import "ag-grid-community/styles/ag-theme-quartz.css";
package/dist/meta.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ componentList: {
3
+ title: string;
4
+ icon: string;
5
+ children: any[];
6
+ }[];
7
+ components: any[];
8
+ };
9
+ export default _default;
package/dist/meta.js ADDED
@@ -0,0 +1,161 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
3
+ typeof define === 'function' && define.amd ? define(factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.BuilderAgGridMeta = factory());
5
+ })(this, (function () { 'use strict';
6
+
7
+ /******************************************************************************
8
+ Copyright (c) Microsoft Corporation.
9
+
10
+ Permission to use, copy, modify, and/or distribute this software for any
11
+ purpose with or without fee is hereby granted.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
+ PERFORMANCE OF THIS SOFTWARE.
20
+ ***************************************************************************** */
21
+
22
+ var __assign = function() {
23
+ __assign = Object.assign || function __assign(t) {
24
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
25
+ s = arguments[i];
26
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
27
+ }
28
+ return t;
29
+ };
30
+ return __assign.apply(this, arguments);
31
+ };
32
+
33
+ var config = {
34
+ group: "华炎魔方-原子组件",
35
+ componentName: "AmisAgGrid",
36
+ title: "AG-Grid",
37
+ docUrl: "",
38
+ screenshot: "",
39
+ npm: {
40
+ package: "@steedos-widgets/ag-grid",
41
+ version: "{{version}}",
42
+ exportName: "AmisAgGrid",
43
+ main: "",
44
+ destructuring: true,
45
+ subName: ""
46
+ },
47
+ props: [],
48
+ preview: {},
49
+ targets: ["steedos__RecordPage", "steedos__AppPage", "steedos__HomePage"],
50
+ engines: ["amis"],
51
+ // settings for amis.
52
+ amis: {
53
+ name: 'ag-grid',
54
+ icon: "fa-fw fa fa-list-alt"
55
+ }
56
+ };
57
+ var AgGrid = __assign(__assign({}, config), { snippets: [
58
+ {
59
+ title: config.title,
60
+ screenshot: "",
61
+ schema: {
62
+ componentName: config.componentName,
63
+ props: config.preview
64
+ }
65
+ }
66
+ ], amis: {
67
+ render: {
68
+ type: config.amis.name,
69
+ usage: "renderer",
70
+ weight: 1,
71
+ framework: "react"
72
+ },
73
+ plugin: {
74
+ rendererName: config.amis.name,
75
+ $schema: '/schemas/UnkownSchema.json',
76
+ name: config.title,
77
+ description: config.title,
78
+ tags: [config.group],
79
+ order: -9999,
80
+ icon: config.amis.icon,
81
+ scaffold: {
82
+ type: config.amis.name,
83
+ className: "h-80",
84
+ config: {
85
+ // Row Data: The data to be displayed.
86
+ rowData: [
87
+ { make: "Tesla", model: "Model Y", price: 64950, electric: true },
88
+ { make: "Ford", model: "F-Series", price: 33850, electric: false },
89
+ { make: "Toyota", model: "Corolla", price: 29600, electric: false },
90
+ ],
91
+ // Column Definitions: Defines & controls grid columns.
92
+ columnDefs: [
93
+ { field: "make" },
94
+ { field: "model" },
95
+ { field: "price" },
96
+ { field: "electric" }
97
+ ]
98
+ },
99
+ },
100
+ previewSchema: {
101
+ type: config.amis.name,
102
+ },
103
+ panelTitle: "设置",
104
+ panelControls: [
105
+ {
106
+ type: "text",
107
+ name: "className",
108
+ label: "CSS类名",
109
+ value: "bg-gray-100 border-b sm:rounded sm:border border-gray-300 p-4 mb-4"
110
+ },
111
+ {
112
+ type: "editor",
113
+ "language": "json",
114
+ name: "config",
115
+ label: "AgGrid 配置",
116
+ pipeOut: function (value) {
117
+ try {
118
+ return value ? JSON.parse(value) : null;
119
+ }
120
+ catch (e) {
121
+ }
122
+ return value;
123
+ }
124
+ },
125
+ {
126
+ type: "editor",
127
+ "language": "javascript",
128
+ name: "dataFilter",
129
+ label: "数据加工",
130
+ description: "如果后端没有直接返回 AgGrid 配置,可以自己写一段函数来包装。\
131
+ 签名:(config, AgGrid, data) => config \
132
+ "
133
+ },
134
+ ],
135
+ events: [{}],
136
+ },
137
+ } });
138
+
139
+ /*
140
+ * @Author: baozhoutao@steedos.com
141
+ * @Date: 2022-08-31 16:32:35
142
+ * @LastEditors: baozhoutao@steedos.com
143
+ * @LastEditTime: 2022-09-01 18:46:29
144
+ * @Description:
145
+ */
146
+ var components = [AgGrid];
147
+ var componentList = [
148
+ {
149
+ title: "华炎魔方",
150
+ icon: "",
151
+ children: [AgGrid]
152
+ }
153
+ ];
154
+ var meta = {
155
+ componentList: componentList,
156
+ components: components
157
+ };
158
+
159
+ return meta;
160
+
161
+ }));
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export declare const AmisAgGrid: ({ config, className, ...props }: {
3
+ [x: string]: any;
4
+ config: any;
5
+ className: any;
6
+ }) => JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './AgGrid';
@@ -0,0 +1,3 @@
1
+ export * from './components';
2
+ import "ag-grid-community/styles/ag-grid.css";
3
+ import "ag-grid-community/styles/ag-theme-quartz.css";
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ componentList: {
3
+ title: string;
4
+ icon: string;
5
+ children: any[];
6
+ }[];
7
+ components: any[];
8
+ };
9
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
package/package.json ADDED
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@steedos-widgets/ag-grid",
3
+ "private": false,
4
+ "version": "3.6.2-beta.10",
5
+ "main": "dist/ag-grid.cjs.js",
6
+ "module": "dist/ag-grid.esm.js",
7
+ "unpkg": "dist/ag-grid.umd.js",
8
+ "typings": "dist/ag-grid.d.ts",
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "scripts": {
13
+ "prebuild": "rimraf dist",
14
+ "http": "npx http-server ../ --port 8080 --cors -c -1",
15
+ "build": "yarn build-types && yarn build-rollup",
16
+ "build-types": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types",
17
+ "build-rollup": "rollup -c rollup.config.ts"
18
+ },
19
+ "license": "MIT",
20
+ "publishConfig": {
21
+ "access": "public"
22
+ },
23
+ "devDependencies": {
24
+ "@rollup/plugin-babel": "^5.3.1",
25
+ "@rollup/plugin-commonjs": "^22.0.0",
26
+ "@rollup/plugin-node-resolve": "^13.1.3",
27
+ "@rollup/plugin-typescript": "^8.4.0",
28
+ "@types/react": "^18.0.8",
29
+ "@types/react-dom": "^18.0.6",
30
+ "react": "18.2.0",
31
+ "react-dom": "18.2.0",
32
+ "rollup": "^2.70.1",
33
+ "rollup-plugin-alias": "^2.2.0",
34
+ "rollup-plugin-external-globals": "^0.6.1",
35
+ "rollup-plugin-json": "^4.0.0",
36
+ "rollup-plugin-node-builtins": "^2.1.2",
37
+ "rollup-plugin-node-globals": "^1.4.0",
38
+ "rollup-plugin-node-resolve": "^5.2.0",
39
+ "rollup-plugin-polyfill-node": "^0.8.0",
40
+ "rollup-plugin-postcss": "^4.0.2",
41
+ "rollup-plugin-postcss-webpack-alias-less-loader": "^1.0.0",
42
+ "rollup-plugin-re": "^1.0.7",
43
+ "rollup-plugin-replace": "^2.0.0",
44
+ "rollup-plugin-sourcemaps": "^0.6.3",
45
+ "rollup-plugin-svg": "^2.0.0",
46
+ "rollup-plugin-terser": "^7.0.2",
47
+ "rollup-plugin-tslib-resolve-id": "^0.0.0",
48
+ "rollup-plugin-visualizer": "^5.8.0"
49
+ },
50
+ "dependencies": {
51
+ "@rollup/plugin-replace": "^5.0.2",
52
+ "@steedos-widgets/amis-lib": "3.6.2-beta.10",
53
+ "ag-grid-community": "~31.0.2",
54
+ "ag-grid-enterprise": "~31.0.2",
55
+ "ag-grid-react": "~31.0.2"
56
+ },
57
+ "gitHead": "9074b66d1cfd4cdc7a5ebce711a3ac0d295269c1"
58
+ }