@next-bricks/visual-builder 1.22.2 → 1.24.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 (74) hide show
  1. package/dist/bricks.json +6 -5
  2. package/dist/chunks/{2252.395062aa.js → 2252.6c4f85f9.js} +3 -3
  3. package/dist/chunks/{2252.395062aa.js.map → 2252.6c4f85f9.js.map} +1 -1
  4. package/dist/chunks/{2980.fb2388ef.js → 2980.56778607.js} +2 -2
  5. package/dist/chunks/{2980.fb2388ef.js.map → 2980.56778607.js.map} +1 -1
  6. package/dist/chunks/{4837.c33c686f.js → 4837.df62d8e1.js} +2 -2
  7. package/dist/chunks/{4837.c33c686f.js.map → 4837.df62d8e1.js.map} +1 -1
  8. package/dist/chunks/{4947.87265cf9.js → 4947.8af23d2e.js} +3 -3
  9. package/dist/chunks/{4947.87265cf9.js.map → 4947.8af23d2e.js.map} +1 -1
  10. package/dist/chunks/5399.3fbcbf7e.js +2 -0
  11. package/dist/chunks/5399.3fbcbf7e.js.map +1 -0
  12. package/dist/chunks/{7218.9d0d0c2a.js → 7218.57b21ecf.js} +2 -2
  13. package/dist/chunks/{7218.9d0d0c2a.js.map → 7218.57b21ecf.js.map} +1 -1
  14. package/dist/chunks/859.bc26cb2d.js +3 -0
  15. package/dist/chunks/859.bc26cb2d.js.map +1 -0
  16. package/dist/chunks/8850.1d30fe19.js +3 -0
  17. package/dist/chunks/8850.1d30fe19.js.LICENSE.txt +34 -0
  18. package/dist/chunks/8850.1d30fe19.js.map +1 -0
  19. package/dist/chunks/{9027.85831c10.js → 9027.21af2a5d.js} +2 -2
  20. package/dist/chunks/{9027.85831c10.js.map → 9027.21af2a5d.js.map} +1 -1
  21. package/dist/chunks/{9515.7f8e4c58.js → 9515.80c4b472.js} +2 -2
  22. package/dist/chunks/{9515.7f8e4c58.js.map → 9515.80c4b472.js.map} +1 -1
  23. package/dist/chunks/{chat-preview.e4753612.js → chat-preview.75a05ac5.js} +3 -3
  24. package/dist/chunks/{chat-preview.e4753612.js.map → chat-preview.75a05ac5.js.map} +1 -1
  25. package/dist/chunks/{check-editor-by-name.928b7a67.js → check-editor-by-name.151786ec.js} +2 -2
  26. package/dist/chunks/{check-editor-by-name.928b7a67.js.map → check-editor-by-name.151786ec.js.map} +1 -1
  27. package/dist/chunks/{contract-select.148bab93.js → contract-select.b4daeecc.js} +3 -3
  28. package/dist/chunks/{contract-select.148bab93.js.map → contract-select.b4daeecc.js.map} +1 -1
  29. package/dist/chunks/get-dependency-tree.a0216e9a.js +2 -0
  30. package/dist/chunks/get-dependency-tree.a0216e9a.js.map +1 -0
  31. package/dist/chunks/main.7d000bed.js +2 -0
  32. package/dist/chunks/{main.99faedc6.js.map → main.7d000bed.js.map} +1 -1
  33. package/dist/chunks/{pre-generated-container.12850429.js → pre-generated-container.d8e62dfd.js} +2 -2
  34. package/dist/chunks/{pre-generated-container.12850429.js.map → pre-generated-container.d8e62dfd.js.map} +1 -1
  35. package/dist/chunks/{pre-generated-preview.99a84845.js → pre-generated-preview.78d438ab.js} +3 -3
  36. package/dist/chunks/{pre-generated-preview.99a84845.js.map → pre-generated-preview.78d438ab.js.map} +1 -1
  37. package/dist/chunks/property-editor.4015f465.js +2 -0
  38. package/dist/chunks/property-editor.4015f465.js.map +1 -0
  39. package/dist/chunks/{workbench-action-list.980559dc.js → workbench-action-list.29085ba6.js} +2 -2
  40. package/dist/chunks/{workbench-action-list.980559dc.js.map → workbench-action-list.29085ba6.js.map} +1 -1
  41. package/dist/chunks/{workbench-history-action.b7d27978.js → workbench-history-action.6927ae60.js} +3 -3
  42. package/dist/chunks/{workbench-history-action.b7d27978.js.map → workbench-history-action.6927ae60.js.map} +1 -1
  43. package/dist/index.d2024b46.js +2 -0
  44. package/dist/index.d2024b46.js.map +1 -0
  45. package/dist/manifest.json +39 -20
  46. package/dist/types.json +481 -258
  47. package/dist-types/bootstrap.d.ts +1 -0
  48. package/dist-types/data-providers/get-dependency-tree.d.ts +19 -0
  49. package/dist-types/data-providers/get-dependency-tree.spec.d.ts +1 -0
  50. package/dist-types/property-editor/components/common/ColorPickerComponent.d.ts +7 -0
  51. package/dist-types/property-editor/index.d.ts +28 -10
  52. package/dist-types/property-editor/utils/colorTransform.d.ts +12 -0
  53. package/dist-types/property-editor/utils/colorTrasnform.spec.d.ts +1 -0
  54. package/dist-types/property-editor/utils/formilySchemaFormatter.d.ts +2 -1
  55. package/package.json +2 -2
  56. package/dist/chunks/5399.d3b753b3.js +0 -2
  57. package/dist/chunks/5399.d3b753b3.js.map +0 -1
  58. package/dist/chunks/6233.f90eb59c.js +0 -3
  59. package/dist/chunks/6233.f90eb59c.js.map +0 -1
  60. package/dist/chunks/8091.c5adab63.js +0 -3
  61. package/dist/chunks/8091.c5adab63.js.LICENSE.txt +0 -54
  62. package/dist/chunks/8091.c5adab63.js.map +0 -1
  63. package/dist/chunks/main.99faedc6.js +0 -2
  64. package/dist/chunks/property-editor.ed34d324.js +0 -2
  65. package/dist/chunks/property-editor.ed34d324.js.map +0 -1
  66. package/dist/index.770cc005.js +0 -2
  67. package/dist/index.770cc005.js.map +0 -1
  68. /package/dist/chunks/{2252.395062aa.js.LICENSE.txt → 2252.6c4f85f9.js.LICENSE.txt} +0 -0
  69. /package/dist/chunks/{4947.87265cf9.js.LICENSE.txt → 4947.8af23d2e.js.LICENSE.txt} +0 -0
  70. /package/dist/chunks/{6233.f90eb59c.js.LICENSE.txt → 859.bc26cb2d.js.LICENSE.txt} +0 -0
  71. /package/dist/chunks/{chat-preview.e4753612.js.LICENSE.txt → chat-preview.75a05ac5.js.LICENSE.txt} +0 -0
  72. /package/dist/chunks/{contract-select.148bab93.js.LICENSE.txt → contract-select.b4daeecc.js.LICENSE.txt} +0 -0
  73. /package/dist/chunks/{pre-generated-preview.99a84845.js.LICENSE.txt → pre-generated-preview.78d438ab.js.LICENSE.txt} +0 -0
  74. /package/dist/chunks/{workbench-history-action.b7d27978.js.LICENSE.txt → workbench-history-action.6927ae60.js.LICENSE.txt} +0 -0
