zova-jsx 1.1.34 → 1.1.35

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 (2) hide show
  1. package/dist/index.js +3 -7
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import { compose } from '@cabloy/compose';
2
2
  import { celEnvBase, getProperty, evaluateExpressions, isEmptyObject, isNil, isPromise } from '@cabloy/utils';
3
3
  import { toUpperCaseFirstChar } from '@cabloy/word-utils';
4
- import { classes } from 'typestyle';
5
4
  import { h, createTextVNode } from 'vue';
6
5
  import { BeanSimple, objectAssignReactive, cast, BeanControllerIdentifier } from 'zova-core';
7
6
 
@@ -267,9 +266,9 @@ class ZovaJsx extends BeanSimple {
267
266
  // props
268
267
  this.renderJsxProps(componentJsx.props, props, celScope, renderContext);
269
268
  // style
270
- if (_isZovaComponent && cast(props).style) {
269
+ if (cast(props).class || cast(props).style) {
271
270
  const controller = this.ctx.bean._getBeanSyncOnly(BeanControllerIdentifier);
272
- cast(props).class = classes(cast(props).class, controller.$style(cast(props).style));
271
+ cast(props).class = controller.$cssMerge(cast(props).class, controller.$style(cast(props).style));
273
272
  delete cast(props).style;
274
273
  }
275
274
  // children
@@ -312,11 +311,8 @@ class ZovaJsx extends BeanSimple {
312
311
  const keys = Object.keys(jsxProps).filter(item => !renderFieldJsxPropsSystem.includes(item));
313
312
  if (keys.length === 0) return props;
314
313
  for (const key of keys) {
315
- let keyValue = this.renderJsxOrCel(jsxProps[key], undefined, celScope, renderContext);
314
+ const keyValue = this.renderJsxOrCel(jsxProps[key], undefined, celScope, renderContext);
316
315
  const propName = normalizePropName(key);
317
- if (propName === 'class') {
318
- keyValue = classes(props[propName], keyValue);
319
- }
320
316
  props[propName] = keyValue;
321
317
  }
322
318
  return props;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zova-jsx",
3
- "version": "1.1.34",
4
- "gitHead": "ddec2a32e5fd0e85af5967caa29e4d0e5e0f6117",
3
+ "version": "1.1.35",
4
+ "gitHead": "106d9830a06a019121adf3af44e0ae22063aed55",
5
5
  "description": "Zova JSX",
6
6
  "keywords": [
7
7
  "ioc",