@gct-paas/render 0.1.5-dev.0 → 0.1.5-dev.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.
Files changed (45) hide show
  1. package/dist/index.min.css +1 -1
  2. package/dist/loader.esm.min.js +1 -1
  3. package/es/Event/Dependency/controller.mjs +2 -2
  4. package/es/Event/Dependency/displayRule.mjs +2 -2
  5. package/es/Event/Dependency/useDependency.mjs +1 -1
  6. package/es/Event/baseEvent.d.ts +4 -4
  7. package/es/Event/baseEvent.mjs +4 -4
  8. package/es/Event/bizServiceRequest.d.ts +4 -4
  9. package/es/Event/bizServiceRequest.mjs +19 -10
  10. package/es/Event/utils/runGlobalByPage.d.ts +4 -4
  11. package/es/Event/utils/runGlobalByPage.mjs +1 -1
  12. package/es/controller/design-render/design-render.controller.d.ts +1 -1
  13. package/es/hooks/index.d.ts +1 -0
  14. package/es/hooks/index.mjs +1 -0
  15. package/es/hooks/useStorageRef.mjs +1 -1
  16. package/es/hooks/widgets/useFileAttrsHooks.d.ts +28 -0
  17. package/es/hooks/widgets/useFileAttrsHooks.mjs +37 -0
  18. package/es/index.d.ts +4 -2
  19. package/es/index.mjs +12 -5
  20. package/es/locale/sys/process.d.ts +8 -0
  21. package/es/locale/sys.d.ts +4 -0
  22. package/es/modules/vue3-dnd/components/vue3-dnd-draggable/vue3-dnd-draggable.css +73 -0
  23. package/es/modules/vue3-dnd/components/vue3-dnd-draggable/vue3-dnd-draggable.d.ts +70 -0
  24. package/es/modules/vue3-dnd/components/vue3-dnd-draggable/vue3-dnd-draggable.mjs +119 -0
  25. package/es/modules/vue3-dnd/components/vue3-dnd-draggable-item/vue3-dnd-draggable-item.css +74 -0
  26. package/es/modules/vue3-dnd/components/vue3-dnd-draggable-item/vue3-dnd-draggable-item.d.ts +69 -0
  27. package/es/modules/vue3-dnd/components/vue3-dnd-draggable-item/vue3-dnd-draggable-item.mjs +165 -0
  28. package/es/modules/vue3-dnd/index.d.ts +3 -0
  29. package/es/modules/vue3-dnd/index.mjs +2 -0
  30. package/es/modules/vue3-dnd/interface/i-vue3-dnd-draggable-options.d.ts +294 -0
  31. package/es/modules/vue3-dnd/interface/index.d.ts +1 -0
  32. package/es/utils/expression/index.mjs +1 -1
  33. package/es/utils/expression/regularExpression/methods.mjs +1 -1
  34. package/es/utils/field-empty-value.d.ts +6 -0
  35. package/es/utils/field-empty-value.mjs +17 -0
  36. package/es/utils/index.d.ts +2 -0
  37. package/es/utils/index.mjs +3 -0
  38. package/es/utils/is.d.ts +21 -0
  39. package/es/utils/is.mjs +70 -0
  40. package/es/utils/model-transformer.d.ts +1 -1
  41. package/es/utils/search/index.d.ts +1 -0
  42. package/es/utils/search/index.mjs +1 -0
  43. package/es/utils/search/listhook.d.ts +23 -0
  44. package/es/utils/search/listhook.mjs +87 -0
  45. package/package.json +27 -26
@@ -13,7 +13,7 @@ export declare function transformSourceData(data: RowData[], dict: DictMap): Row
13
13
  */
14
14
  export declare function transformData(row?: RowData, dict?: DictMap): RowData;
15
15
  export declare function addDataByForm(formState: RowData, data: RowData, dict: DictMap): void;
