@logicflow/extension 2.0.0-beta.8 → 2.0.0

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 (54) hide show
  1. package/.turbo/turbo-build.log +389 -754
  2. package/CHANGELOG.md +764 -1256
  3. package/dist/index.min.js +16 -16
  4. package/es/components/highlight/index.d.ts +6 -4
  5. package/es/components/highlight/index.js +32 -5
  6. package/es/components/highlight/index.js.map +1 -1
  7. package/es/components/mini-map/index.d.ts +1 -1
  8. package/es/components/mini-map/index.js +1 -1
  9. package/es/components/selection-select/index.js +10 -6
  10. package/es/components/selection-select/index.js.map +1 -1
  11. package/es/dynamic-group/index.js +1 -1
  12. package/es/dynamic-group/index.js.map +1 -1
  13. package/es/dynamic-group/model.d.ts +2 -2
  14. package/es/dynamic-group/model.js.map +1 -1
  15. package/es/index.d.ts +1 -0
  16. package/es/index.js +2 -0
  17. package/es/index.js.map +1 -1
  18. package/es/tools/label/LabelOverlay.js +1 -1
  19. package/es/tools/label/index.js +4 -4
  20. package/es/tools/label/index.js.map +1 -1
  21. package/es/tools/label/mediumEditor.d.ts +1 -0
  22. package/es/tools/label/mediumEditor.js +1 -0
  23. package/es/tools/label/mediumEditor.js.map +1 -1
  24. package/lib/components/highlight/index.d.ts +6 -4
  25. package/lib/components/highlight/index.js +32 -5
  26. package/lib/components/highlight/index.js.map +1 -1
  27. package/lib/components/mini-map/index.d.ts +1 -1
  28. package/lib/components/mini-map/index.js +1 -1
  29. package/lib/components/selection-select/index.js +10 -6
  30. package/lib/components/selection-select/index.js.map +1 -1
  31. package/lib/dynamic-group/index.js +1 -1
  32. package/lib/dynamic-group/index.js.map +1 -1
  33. package/lib/dynamic-group/model.d.ts +2 -2
  34. package/lib/dynamic-group/model.js.map +1 -1
  35. package/lib/index.d.ts +1 -0
  36. package/lib/index.js +2 -0
  37. package/lib/index.js.map +1 -1
  38. package/lib/tools/label/LabelOverlay.js +1 -1
  39. package/lib/tools/label/index.js +4 -4
  40. package/lib/tools/label/index.js.map +1 -1
  41. package/lib/tools/label/mediumEditor.d.ts +1 -0
  42. package/lib/tools/label/mediumEditor.js +1 -0
  43. package/lib/tools/label/mediumEditor.js.map +1 -1
  44. package/package.json +6 -3
  45. package/src/bpmn-elements-adapter/README.md +1 -3
  46. package/src/components/highlight/index.ts +33 -6
  47. package/src/components/mini-map/index.ts +6 -6
  48. package/src/components/selection-select/index.ts +10 -6
  49. package/src/dynamic-group/index.ts +1 -1
  50. package/src/dynamic-group/model.ts +2 -2
  51. package/src/index.ts +3 -0
  52. package/src/tools/label/LabelOverlay.tsx +1 -1
  53. package/src/tools/label/index.ts +3 -3
  54. package/src/tools/label/mediumEditor.ts +1 -0
@@ -276,7 +276,7 @@ export class DynamicGroupNodeModel extends RectNodeModel<IGroupNodeProperties> {
276
276
  }
277
277
 
278
278
  // 折叠操作
279
- collapse() {
279
+ private collapse() {
280
280
  const { x, y, text, width, height, collapsedWidth, collapsedHeight } = this
281
281
  this.x = x - width / 2 + collapsedWidth / 2
282
282
  this.y = y - height / 2 + collapsedHeight / 2
@@ -293,7 +293,7 @@ export class DynamicGroupNodeModel extends RectNodeModel<IGroupNodeProperties> {
293
293
  }
294
294
 
295
295
  // 展开操作
296
- expand() {
296
+ private expand() {
297
297
  const {
298
298
  x,
299
299
  y,
package/src/index.ts CHANGED
@@ -39,3 +39,6 @@ export * from './materials/node-selection'
39
39
  */
40
40
  export * from './NodeResize'
41
41
  export * from './materials/group'
42
+
43
+ // 迷之插件
44
+ export * from './rect-label-node'
@@ -107,7 +107,7 @@ export class LabelOverlay extends Component<IToolProps, ILabelOverlayState> {
107
107
  } = this.props
108
108
 
109
109
  const elements = [...graphModel.nodes, ...graphModel.edges]
110
- const curExtension = extension['Label'] as LabelPlugin
110
+ const curExtension = extension['label'] as LabelPlugin
111
111
 
112
112
  if (curExtension) {
113
113
  const labels: h.JSX.Element[] = [] // 保存所有的 Label 元素
@@ -23,7 +23,7 @@ export type ILabelOptions = {
23
23
  }
24
24
 
25
25
  export class Label implements Extension {
26
- static pluginName = 'Label'
26
+ static pluginName = 'label'
27
27
 
28
28
  lf: LogicFlow
29
29
  options: ILabelOptions
@@ -197,7 +197,7 @@ export class Label implements Extension {
197
197
  * @param position
198
198
  */
199
199
  private addLabel(element: GraphElement, position: Position) {
200
- const { maxCount } = this
200
+ const { isMultiple, maxCount } = this
201
201
  const {
202
202
  properties: { _label, _labelOption },
203
203
  } = element
@@ -217,7 +217,7 @@ export class Label implements Extension {
217
217
  vertical: false,
218
218
  }
219
219
 
220
- if (len >= (curLabelOption?.maxCount ?? maxCount)) {
220
+ if (!isMultiple || len >= (curLabelOption?.maxCount ?? maxCount)) {
221
221
  return
222
222
  }
223
223
 
@@ -1,6 +1,7 @@
1
1
  import MediumEditor from 'medium-editor'
2
2
  import Picker from 'vanilla-picker'
3
3
  import rangy from 'rangy'
4
+ import 'rangy/lib/rangy-classapplier'
4
5
 
5
6
  export const defaultOptions = {
6
7
  toolbar: {