@dckj-npm/dc-material 0.1.215 → 0.1.217

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.
@@ -315,16 +315,17 @@ const TeletextListMeta: IPublicTypeComponentMetadata = {
315
315
  setValue(target, value) {
316
316
  target.getProps().setPropValue('textLines', value)
317
317
  // 获取组件schema
318
- const children = target?.node?.children
318
+ const schema = target?.node?.schema
319
319
  const currentLength =
320
- children?.filter(
320
+ schema?.children?.filter(
321
321
  (child) =>
322
- child.componentName === 'NextText' && child.propsData?.key?.startsWith('text-'),
322
+ child.componentName === 'NextText' && child.props.key?.startsWith('text-'),
323
323
  )?.length || 0
324
+
324
325
  if (value > currentLength) {
325
326
  // 需要添加新的文本组件
326
327
  for (let i = currentLength + 1; i <= value; i++) {
327
- children?.push({
328
+ schema?.children?.push({
328
329
  componentName: 'NextText',
329
330
  props: {
330
331
  type: 'inherit',
@@ -335,16 +336,15 @@ const TeletextListMeta: IPublicTypeComponentMetadata = {
335
336
  }
336
337
  } else if (value < currentLength) {
337
338
  // 需要移除多余的文本组件
338
- children = children.filter(
339
+ schema.children = schema.children.filter(
339
340
  (child) =>
340
341
  !(
341
342
  child.componentName === 'NextText' &&
342
- child.propsData?.key?.startsWith('text-') &&
343
- parseInt(child.propsData?.key?.split('-')[1]) > value
343
+ child.props.key?.startsWith('text-') &&
344
+ parseInt(child.props.key.split('-')[1]) > value
344
345
  ),
345
346
  )
346
347
  }
347
- target?.node?.children?.importSchema()
348
348
 
349
349
  // 更新数据源绑定的配置
350
350
  const dataListBindProp = target.parent.items.find(
@@ -99,7 +99,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
99
99
  packageName = '@dckj-npm/dc-material';
100
100
  }
101
101
  if (version === void 0) {
102
- version = '0.1.215';
102
+ version = '0.1.217';
103
103
  }
104
104
  if (basicLibraryVersion === void 0) {
105
105
  basicLibraryVersion = {
@@ -1,5 +1,4 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import _readOnlyError from "@babel/runtime/helpers/readOnlyError";
3
2
  var _props, _props$find, _props$find$setter, _props$find$setter$ge;
4
3
  var TeletextListMeta = {
5
4
  group: '低代码组件',
@@ -271,19 +270,19 @@ var TeletextListMeta = {
271
270
  },
272
271
  extraProps: {
273
272
  setValue: function setValue(target, value) {
274
- var _target$node, _children, _children$filter, _target$node2, _target$node2$childre, _target$parent$node;
273
+ var _target$node, _schema$children, _schema$children$filt, _target$parent$node;
275
274
  target.getProps().setPropValue('textLines', value);
276
275
  // 获取组件schema
277
- var children = target === null || target === void 0 ? void 0 : (_target$node = target.node) === null || _target$node === void 0 ? void 0 : _target$node.children;
278
- var currentLength = ((_children = children) === null || _children === void 0 ? void 0 : (_children$filter = _children.filter(function (child) {
279
- var _child$propsData, _child$propsData$key;
280
- return child.componentName === 'NextText' && ((_child$propsData = child.propsData) === null || _child$propsData === void 0 ? void 0 : (_child$propsData$key = _child$propsData.key) === null || _child$propsData$key === void 0 ? void 0 : _child$propsData$key.startsWith('text-'));
281
- })) === null || _children$filter === void 0 ? void 0 : _children$filter.length) || 0;
276
+ var schema = target === null || target === void 0 ? void 0 : (_target$node = target.node) === null || _target$node === void 0 ? void 0 : _target$node.schema;
277
+ var currentLength = (schema === null || schema === void 0 ? void 0 : (_schema$children = schema.children) === null || _schema$children === void 0 ? void 0 : (_schema$children$filt = _schema$children.filter(function (child) {
278
+ var _child$props$key;
279
+ return child.componentName === 'NextText' && ((_child$props$key = child.props.key) === null || _child$props$key === void 0 ? void 0 : _child$props$key.startsWith('text-'));
280
+ })) === null || _schema$children$filt === void 0 ? void 0 : _schema$children$filt.length) || 0;
282
281
  if (value > currentLength) {
283
282
  // 需要添加新的文本组件
284
283
  for (var i = currentLength + 1; i <= value; i++) {
285
- var _children2;
286
- (_children2 = children) === null || _children2 === void 0 ? void 0 : _children2.push({
284
+ var _schema$children2;
285
+ schema === null || schema === void 0 ? void 0 : (_schema$children2 = schema.children) === null || _schema$children2 === void 0 ? void 0 : _schema$children2.push({
287
286
  componentName: 'NextText',
288
287
  props: {
289
288
  type: 'inherit',
@@ -294,12 +293,11 @@ var TeletextListMeta = {
294
293
  }
295
294
  } else if (value < currentLength) {
296
295
  // 需要移除多余的文本组件
297
- children.filter(function (child) {
298
- var _child$propsData2, _child$propsData2$key, _child$propsData3, _child$propsData3$key;
299
- return !(child.componentName === 'NextText' && (_child$propsData2 = child.propsData) !== null && _child$propsData2 !== void 0 && (_child$propsData2$key = _child$propsData2.key) !== null && _child$propsData2$key !== void 0 && _child$propsData2$key.startsWith('text-') && parseInt((_child$propsData3 = child.propsData) === null || _child$propsData3 === void 0 ? void 0 : (_child$propsData3$key = _child$propsData3.key) === null || _child$propsData3$key === void 0 ? void 0 : _child$propsData3$key.split('-')[1]) > value);
300
- }), _readOnlyError("children");
296
+ schema.children = schema.children.filter(function (child) {
297
+ var _child$props$key2;
298
+ return !(child.componentName === 'NextText' && (_child$props$key2 = child.props.key) !== null && _child$props$key2 !== void 0 && _child$props$key2.startsWith('text-') && parseInt(child.props.key.split('-')[1]) > value);
299
+ });
301
300
  }
302
- target === null || target === void 0 ? void 0 : (_target$node2 = target.node) === null || _target$node2 === void 0 ? void 0 : (_target$node2$childre = _target$node2.children) === null || _target$node2$childre === void 0 ? void 0 : _target$node2$childre.importSchema();
303
301
 
304
302
  // 更新数据源绑定的配置
305
303
  var dataListBindProp = target.parent.items.find(function (item) {
@@ -104,7 +104,7 @@ function fillRealVersion(meta, packageName, version, basicLibraryVersion) {
104
104
  packageName = '@dckj-npm/dc-material';
105
105
  }
106
106
  if (version === void 0) {
107
- version = '0.1.215';
107
+ version = '0.1.217';
108
108
  }
109
109
  if (basicLibraryVersion === void 0) {
110
110
  basicLibraryVersion = {
@@ -4,7 +4,6 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  exports.__esModule = true;
5
5
  exports["default"] = void 0;
6
6
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
7
- var _readOnlyError2 = _interopRequireDefault(require("@babel/runtime/helpers/readOnlyError"));
8
7
  var _props, _props$find, _props$find$setter, _props$find$setter$ge;
9
8
  var TeletextListMeta = {
10
9
  group: '低代码组件',
@@ -276,19 +275,19 @@ var TeletextListMeta = {
276
275
  },
277
276
  extraProps: {
278
277
  setValue: function setValue(target, value) {
279
- var _target$node, _children, _children$filter, _target$node2, _target$node2$childre, _target$parent$node;
278
+ var _target$node, _schema$children, _schema$children$filt, _target$parent$node;
280
279
  target.getProps().setPropValue('textLines', value);
281
280
  // 获取组件schema
282
- var children = target === null || target === void 0 ? void 0 : (_target$node = target.node) === null || _target$node === void 0 ? void 0 : _target$node.children;
283
- var currentLength = ((_children = children) === null || _children === void 0 ? void 0 : (_children$filter = _children.filter(function (child) {
284
- var _child$propsData, _child$propsData$key;
285
- return child.componentName === 'NextText' && ((_child$propsData = child.propsData) === null || _child$propsData === void 0 ? void 0 : (_child$propsData$key = _child$propsData.key) === null || _child$propsData$key === void 0 ? void 0 : _child$propsData$key.startsWith('text-'));
286
- })) === null || _children$filter === void 0 ? void 0 : _children$filter.length) || 0;
281
+ var schema = target === null || target === void 0 ? void 0 : (_target$node = target.node) === null || _target$node === void 0 ? void 0 : _target$node.schema;
282
+ var currentLength = (schema === null || schema === void 0 ? void 0 : (_schema$children = schema.children) === null || _schema$children === void 0 ? void 0 : (_schema$children$filt = _schema$children.filter(function (child) {
283
+ var _child$props$key;
284
+ return child.componentName === 'NextText' && ((_child$props$key = child.props.key) === null || _child$props$key === void 0 ? void 0 : _child$props$key.startsWith('text-'));
285
+ })) === null || _schema$children$filt === void 0 ? void 0 : _schema$children$filt.length) || 0;
287
286
  if (value > currentLength) {
288
287
  // 需要添加新的文本组件
289
288
  for (var i = currentLength + 1; i <= value; i++) {
290
- var _children2;
291
- (_children2 = children) === null || _children2 === void 0 ? void 0 : _children2.push({
289
+ var _schema$children2;
290
+ schema === null || schema === void 0 ? void 0 : (_schema$children2 = schema.children) === null || _schema$children2 === void 0 ? void 0 : _schema$children2.push({
292
291
  componentName: 'NextText',
293
292
  props: {
294
293
  type: 'inherit',
@@ -299,12 +298,11 @@ var TeletextListMeta = {
299
298
  }
300
299
  } else if (value < currentLength) {
301
300
  // 需要移除多余的文本组件
302
- children.filter(function (child) {
303
- var _child$propsData2, _child$propsData2$key, _child$propsData3, _child$propsData3$key;
304
- return !(child.componentName === 'NextText' && (_child$propsData2 = child.propsData) !== null && _child$propsData2 !== void 0 && (_child$propsData2$key = _child$propsData2.key) !== null && _child$propsData2$key !== void 0 && _child$propsData2$key.startsWith('text-') && parseInt((_child$propsData3 = child.propsData) === null || _child$propsData3 === void 0 ? void 0 : (_child$propsData3$key = _child$propsData3.key) === null || _child$propsData3$key === void 0 ? void 0 : _child$propsData3$key.split('-')[1]) > value);
305
- }), (0, _readOnlyError2["default"])("children");
301
+ schema.children = schema.children.filter(function (child) {
302
+ var _child$props$key2;
303
+ return !(child.componentName === 'NextText' && (_child$props$key2 = child.props.key) !== null && _child$props$key2 !== void 0 && _child$props$key2.startsWith('text-') && parseInt(child.props.key.split('-')[1]) > value);
304
+ });
306
305
  }
307
- target === null || target === void 0 ? void 0 : (_target$node2 = target.node) === null || _target$node2 === void 0 ? void 0 : (_target$node2$childre = _target$node2.children) === null || _target$node2$childre === void 0 ? void 0 : _target$node2$childre.importSchema();
308
306
 
309
307
  // 更新数据源绑定的配置
310
308
  var dataListBindProp = target.parent.items.find(function (item) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dckj-npm/dc-material",
3
- "version": "0.1.215",
3
+ "version": "0.1.217",
4
4
  "description": "dc低代码物料",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -106,7 +106,7 @@
106
106
  },
107
107
  "componentConfig": {
108
108
  "isComponentLibrary": true,
109
- "materialSchema": "https://unpkg.com/@dckj-npm/dc-material@0.1.215/build/lowcode/assets-prod.json"
109
+ "materialSchema": "https://unpkg.com/@dckj-npm/dc-material@0.1.217/build/lowcode/assets-prod.json"
110
110
  },
111
111
  "lcMeta": {
112
112
  "type": "component"