16
- export declare function setDataByForm(formState: RowData, data: RowData, dict: DictMap): void;
16
+ export declare function setDataByForm(formState: IObject, data: RowData, dict: DictMap): void;
17
17
  /**
18
18
  * 表单 select 数据处理
19
19
  * @param data 数据信息
@@ -1,2 +1,3 @@
1
1
  export * from './search-hooks';
2
2
  export * from './search-default-value';
3
+ export * from './listhook';
@@ -1,2 +1,3 @@
1
1
  import "./search-hooks.mjs";
2
2
  import "./search-default-value.mjs";
3
+ import "./listhook.mjs";
@@ -0,0 +1,23 @@
1
+ export declare function getIExp(exp: string, ignoreOptions?: never[]): string;
2
+ export declare function getIKeywordFieldKeys(searchField: string[], ignoreOptions?: never[]): string[];
3
+ /**
4
+ * 关键字段搜索
5
+ * @param searchField 需要搜索的字段
6
+ * @param keyword 搜索的关键字
7
+ */
8
+ export declare const getQueryDateByKeyWord: ({ searchField, keyword, }: IObject) => object;
9
+ /**
10
+ * 数据筛选生成查询条件
11
+ * @param datafilter
12
+ * @returns
13
+ */
14
+ export declare const useQueryfilter: (datafilter: IObject[] | IObject) => {
15
+ query: IObject;
16
+ getExp: (...arg: string[]) => string;
17
+ };
18
+ /**
19
+ * 生成排序查询条件
20
+ * @param param0
21
+ * @returns
22
+ */
23
+ export declare const getQuerySort: ({ collation, collationSort, collationField, }: IObject) => any;
@@ -0,0 +1,87 @@
1
+ import { globalVarCaches } from "../../Event/utils/runGlobalByPage.mjs";
2
+ import "../../Event/index.mjs";
3
+ import { isArray } from "lodash-es";
4
+ //#region src/utils/search/listhook.ts
5
+ /** 数据类型 */
6
+ var ValueTypeEnum = {
7
+ FIXED: "FIXED",
8
+ SYS: "SYS",
9
+ FIELD: "FIELD",
10
+ VAR: "VAR"
11
+ };
12
+ function getIExp(exp, ignoreOptions = []) {
13
+ if (ignoreOptions?.[0] == "ignoreCase") return exp?.replace(/\./g, ".i");
14
+ return exp;
15
+ }
16
+ function getIKeywordFieldKeys(searchField, ignoreOptions = []) {
17
+ if (ignoreOptions?.[0] == "ignoreCase") return searchField?.map((i) => {
18
+ const arr = i.split(".");
19
+ return `${arr[0]}.i${arr[1]}`;
20
+ });
21
+ return searchField;
22
+ }
23
+ /**
24
+ * 关键字段搜索
25
+ * @param searchField 需要搜索的字段
26
+ * @param keyword 搜索的关键字
27
+ */
28
+ var getQueryDateByKeyWord = ({ searchField, keyword }) => {
29
+ if (!keyword) return {};
30
+ return searchField?.reduce((total, filedKey) => {
31
+ const expkey = filedKey.split(".").length > 1 ? filedKey : filedKey + ".like";
32
+ total[expkey] = keyword;
33
+ return total;
34
+ }, {}) || {};
35
+ };
36
+ /**
37
+ * 数据筛选生成查询条件
38
+ * @param datafilter
39
+ * @returns
40
+ */
41
+ var useQueryfilter = (datafilter) => {
42
+ let queryfilter = {}, exp = "";
43
+ if (isArray(datafilter)) queryfilter = { ...datafilter.reduce((total, curr) => {
44
+ const key = curr.key + "." + curr.ope;
45
+ total[key] = curr.value;
46
+ return total;
47
+ }, {}) };
48
+ else try {
49
+ const dataRule = JSON.parse(datafilter?.dataRule);
50
+ exp = dataRule?.exp;
51
+ const typeMap = dataRule?.typeMap || {};
52
+ const query = dataRule?.query || {};
53
+ for (const k in query) if (typeMap[k] === ValueTypeEnum.VAR) queryfilter[k] = globalVarCaches.value?.[query[k]]?.value;
54
+ else queryfilter[k] = query[k];
55
+ } catch (error) {
56
+ console.log(error);
57
+ }
58
+ function getExp(...arg) {
59
+ const explist = [exp, ...arg].filter((i) => i);
60
+ const expkey = explist.join(",");
61
+ if (explist.length > 1) return `AND(${expkey})`;
62
+ else return expkey;
63
+ }
64
+ return {
65
+ query: queryfilter,
66
+ getExp
67
+ };
68
+ };
69
+ /**
70
+ * 生成排序查询条件
71
+ * @param param0
72
+ * @returns
73
+ */
74
+ var getQuerySort = ({ collation, collationSort, collationField }) => {
75
+ if (collation) return collation.filter((i) => i.collationField).map((i) => {
76
+ return {
77
+ sortField: i.collationField,
78
+ sortType: i.collationSort
79
+ };
80
+ });
81
+ else return collationSort ? [{
82
+ sortField: collationField,
83
+ sortType: collationSort
84
+ }] : [];
85
+ };
86
+ //#endregion
87
+ export { getIExp, getIKeywordFieldKeys, getQueryDateByKeyWord, getQuerySort, useQueryfilter };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/render",
3
- "version": "0.1.5-dev.0",
3
+ "version": "0.1.5-dev.10",
4
4
  "type": "module",