@@ -17,3 +17,4 @@ import "./pre-generated-container/index.js";
17
17
  import "./property-editor/index.js";
18
18
  import "./data-providers/check-editor-by-name.js";
19
19
  import "./data-providers/get-data-dependency.js";
20
+ import "./data-providers/get-dependency-tree.js";
@@ -0,0 +1,19 @@
1
+ import { ContextConf } from "@next-core/types";
2
+ import { MenuIcon } from "@next-shared/general/types";
3
+ interface DataItem extends ContextConf {
4
+ $key?: string;
5
+ path?: string;
6
+ }
7
+ interface NodeItem {
8
+ name: string;
9
+ key: string;
10
+ path?: string;
11
+ icon?: MenuIcon;
12
+ data?: DataItem;
13
+ unreachable?: boolean;
14
+ children?: NodeItem[];
15
+ }
16
+ export declare function getDependencyTree(nodeDataList: NodeItem[], options: {
17
+ dataType: string;
18
+ }): NodeItem[];
19
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { ColorPickerProps } from "antd/lib/color-picker";
3
+ interface ColorPickerComponentProps extends Omit<ColorPickerProps, "onChange"> {
4
+ onChange?: (value: string) => void;
5
+ }
6
+ export declare function ColorPickerComponent(props: ColorPickerComponentProps): React.ReactElement;
7
+ export {};
@@ -7,6 +7,7 @@ import { CategoryTitle } from "./components/CategoryTitle";
7
7
  import { AdvancedFormItem } from "./components/AdvancedFormItem";
8
8
  import { CodeEditorComponent } from "./components/common/CodeEditorComponent";
9
9
  import { IconSelectComponent } from "./components/common/IconSelectComponent";
10
+ import { ColorPickerComponent } from "./components/common/ColorPickerComponent";
10
11
  import { DataNode } from "./utils/formilySchemaFormatter";
11
12
  import "./style.css";
12
13
  import { BrickPackage } from "@next-core/types";
