@ibiz-template/runtime 0.7.41-alpha.104 → 0.7.41-alpha.105

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.
@@ -9,4 +9,5 @@ export { ViewMode } from './view-mode';
9
9
  export { ViewType } from './view-type';
10
10
  export { PresetIdentifier } from './preset-identifier';
11
11
  export { PredefinedControlRender } from './predefined-control-render';
12
+ export { PredefinedAttributes } from './predefined-attributes';
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constant/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constant/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -9,3 +9,4 @@ export { ViewMode } from './view-mode';
9
9
  export { ViewType } from './view-type';
10
10
  export { PresetIdentifier } from './preset-identifier';
11
11
  export { PredefinedControlRender } from './predefined-control-render';
12
+ export { PredefinedAttributes } from './predefined-attributes';
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @description 预定义注入属性(后续注入属性需在此处声明)
3
+ * @author tony001
4
+ * @date 2026-06-09 17:06:26
5
+ * @export
6
+ * @enum {string}
7
+ */
8
+ export declare enum PredefinedAttributes {
9
+ /**
10
+ * 样式类注入标识
11
+ */
12
+ CLASSNAMES = "classNames",
13
+ /**
14
+ * 样式注入标识
15
+ */
16
+ STYLES = "styles"
17
+ }
18
+ //# sourceMappingURL=predefined-attributes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"predefined-attributes.d.ts","sourceRoot":"","sources":["../../src/constant/predefined-attributes.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AACH,oBAAY,oBAAoB;IAC9B;;OAEG;IACH,UAAU,eAAe;IAEzB;;OAEG;IACH,MAAM,WAAW;CAClB"}
@@ -0,0 +1,19 @@
1
+ /* eslint-disable no-shadow */
2
+ /**
3
+ * @description 预定义注入属性(后续注入属性需在此处声明)
4
+ * @author tony001
5
+ * @date 2026-06-09 17:06:26
6
+ * @export
7
+ * @enum {string}
8
+ */
9
+ export var PredefinedAttributes;
10
+ (function (PredefinedAttributes) {
11
+ /**
12
+ * 样式类注入标识
13
+ */
14
+ PredefinedAttributes["CLASSNAMES"] = "classNames";
15
+ /**
16
+ * 样式注入标识
17
+ */
18
+ PredefinedAttributes["STYLES"] = "styles";
19
+ })(PredefinedAttributes || (PredefinedAttributes = {}));
@@ -1,7 +1,14 @@
1
- import { IAppMenu } from '@ibiz/model-core';
1
+ import { IAppMenu, IControlAttribute } from '@ibiz/model-core';
2
2
  /**
3
3
  * @description 计算动态菜单
4
4
  * @param {IAppMenu} menu
5
5
  */
6
6
  export declare function calcDynamicMenu(menu: IAppMenu, context: IContext, params: IParams): Promise<void>;
7
+ /**
8
+ * @description 过滤预置注入属性
9
+ * @export
10
+ * @param {(IControlAttribute[] | undefined)} controlAttributes
11
+ * @returns {*} {IControlAttribute[]}
12
+ */
13
+ export declare function filterPresetAttrs(controlAttributes: IControlAttribute[] | undefined): IControlAttribute[];
7
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/model/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAgB,MAAM,kBAAkB,CAAC;AAG1D;;;GAGG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,QAAQ,EACd,OAAO,EAAE,QAAQ,EACjB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,IAAI,CAAC,CAqFf"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/model/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAgB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAI7E;;;GAGG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,QAAQ,EACd,OAAO,EAAE,QAAQ,EACjB,MAAM,EAAE,OAAO,GACd,OAAO,CAAC,IAAI,CAAC,CAqFf;AAOD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,iBAAiB,EAAE,iBAAiB,EAAE,GAAG,SAAS,GACjD,iBAAiB,EAAE,CAMrB"}
@@ -1,4 +1,5 @@
1
1
  import { isBase64, isBase64Image, isSvg } from '@ibiz-template/core';
2
+ import { PredefinedAttributes } from '../../constant';
2
3
  import { ScriptFactory } from '../script';
3
4
  /**
4
5
  * @description 计算动态菜单
@@ -63,3 +64,21 @@ export async function calcDynamicMenu(menu, context, params) {
63
64
  ibiz.log.error(error);
64
65
  }
65
66
  }
67
+ /**
68
+ * @description 预置属性数组
69
+ */
70
+ const PREDEFINED_ATTR_NAMES = Object.values(PredefinedAttributes);
71
+ /**
72
+ * @description 过滤预置注入属性
73
+ * @export
74
+ * @param {(IControlAttribute[] | undefined)} controlAttributes
75
+ * @returns {*} {IControlAttribute[]}
76
+ */
77
+ export function filterPresetAttrs(controlAttributes) {
78
+ const targetAttrs = controlAttributes || [];
79
+ if (targetAttrs.length === 0)
80
+ return targetAttrs;
81
+ return targetAttrs.filter(item => {
82
+ return item.attrName && !PREDEFINED_ATTR_NAMES.includes(item.attrName);
83
+ });
84
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/runtime",
3
- "version": "0.7.41-alpha.104",
3
+ "version": "0.7.41-alpha.105",
4
4
  "description": "运行时逻辑库",
5
5
  "type": "module",
6
6
  "main": "out/index.js",
@@ -68,5 +68,5 @@
68
68
  "qx-util": "^0.4.8",
69
69
  "ramda": "^0.29.0"
70
70
  },
71
- "gitHead": "3a1581988ec0b935985641d63c536e20a2f1f29c"
71
+ "gitHead": "b87ee12f17f4e9c30406998e6a78616fd6cc129c"
72
72
  }