5
5
  "description": "paas 平台网页端底包",
6
6
  "loader": "dist/loader.esm.min.js",
@@ -30,23 +30,8 @@
30
30
  },
31
31
  "license": "MIT",
32
32
  "author": "gct",
33
- "scripts": {
34
- "dev": "cross-env NODE_ENV=development vite build --watch --config vite.dev.config.ts",
35
- "es:build": "vite build --config vite.dev.config.ts",
36
- "build": "npm run lint && vite build --config vite.dev.config.ts && vite build --config vite.config.ts",
37
- "lint": "eslint src/",
38
- "publish:next": "npm run build && npm publish --access public --tag=next --registry=https://registry.npmjs.org/",
39
- "publish:dev": "npm run build && npm publish --access public --tag=dev --registry=https://registry.npmjs.org/",
40
- "publish:alpha": "npm run build && npm publish --access public --tag=alpha --registry=https://registry.npmjs.org/",
41
- "publish:beta": "npm run build && npm publish --access public --tag=beta --registry=https://registry.npmjs.org/",
42
- "publish:npm": "npm run build && npm publish --access public --registry=https://registry.npmjs.org/"
43
- },
44
33
  "dependencies": {
45
- "@gct-paas/api": "^0.1.2-dev.3",
46
- "@gct-paas/core": "0.1.5-dev.0",
47
- "@gct-paas/core-web": "0.1.5-dev.0",
48
- "@gct-paas/schema": "0.1.5-dev.0",
49
- "@gct-paas/scss": "0.1.5-dev.0",
34
+ "@gct-paas/api": "^0.1.4-dev.4",
50
35
  "@vueuse/core": "^14.1.0",
51
36
  "axios": "^1.13.2",
52
37
  "bignumber.js": "^10.0.2",
@@ -54,9 +39,15 @@
54
39
  "escodegen": "^2.1.0",
55
40
  "esprima-next": "5.8.4",
56
41
  "estraverse": "^5.3.0",
42
+ "lodash-es": "^4.17.23",
57
43
  "qs": "^6.15.0",
58
44
  "qx-util": "^0.4.8",
59
- "vue": "^3.5.30"
45
+ "vue": "^3.5.30",
46
+ "vue3-dnd": "^2.1.0",
47
+ "@gct-paas/core-web": "0.1.5-dev.10",
48
+ "@gct-paas/core": "0.1.5-dev.10",
49
+ "@gct-paas/scss": "0.1.5-dev.10",
50
+ "@gct-paas/schema": "0.1.5-dev.10"
60
51
  },
61
52
  "devDependencies": {
62
53
  "@types/escodegen": "^0.0.10",
@@ -64,12 +55,22 @@
64
55
  "@types/estree": "^1.0.8"
65
56
  },
66
57
  "peerDependencies": {
67
- "@gct-paas/api": "*",
68
- "@gct-paas/core": "*",
69
- "@gct-paas/core-web": "*",
70
- "@gct-paas/schema": "*",
71
- "@gct-paas/scss": "*",
72
- "vue": ">=3"
58
+ "@gct-paas/api": "^0.1.4-dev.4",
59
+ "vue": ">=3",
60
+ "@gct-paas/core-web": "0.1.5-dev.10",
61
+ "@gct-paas/schema": "0.1.5-dev.10",
62
+ "@gct-paas/scss": "0.1.5-dev.10",
63
+ "@gct-paas/core": "0.1.5-dev.10"
73
64
  },
74
- "gitHead": "d5a1badfd34c55ceefd2cf33f2ee659454076e37"
75
- }
65
+ "scripts": {
66
+ "dev": "cross-env NODE_ENV=development vite build --watch --config vite.dev.config.ts",
67
+ "es:build": "vite build --config vite.dev.config.ts",
68
+ "build": "npm run lint && vue-tsc --noEmit && vite build --config vite.dev.config.ts && vite build --config vite.config.ts",
69
+ "lint": "eslint src/",
70
+ "publish:next": "npm run build && npm publish --access public --tag=next --registry=https://registry.npmjs.org/",
71
+ "publish:dev": "npm run build && npm publish --access public --tag=dev --registry=https://registry.npmjs.org/",
72
+ "publish:alpha": "npm run build && npm publish --access public --tag=alpha --registry=https://registry.npmjs.org/",
73
+ "publish:beta": "npm run build && npm publish --access public --tag=beta --registry=https://registry.npmjs.org/",
74
+ "publish:npm": "npm run build && npm publish --access public --registry=https://registry.npmjs.org/"
75
+ }
76
+ }