@@ -14,7 +15,7 @@ declare const SchemaField: {
14
15
  <Decorator extends import("@formily/react").JSXComponent, Component extends import("@formily/react").JSXComponent>(props: import("@formily/react").ISchemaFieldProps<Decorator, Component, import("@formily/core").ObjectField<Decorator, Component>>): JSX.Element;
15
16
  displayName: string;
16
17
  Markup: {
17
- <Decorator_1 extends "CodeEditor" | "FormLayout" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "FormCollapse.CollapsePanel" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_1 extends "CodeEditor" | "FormLayout" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "FormCollapse.CollapsePanel" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaMarkupFieldProps<{
18
+ <Decorator_1 extends "CodeEditor" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_1 extends "CodeEditor" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaMarkupFieldProps<{
18
19
  FormLayout: React.FC<React.PropsWithChildren<import("@formily/antd-v5").IFormLayoutProps>> & {
19
20
  useFormLayout: () => import("@formily/antd-v5").IFormLayoutContext;
20
21
  useFormDeepLayout: () => import("@formily/antd-v5").IFormLayoutContext;
@@ -50,11 +51,12 @@ declare const SchemaField: {
50
51
  CategoryTitle: typeof CategoryTitle;
51
52
  CodeEditor: typeof CodeEditorComponent;
52
53
  IconSelect: typeof IconSelectComponent;
54
+ ColorPicker: typeof ColorPickerComponent;
53
55
  }, Component_1, Decorator_1>): JSX.Element;
54
56
  displayName: string;
55
57
  };
56
58
  String: {
57
- <Decorator_2 extends "CodeEditor" | "FormLayout" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "FormCollapse.CollapsePanel" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_2 extends "CodeEditor" | "FormLayout" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "FormCollapse.CollapsePanel" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
59
+ <Decorator_2 extends "CodeEditor" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_2 extends "CodeEditor" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
58
60
  FormLayout: React.FC<React.PropsWithChildren<import("@formily/antd-v5").IFormLayoutProps>> & {
59
61
  useFormLayout: () => import("@formily/antd-v5").IFormLayoutContext;
60
62
  useFormDeepLayout: () => import("@formily/antd-v5").IFormLayoutContext;
@@ -90,11 +92,12 @@ declare const SchemaField: {
90
92
  CategoryTitle: typeof CategoryTitle;
91
93
  CodeEditor: typeof CodeEditorComponent;
92
94
  IconSelect: typeof IconSelectComponent;
95
+ ColorPicker: typeof ColorPickerComponent;
93
96
  }, Component_2, Decorator_2>): JSX.Element;
94
97
  displayName: string;
95
98
  };
96
99
  Object: {
97
- <Decorator_3 extends "CodeEditor" | "FormLayout" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "FormCollapse.CollapsePanel" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_3 extends "CodeEditor" | "FormLayout" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "FormCollapse.CollapsePanel" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
100
+ <Decorator_3 extends "CodeEditor" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_3 extends "CodeEditor" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
98
101
  FormLayout: React.FC<React.PropsWithChildren<import("@formily/antd-v5").IFormLayoutProps>> & {
99
102
  useFormLayout: () => import("@formily/antd-v5").IFormLayoutContext;
100
103
  useFormDeepLayout: () => import("@formily/antd-v5").IFormLayoutContext;
@@ -130,11 +133,12 @@ declare const SchemaField: {
130
133
  CategoryTitle: typeof CategoryTitle;
131
134
  CodeEditor: typeof CodeEditorComponent;
132
135
  IconSelect: typeof IconSelectComponent;
136
+ ColorPicker: typeof ColorPickerComponent;
133
137
  }, Component_3, Decorator_3>): JSX.Element;
134
138
  displayName: string;
135
139
  };
136
140
  Array: {
137
- <Decorator_4 extends "CodeEditor" | "FormLayout" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "FormCollapse.CollapsePanel" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_4 extends "CodeEditor" | "FormLayout" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "FormCollapse.CollapsePanel" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
141
+ <Decorator_4 extends "CodeEditor" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_4 extends "CodeEditor" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
138
142
  FormLayout: React.FC<React.PropsWithChildren<import("@formily/antd-v5").IFormLayoutProps>> & {
139
143
  useFormLayout: () => import("@formily/antd-v5").IFormLayoutContext;
140
144
  useFormDeepLayout: () => import("@formily/antd-v5").IFormLayoutContext;
@@ -170,11 +174,12 @@ declare const SchemaField: {
170
174
  CategoryTitle: typeof CategoryTitle;
171
175
  CodeEditor: typeof CodeEditorComponent;
172
176
  IconSelect: typeof IconSelectComponent;
177
+ ColorPicker: typeof ColorPickerComponent;
173
178
  }, Component_4, Decorator_4>): JSX.Element;
174
179
  displayName: string;
175
180
  };
176
181
  Boolean: {
177
- <Decorator_5 extends "CodeEditor" | "FormLayout" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "FormCollapse.CollapsePanel" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_5 extends "CodeEditor" | "FormLayout" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "FormCollapse.CollapsePanel" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
182
+ <Decorator_5 extends "CodeEditor" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_5 extends "CodeEditor" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
178
183
  FormLayout: React.FC<React.PropsWithChildren<import("@formily/antd-v5").IFormLayoutProps>> & {
179
184
  useFormLayout: () => import("@formily/antd-v5").IFormLayoutContext;
180
185
  useFormDeepLayout: () => import("@formily/antd-v5").IFormLayoutContext;
@@ -210,11 +215,12 @@ declare const SchemaField: {
210
215
  CategoryTitle: typeof CategoryTitle;
211
216
  CodeEditor: typeof CodeEditorComponent;
212
217
  IconSelect: typeof IconSelectComponent;
218
+ ColorPicker: typeof ColorPickerComponent;
213
219
  }, Component_5, Decorator_5>): JSX.Element;
214
220
  displayName: string;
215
221
  };
216
222
  Date: {
217
- <Decorator_6 extends "CodeEditor" | "FormLayout" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "FormCollapse.CollapsePanel" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_6 extends "CodeEditor" | "FormLayout" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "FormCollapse.CollapsePanel" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
223
+ <Decorator_6 extends "CodeEditor" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_6 extends "CodeEditor" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
218
224
  FormLayout: React.FC<React.PropsWithChildren<import("@formily/antd-v5").IFormLayoutProps>> & {
219
225
  useFormLayout: () => import("@formily/antd-v5").IFormLayoutContext;
220
226
  useFormDeepLayout: () => import("@formily/antd-v5").IFormLayoutContext;
@@ -250,11 +256,12 @@ declare const SchemaField: {
250
256
  CategoryTitle: typeof CategoryTitle;
251
257
  CodeEditor: typeof CodeEditorComponent;
252
258
  IconSelect: typeof IconSelectComponent;
259
+ ColorPicker: typeof ColorPickerComponent;
253
260
  }, Component_6, Decorator_6>): JSX.Element;
254
261
  displayName: string;
255
262
  };
256
263
  DateTime: {
257
- <Decorator_7 extends "CodeEditor" | "FormLayout" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "FormCollapse.CollapsePanel" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_7 extends "CodeEditor" | "FormLayout" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "FormCollapse.CollapsePanel" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
264
+ <Decorator_7 extends "CodeEditor" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_7 extends "CodeEditor" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
258
265
  FormLayout: React.FC<React.PropsWithChildren<import("@formily/antd-v5").IFormLayoutProps>> & {
259
266
  useFormLayout: () => import("@formily/antd-v5").IFormLayoutContext;
260
267
  useFormDeepLayout: () => import("@formily/antd-v5").IFormLayoutContext;
@@ -290,11 +297,12 @@ declare const SchemaField: {
290
297
  CategoryTitle: typeof CategoryTitle;
291
298
  CodeEditor: typeof CodeEditorComponent;
292
299
  IconSelect: typeof IconSelectComponent;
300
+ ColorPicker: typeof ColorPickerComponent;
293
301
  }, Component_7, Decorator_7>): JSX.Element;
294
302
  displayName: string;
295
303
  };
296
304
  Void: {
297
- <Decorator_8 extends "CodeEditor" | "FormLayout" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "FormCollapse.CollapsePanel" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_8 extends "CodeEditor" | "FormLayout" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "FormCollapse.CollapsePanel" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
305
+ <Decorator_8 extends "CodeEditor" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_8 extends "CodeEditor" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
298
306
  FormLayout: React.FC<React.PropsWithChildren<import("@formily/antd-v5").IFormLayoutProps>> & {
299
307
  useFormLayout: () => import("@formily/antd-v5").IFormLayoutContext;
300
308
  useFormDeepLayout: () => import("@formily/antd-v5").IFormLayoutContext;
@@ -330,11 +338,12 @@ declare const SchemaField: {
330
338
  CategoryTitle: typeof CategoryTitle;
331
339
  CodeEditor: typeof CodeEditorComponent;
332
340
  IconSelect: typeof IconSelectComponent;
341
+ ColorPicker: typeof ColorPickerComponent;
333
342
  }, Component_8, Decorator_8>): JSX.Element;
334
343
  displayName: string;
335
344
  };
336
345
  Number: {
337
- <Decorator_9 extends "CodeEditor" | "FormLayout" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "FormCollapse.CollapsePanel" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_9 extends "CodeEditor" | "FormLayout" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "FormCollapse.CollapsePanel" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
346
+ <Decorator_9 extends "CodeEditor" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group", Component_9 extends "CodeEditor" | "FormItemWithoutAdvanced" | "FormItem" | "Input" | "Switch" | "FormLayout" | "FormCollapse" | "NumberPicker" | "Radio" | "Select" | "CategoryTitle" | "IconSelect" | "ColorPicker" | "FormCollapse.CollapsePanel" | "FormItemWithoutAdvanced.BaseItem" | "Input.TextArea" | "Switch.$$typeof" | "FormLayout.useFormLayout" | "FormLayout.useFormDeepLayout" | "FormLayout.useFormShallowLayout" | "FormCollapse.createFormCollapse" | "NumberPicker.$$typeof" | "Radio.$$typeof" | "Radio.__ANT_RADIO" | "Radio.Group">(props: import("@formily/react").ISchemaTypeFieldProps<{
338
347
  FormLayout: React.FC<React.PropsWithChildren<import("@formily/antd-v5").IFormLayoutProps>> & {
339
348
  useFormLayout: () => import("@formily/antd-v5").IFormLayoutContext;
340
349
  useFormDeepLayout: () => import("@formily/antd-v5").IFormLayoutContext;
@@ -370,6 +379,7 @@ declare const SchemaField: {
370
379
  CategoryTitle: typeof CategoryTitle;
371
380
  CodeEditor: typeof CodeEditorComponent;
372
381
  IconSelect: typeof IconSelectComponent;
382
+ ColorPicker: typeof ColorPickerComponent;
373
383
  }, Component_9, Decorator_9>): JSX.Element;
374
384
  displayName: string;
375
385
  };
@@ -391,6 +401,9 @@ export interface EditorComponentProps {
391
401
  scope: {
392
402
  advancedMode: boolean;
393
403
  dataList: DataItem[];
404
+ extraLibs: any;
405
+ links: any;
406
+ tokenClick: (token: string) => void;
394
407
  };
395
408
  }
396
409
  export interface DefinitionItem {
@@ -419,6 +432,8 @@ export declare class PropertyEditor extends ReactNextElement {
419
432
  accessor advancedMode: boolean | undefined;
420
433
  accessor dataList: DataItem[];
421
434
  accessor editorPackages: BrickPackage[];
435
+ accessor links: any;
436
+ accessor extraLibs: any;
422
437
  validate(): void;
423
438
  render(): React.JSX.Element;
424
439
  }
@@ -427,8 +442,11 @@ export interface PropertyEditorProps {
427
442
  editorName: string;
428
443
  advancedMode?: boolean;
429
444
  dataList: DataItem[];
445
+ extraLibs: any;
446
+ links: any;
430
447
  editorPackages: BrickPackage[];
431
448
  handleValuesChange: (value: any) => void;
449
+ handleTokenClick: (token: string) => void;
432
450
  onSubmitEffect: (listener: (value: any, form: Form) => any) => void;
433
451
  }
434
- export declare function LegacyPropertyEditor({ advancedMode, values, editorName, dataList, editorPackages, handleValuesChange, onSubmitEffect, }: PropertyEditorProps, ref: any): React.JSX.Element;
452
+ export declare function LegacyPropertyEditor({ advancedMode, values, editorName, dataList, editorPackages, extraLibs, links, handleValuesChange, handleTokenClick, onSubmitEffect, }: PropertyEditorProps, ref: any): React.JSX.Element;
@@ -0,0 +1,12 @@
1
+ import type { ColorPickerProps } from "antd";
2
+ export type Presets = Required<ColorPickerProps>["presets"];
3
+ export type ColorItem = {
4
+ metaColor: {
5
+ format?: string;
6
+ originalInput: string;
7
+ };
8
+ };
9
+ export declare const presets: import("antd/es/color-picker/interface").PresetsItem[];
10
+ export declare const compressPresets: (presets: Presets) => Presets;
11
+ export declare const trasnformColorToCssVariables: (presets: Presets, color: string) => string;
12
+ export declare const transformCssVariablesToColor: (presets: Presets, color: string) => string;
@@ -1,4 +1,5 @@
1
1
  import type { ISchema } from "@formily/react";
2
+ export declare const NORMAL_FORM_KEY = "#normal_form";
2
3
  export declare const ADVANCED_FORM_KEY = "#advanced_form";
3
4
  type ComponentType = string | {
4
5
  name: string;
@@ -14,5 +15,5 @@ export interface DataNode {
14
15
  children?: DataNode[];
15
16
  [k: string]: any;
16
17
  }
17
- export declare function formilySchemaFormatter(data: DataNode, advancedMode?: boolean): ISchema;
18
+ export declare function formilySchemaFormatter(data: DataNode): ISchema;
18
19
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/visual-builder",
3
- "version": "1.22.2",
3
+ "version": "1.24.0",
4
4
  "homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/visual-builder",
5
5
  "repository": {
6
6
  "type": "git",
@@ -44,5 +44,5 @@
44
44
  "@next-bricks/icons": "*",
45
45
  "@next-bricks/vs": "*"
46
46
  },
47
- "gitHead": "c45fb91bfa3ad5f152aad66a8757db2fec2b73a1"
47
+ "gitHead": "a5e9dc77226ee4068fe3c91a0c5bd14410df7600"
48
48
  }
@@ -1,2 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_visual_builder=globalThis.webpackChunk_next_bricks_visual_builder||[]).push([[5399],{5399:(e,t,s)=>{s.r(t),s.d(t,{enqueueStableLoadBricks:()=>f,enqueueStableLoadProcessors:()=>p,flushStableLoadBricks:()=>d,loadBricksImperatively:()=>w,loadEditorsImperatively:()=>m,loadProcessorsImperatively:()=>h,loadScript:()=>o,loadSharedModule:()=>a,loadStyle:()=>i});const n=new Map;function r(e,t,s,o){if(Array.isArray(t))return Promise.all(t.map((t=>r(e,t,s))));const i=s&&!/^https?:/.test(t)?`${s}${t}`:t,a=n.get(i);if(a)return a;const c=new Promise(((t,s)=>{const n=()=>{window.dispatchEvent(new Event("request.end"))},r=document.createElement("style"===e?"link":"script");"script"===e?Object.assign(r,{type:"text/javascript",async:!0,...o,src:i}):Object.assign(r,{rel:"stylesheet",...o,href:i}),r.onload=()=>{t(i),n()},r.onerror=e=>{s(e),n()};const a=document.currentScript||document.getElementsByTagName("script")[0];a.parentNode.insertBefore(r,a),window.dispatchEvent(new Event("request.start"))}));return n.set(i,c),c}function o(e,t,s){return r("script",e,t,s)}function i(e,t,s){return r("style",e,t,s)}async function a(e,t){await s.I("default");const n=window[e];return await n.init(s.S.default),(await n.get(t))()}let c,l=!1;const u=new Promise((e=>{c=e}));function d(){l||c()}function f(e,t){return E(g("bricks",e,t))}function p(e,t){return E(g("processors",e,t))}async function w(e,t){const s=g("bricks",e,t);return d(),E(s)}function h(e,t){const s=g("processors",e,t);return d(),E(s)}function m(e,t){const s=g("editors",e,t);return d(),E(s)}let v;const b="v2-adapter.load-bricks";function y(e,t,s){const n=new Map,r=new Set,o=t=>{var i;if(r.has(t))return;let a,c,l;if(r.add(t),"processors"===e||t.includes(".")){[c,l]=t.split(".");const n=`bricks/${"processors"===e?(p=c,p.replace(/[A-Z]/g,(e=>`-${e[0].toLocaleLowerCase()}`)).replace(/_[0-9]/g,(e=>`-${e[1]}`))):c}`;a=s.get(n)}else if("editors"===e){l=t;for(const e of s.values()){var u;null!==(u=e.propertyEditors??e.editors)&&void 0!==u&&u.some((e=>e===l))&&(a=e)}}else{let e;l=t;for(const n of s.values()){var d;if(null!==(d=n.elements)&&void 0!==d&&d.some((e=>e===l))){var f;if(null===(f=n.deprecatedElements)||void 0===f||!f.includes(t)){a=n;break}e=n}}!a&&e&&(a=e)}var p;if(!a)return void console.error(`Package for ${t} not found.`);let w=n.get(a);w||(w=[],n.set(a,w)),w.push({fullName:t,lastName:l});const h=null===(i=a.dependencies)||void 0===i?void 0:i[t];if(h)for(const e of h)o(e)};for(const e of t)o(e);return n}async function k(e,t,s){const n=`${"processors"===e||"editors"===e?`./${e}/`:"./"}${s.lastName}`;try{await a(t,n)}catch(t){throw console.error(t),new Error(`Load ${e} of "${s.fullName}" failed`)}}function P(e,t,s){return t.map((async t=>(await o(t.filePath,window.PUBLIC_ROOT??""),await u,Promise.all(s.get(t).map((s=>k(e,t.id,s)))))))}async function g(e,t,s){const n=new Map;for(const e of s){const t=e.id??$(e.filePath);n.set(t,e)}const r=y(e,t,n);let i;const a=[],u=[];let d;for(const e of r.keys())if(e.id)"bricks/basic"===e.id?i=e:u.push(e);else if(a.push(e),d=n.get("bricks/v2-adapter"),!d)throw new Error("Using v2 bricks, but v2-adapter not found");const f=d;let p;const w=i;if(w){const t=o(w.filePath,window.PUBLIC_ROOT??"");l||(l=!0,t.then((()=>Promise.resolve())).then(c)),p=t.then((()=>Promise.all(r.get(w).map((t=>k(e,w.id,t))))))}const h=[p].concat(P(e,u,r));if(f&&a.length>0){if(!v){const e=y("bricks",[b],n),t=[...e.keys()];v=(async()=>(await Promise.all(P("bricks",t,e)),document.createElement(b)))()}h.push(v.then((t=>Promise.all(a.map((n=>{const o=$(n.filePath).split("/")[1];return t.resolve(f.filePath,"editors"===e?n.propertyEditorsJsFilePath??n.filePath:n.filePath,"bricks"===e?r.get(n).map((e=>`${o}.${e.lastName}`)):[],n.dll,s)}))))))}await Promise.all(h)}async function E(e){window.dispatchEvent(new Event("request.start"));try{await e}finally{window.dispatchEvent(new Event("request.end"))}}function $(e){return e.split("/").slice(0,2).join("/")}}}]);
2
- //# sourceMappingURL=5399.d3b753b3.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunks/5399.d3b753b3.js","mappings":"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","sources":["webpack:///../../node_modules/@next-core/loader/dist/esm/loadScriptOrStyle.js","webpack:///../../node_modules/@next-core/loader/dist/esm/loadScript.js","webpack:///../../node_modules/@next-core/loader/dist/esm/loadStyle.js","webpack:///../../node_modules/@next-core/loader/dist/esm/loadSharedModule.js","webpack:///../../node_modules/@next-core/loader/dist/esm/stableLoadBricks.js"],"sourcesContent":["const cache = new Map();\nexport default function loadScriptOrStyle(type, src, prefix, attrs) {\n if (Array.isArray(src)) {\n return Promise.all(src.map(item => loadScriptOrStyle(type, item, prefix)));\n }\n const fixedSrc = prefix && !/^https?:/.test(src) ? `${prefix}${src}` : src;\n const cachedPromise = cache.get(fixedSrc);\n if (cachedPromise) {\n return cachedPromise;\n }\n const promise = new Promise((resolve, reject) => {\n const end = () => {\n window.dispatchEvent(new Event(\"request.end\"));\n };\n const element = document.createElement(type === \"style\" ? \"link\" : \"script\");\n if (type === \"script\") {\n Object.assign(element, {\n type: \"text/javascript\",\n async: true,\n ...attrs,\n src: fixedSrc\n });\n } else {\n Object.assign(element, {\n rel: \"stylesheet\",\n ...attrs,\n href: fixedSrc\n });\n }\n element.onload = () => {\n resolve(fixedSrc);\n end();\n };\n element.onerror = e => {\n reject(e);\n end();\n };\n const firstScript = document.currentScript || document.getElementsByTagName(\"script\")[0];\n firstScript.parentNode.insertBefore(element, firstScript);\n window.dispatchEvent(new Event(\"request.start\"));\n });\n cache.set(fixedSrc, promise);\n return promise;\n}\n//# sourceMappingURL=loadScriptOrStyle.js.map","import loadScriptOrStyle from \"./loadScriptOrStyle.js\";\nexport default function loadScript(src, prefix, attrs) {\n return loadScriptOrStyle(\"script\", src, prefix, attrs);\n}\n//# sourceMappingURL=loadScript.js.map","import loadScriptOrStyle from \"./loadScriptOrStyle.js\";\nexport default function loadStyle(src, prefix, attrs) {\n return loadScriptOrStyle(\"style\", src, prefix, attrs);\n}\n//# sourceMappingURL=loadStyle.js.map","// https://github.com/module-federation/module-federation-examples/blob/eda9493f3991a423479fd834cfb1d7b241d9d1f0/advanced-api/dynamic-remotes/app1/src/App.js\nexport default async function loadSharedModule(scope, module) {\n // Initializes the share scope. This fills it with known provided modules from this build and all remotes\n await __webpack_init_sharing__(\"default\");\n const container = window[scope]; // or get the container somewhere else\n // Initialize the container, it may provide shared modules\n await container.init(__webpack_share_scopes__.default);\n const factory = await container.get(module);\n return factory();\n}\n//# sourceMappingURL=loadSharedModule.js.map","import loadScript from \"./loadScript.js\";\nimport loadSharedModule from \"./loadSharedModule.js\";\nlet resolveBasicPkg;\nlet basicPkgWillBeResolved = false;\nconst waitBasicPkg = new Promise(resolve => {\n resolveBasicPkg = resolve;\n});\nexport function flushStableLoadBricks() {\n if (!basicPkgWillBeResolved) {\n resolveBasicPkg();\n }\n}\n\n/**\n * When loading bundles with webpack module federation concurrently, if\n * these bundles share some modules, webpack will load a singleton module\n * if versions are matched. Webpack will use the first bundle who started\n * to init the shared scope. Generally which bundle to use for a specific\n * module, does not matter. However, it may cause flaky result since the\n * shared module may from different bundles which maybe not exactly the\n * same, especially developers declare dependencies incorrectly sometimes.\n * So in order to make it less flaky, we try to make a BASIC package takes\n * precedence over others. We will always load the shared modules from the\n * basic package bundle if it contains the shared modules.\n */\nexport function enqueueStableLoadBricks(bricks, brickPackages) {\n const promise = enqueueStableLoad(\"bricks\", bricks, brickPackages);\n return dispatchRequestStatus(promise);\n}\nexport function enqueueStableLoadProcessors(processors, brickPackages) {\n const promise = enqueueStableLoad(\"processors\", processors, brickPackages);\n return dispatchRequestStatus(promise);\n}\nexport async function loadBricksImperatively(bricks, brickPackages) {\n const promise = enqueueStableLoad(\"bricks\", bricks, brickPackages);\n flushStableLoadBricks();\n return dispatchRequestStatus(promise);\n}\nexport function loadProcessorsImperatively(processors, brickPackages) {\n const promise = enqueueStableLoad(\"processors\", processors, brickPackages);\n flushStableLoadBricks();\n return dispatchRequestStatus(promise);\n}\nexport function loadEditorsImperatively(editors, brickPackages) {\n const promise = enqueueStableLoad(\"editors\", editors, brickPackages);\n flushStableLoadBricks();\n return dispatchRequestStatus(promise);\n}\nlet v2AdapterPromise;\nconst V2_ADAPTER_LOAD_BRICKS = \"v2-adapter.load-bricks\";\n// Get brick/processor items including their dependencies\nfunction getItemsByPkg(type, list, brickPackagesMap) {\n const itemsByPkg = new Map();\n const listToLoad = new Set();\n const add = item => {\n var _pkg$dependencies;\n if (listToLoad.has(item)) {\n return;\n }\n listToLoad.add(item);\n let pkg;\n let namespace;\n let lastName;\n if (type === \"processors\" || item.includes(\".\")) {\n [namespace, lastName] = item.split(\".\");\n const pkgId = `bricks/${type === \"processors\" ? getProcessorPackageName(namespace) : namespace}`;\n pkg = brickPackagesMap.get(pkgId);\n } else if (type === \"editors\") {\n lastName = item;\n for (const p of brickPackagesMap.values()) {\n var _ref;\n if ((_ref = p.propertyEditors ?? p.editors) !== null && _ref !== void 0 && _ref.some(e => e === lastName)) {\n pkg = p;\n }\n }\n } else {\n lastName = item;\n let deprecatedBrickInThisPkg;\n for (const p of brickPackagesMap.values()) {\n var _p$elements;\n if ((_p$elements = p.elements) !== null && _p$elements !== void 0 && _p$elements.some(e => e === lastName)) {\n var _p$deprecatedElements;\n if ((_p$deprecatedElements = p.deprecatedElements) !== null && _p$deprecatedElements !== void 0 && _p$deprecatedElements.includes(item)) {\n deprecatedBrickInThisPkg = p;\n } else {\n pkg = p;\n break;\n }\n }\n }\n if (!pkg && deprecatedBrickInThisPkg) {\n pkg = deprecatedBrickInThisPkg;\n }\n }\n if (!pkg) {\n // eslint-disable-next-line no-console\n console.error(`Package for ${item} not found.`);\n return;\n }\n let groupItems = itemsByPkg.get(pkg);\n if (!groupItems) {\n groupItems = [];\n itemsByPkg.set(pkg, groupItems);\n }\n groupItems.push({\n fullName: item,\n lastName\n });\n\n // Load their dependencies too\n const deps = (_pkg$dependencies = pkg.dependencies) === null || _pkg$dependencies === void 0 ? void 0 : _pkg$dependencies[item];\n if (deps) {\n for (const dep of deps) {\n add(dep);\n }\n }\n };\n for (const item of list) {\n add(item);\n }\n return itemsByPkg;\n}\nasync function loadBrickModule(type, pkgId, item) {\n const moduleName = `${type === \"processors\" || type === \"editors\" ? `./${type}/` : \"./\"}${item.lastName}`;\n try {\n await loadSharedModule(pkgId, moduleName);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(error);\n throw new Error(`Load ${type} of \"${item.fullName}\" failed`);\n }\n}\nfunction loadRestBricks(type, pkgs, itemsMap) {\n return pkgs.map(async pkg => {\n await loadScript(pkg.filePath, window.PUBLIC_ROOT ?? \"\");\n await waitBasicPkg;\n return Promise.all(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n itemsMap.get(pkg).map(item => loadBrickModule(type, pkg.id, item)));\n });\n}\nasync function enqueueStableLoad(type, list, brickPackages) {\n const brickPackagesMap = new Map();\n for (const pkg of brickPackages) {\n const pkgId = pkg.id ?? getPkgIdByFilePath(pkg.filePath);\n brickPackagesMap.set(pkgId, pkg);\n }\n const itemsByPkg = getItemsByPkg(type, list, brickPackagesMap);\n let foundBasicPkg;\n const v2Packages = [];\n const v3PackagesOtherThanBasic = [];\n let maybeV2Adapter;\n for (const pkg of itemsByPkg.keys()) {\n if (pkg.id) {\n if (pkg.id === \"bricks/basic\") {\n foundBasicPkg = pkg;\n } else {\n v3PackagesOtherThanBasic.push(pkg);\n }\n } else {\n // Brick packages of v2 has no `id`\n v2Packages.push(pkg);\n maybeV2Adapter = brickPackagesMap.get(\"bricks/v2-adapter\");\n if (!maybeV2Adapter) {\n throw new Error(\"Using v2 bricks, but v2-adapter not found\");\n }\n }\n }\n const v2Adapter = maybeV2Adapter;\n let basicPkgPromise;\n const basicPkg = foundBasicPkg;\n if (basicPkg) {\n const tempPromise = loadScript(basicPkg.filePath, window.PUBLIC_ROOT ?? \"\");\n // Packages other than BASIC will wait for an extra micro-task tick.\n if (!basicPkgWillBeResolved) {\n basicPkgWillBeResolved = true;\n tempPromise.then(() => Promise.resolve()).then(resolveBasicPkg);\n }\n basicPkgPromise = tempPromise.then(() => Promise.all(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n itemsByPkg.get(basicPkg).map(item => loadBrickModule(type, basicPkg.id, item))));\n }\n const pkgPromises = [basicPkgPromise].concat(loadRestBricks(type, v3PackagesOtherThanBasic, itemsByPkg));\n if (v2Adapter && v2Packages.length > 0) {\n if (!v2AdapterPromise) {\n // Load `v2-adapter.load-bricks` and its dependencies\n const v2AdapterItemsByPkg = getItemsByPkg(\"bricks\", [V2_ADAPTER_LOAD_BRICKS], brickPackagesMap);\n const v2AdapterPackages = [...v2AdapterItemsByPkg.keys()];\n const loadV2Adapter = async () => {\n await Promise.all(loadRestBricks(\"bricks\", v2AdapterPackages, v2AdapterItemsByPkg));\n return document.createElement(V2_ADAPTER_LOAD_BRICKS);\n };\n v2AdapterPromise = loadV2Adapter();\n }\n pkgPromises.push(v2AdapterPromise.then(adapter => Promise.all(v2Packages.map(pkg => {\n const pkgId = getPkgIdByFilePath(pkg.filePath);\n const pkgNamespace = pkgId.split(\"/\")[1];\n return adapter.resolve(v2Adapter.filePath, type === \"editors\" ? pkg.propertyEditorsJsFilePath ?? pkg.filePath : pkg.filePath, type === \"bricks\" ?\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n itemsByPkg.get(pkg).map(item => `${pkgNamespace}.${item.lastName}`) : [], pkg.dll,\n // Todo: remove `brickPackages` as an argument\n brickPackages);\n }))));\n }\n await Promise.all(pkgPromises);\n}\nasync function dispatchRequestStatus(promise) {\n window.dispatchEvent(new Event(\"request.start\"));\n try {\n await promise;\n } finally {\n window.dispatchEvent(new Event(\"request.end\"));\n }\n}\nfunction getProcessorPackageName(camelPackageName) {\n return camelPackageName.replace(/[A-Z]/g, match => `-${match[0].toLocaleLowerCase()}`).replace(/_[0-9]/g, match => `-${match[1]}`);\n}\nfunction getPkgIdByFilePath(filePath) {\n return filePath.split(\"/\").slice(0, 2).join(\"/\");\n}\n//# sourceMappingURL=stableLoadBricks.js.map"],"names":["cache","Map","loadScriptOrStyle","type","src","prefix","attrs","Array","isArray","Promise","all","map","item","fixedSrc","test","cachedPromise","get","promise","resolve","reject","end","window","dispatchEvent","Event","element","document","createElement","Object","assign","async","rel","href","onload","onerror","e","firstScript","currentScript","getElementsByTagName","parentNode","insertBefore","set","loadScript","loadStyle","loadSharedModule","scope","module","container","init","default","resolveBasicPkg","basicPkgWillBeResolved","waitBasicPkg","flushStableLoadBricks","enqueueStableLoadBricks","bricks","brickPackages","dispatchRequestStatus","enqueueStableLoad","enqueueStableLoadProcessors","processors","loadBricksImperatively","loadProcessorsImperatively","loadEditorsImperatively","editors","v2AdapterPromise","V2_ADAPTER_LOAD_BRICKS","getItemsByPkg","list","brickPackagesMap","itemsByPkg","listToLoad","Set","add","_pkg$dependencies","has","pkg","namespace","lastName","includes","split","pkgId","camelPackageName","replace","match","toLocaleLowerCase","p","values","_ref","propertyEditors","some","deprecatedBrickInThisPkg","_p$elements","elements","_p$deprecatedElements","deprecatedElements","console","error","groupItems","push","fullName","deps","dependencies","dep","loadBrickModule","moduleName","Error","loadRestBricks","pkgs","itemsMap","filePath","PUBLIC_ROOT","id","getPkgIdByFilePath","foundBasicPkg","v2Packages","v3PackagesOtherThanBasic","maybeV2Adapter","keys","v2Adapter","basicPkgPromise","basicPkg","tempPromise","then","pkgPromises","concat","length","v2AdapterItemsByPkg","v2AdapterPackages","loadV2Adapter","adapter","pkgNamespace","propertyEditorsJsFilePath","dll","slice","join"],"sourceRoot":""}