@next-bricks/basic-bricks 1.179.2 → 1.179.5

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.
package/dist/stories.json CHANGED
@@ -451,36 +451,52 @@
451
451
  }
452
452
  ],
453
453
  "dockind": "brick",
454
+ "groupI18n": {
455
+ "basic": {
456
+ "en": "Basic",
457
+ "zh": "常用"
458
+ },
459
+ "ui": {
460
+ "en": "UI",
461
+ "zh": "外观"
462
+ }
463
+ },
454
464
  "properties": [
455
465
  {
456
466
  "name": "gridAreas",
457
467
  "type": "Record<string, (string | number)[]>",
458
- "description": "以键值对形式定义多个 [grid-area](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area)"
468
+ "description": "以键值对形式定义多个 [grid-area](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area)",
469
+ "group": "basic"
459
470
  },
460
471
  {
461
472
  "name": "gridTemplateAreas",
462
473
  "type": "string[][]",
463
- "description": "定义 [grid-template-areas](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas)"
474
+ "description": "定义 [grid-template-areas](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-areas)",
475
+ "group": "basic"
464
476
  },
465
477
  {
466
478
  "name": "gridTemplateColumns",
467
479
  "type": "string | string[]",
468
- "description": "定义 [grid-template-columns](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns)"
480
+ "description": "定义 [grid-template-columns](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns)",
481
+ "group": "basic"
469
482
  },
470
483
  {
471
484
  "name": "gridTemplateRows",
472
485
  "type": "string | string[]",
473
- "description": "定义 [grid-template-rows](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-rows)"
486
+ "description": "定义 [grid-template-rows](https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-rows)",
487
+ "group": "basic"
474
488
  },
475
489
  {
476
490
  "name": "containerStyle",
477
491
  "type": "CSSProperties",
478
- "description": "定义网格容器的样式"
492
+ "description": "定义网格容器的样式",
493
+ "group": "ui"
479
494
  },
480
495
  {
481
496
  "name": "styleByAreas",
482
497
  "type": "Record<string, CSSProperties>",
483
- "description": "定义网格内各区域的样式"
498
+ "description": "定义网格内各区域的样式",
499
+ "group": "ui"
484
500
  }
485
501
  ],
486
502
  "interface": []
@@ -4765,38 +4781,37 @@
4765
4781
  {
4766
4782
  "brick": "basic-bricks.list-container",
4767
4783
  "properties": {
4768
- "useBrick": {
4769
- "brick": "presentational-bricks.agent-status",
4770
- "transform": {
4771
- "value": "@{}"
4772
- }
4773
- },
4774
4784
  "data": [
4775
4785
  "正常",
4776
4786
  "异常",
4777
4787
  "未安装"
4778
- ]
4788
+ ],
4789
+ "useBrick": {
4790
+ "brick": "presentational-bricks.agent-status",
4791
+ "properties": {
4792
+ "value": "<% DATA %>"
4793
+ }
4794
+ }
4779
4795
  }
4780
4796
  },
4781
4797
  {
4782
4798
  "brick": "basic-bricks.list-container",
4783
4799
  "properties": {
4784
- "containerStyle": {
4785
- "display": "grid",
4786
- "gap": "20px",
4800
+ "gap": "20px",
4801
+ "extraContainerStyle": {
4787
4802
  "gridTemplateColumns": "repeat(auto-fill, minmax(260px, 1fr))"
4788
4803
  },
4789
- "useBrick": {
4790
- "brick": "presentational-bricks.agent-status",
4791
- "transform": {
4792
- "value": "@{}"
4793
- }
4794
- },
4795
4804
  "data": [
4796
4805
  "正常",
4797
4806
  "异常",
4798
4807
  "未安装"
4799
- ]
4808
+ ],
4809
+ "useBrick": {
4810
+ "brick": "presentational-bricks.agent-status",
4811
+ "properties": {
4812
+ "value": "<% DATA %>"
4813
+ }
4814
+ }
4800
4815
  }
4801
4816
  }
4802
4817
  ],
@@ -4808,48 +4823,63 @@
4808
4823
  "author": "steve",
4809
4824
  "slots": null,
4810
4825
  "history": [
4811
- {
4812
- "version": "1.20.0",
4813
- "change": "新增构件"
4814
- },
4815
4826
  {
4816
4827
  "version": "1.41.0",
4817
4828
  "change": "支持 `containerStyle` 配置"
4829
+ },
4830
+ {
4831
+ "version": "1.20.0",
4832
+ "change": "新增构件"
4818
4833
  }
4819
4834
  ],
4835
+ "groupI18n": {
4836
+ "basic": {
4837
+ "en": "Basic",
4838
+ "zh": "常用"
4839
+ },
4840
+ "ui": {
4841
+ "en": "UI",
4842
+ "zh": "外观"
4843
+ }
4844
+ },
4820
4845
  "memo": "",
4821
4846
  "properties": [
4822
4847
  {
4823
4848
  "name": "useBrick",
4824
- "type": "[UseBrickConf](http://docs.developers.easyops.cn/docs/api-reference/brick-types.usebrickconf)",
4849
+ "type": "UseBrickConf",
4825
4850
  "required": "true",
4826
- "default": "`[]`",
4827
- "description": "使用的子构件配置"
4851
+ "default": "[]",
4852
+ "description": "使用的子构件配置,具体查阅[UseBrickConf](/next-docs/docs/micro-app/brick-use-brick)",
4853
+ "group": "basic"
4828
4854
  },
4829
4855
  {
4830
4856
  "name": "data",
4831
4857
  "type": "`any[]`",
4832
4858
  "required": "true",
4833
- "default": "`[]`",
4834
- "description": "数据列表"
4859
+ "default": "[]",
4860
+ "description": "数据列表",
4861
+ "group": "basic"
4835
4862
  },
4836
4863
  {
4837
4864
  "name": "gap",
4838
4865
  "type": "string | number",
4839
- "default": "`\"var(--card-content-gap)\"`",
4840
- "description": "间距"
4866
+ "default": "\"var(--card-content-gap)\"",
4867
+ "description": "间距(配合extraContainerStyle使用)",
4868
+ "group": "ui"
4841
4869
  },
4842
4870
  {
4843
- "name": "containerStyle",
4871
+ "name": "extraContainerStyle",
4844
4872
  "type": "Record<string, any>",
4845
4873
  "default": "-",
4846
- "description": "自定义容器的样式,容器本身默认是 grid 布局,如果`containerStyle`不为空则覆盖掉容器本身的样式配置"
4874
+ "description": "容器本身默认是 grid 布局,可以设置额外的样式。",
4875
+ "group": "ui"
4847
4876
  },
4848
4877
  {
4849
- "name": "extraContainerStyle",
4878
+ "name": "containerStyle",
4850
4879
  "type": "Record<string, any>",
4851
4880
  "default": "-",
4852
- "description": "容器本身默认是 grid 布局,可以设置额外的样式。"
4881
+ "description": "自定义容器的样式,容器本身默认是 grid 布局,如果`containerStyle`不为空则覆盖掉容器本身的样式配置",
4882
+ "group": "ui"
4853
4883
  }
4854
4884
  ],
4855
4885
  "interface": []
@@ -5770,15 +5800,14 @@
5770
5800
  "brick": "basic-bricks.popover-container",
5771
5801
  "properties": {
5772
5802
  "showPopoverBg": false,
5803
+ "data": "<% DATA %>",
5773
5804
  "id": "story-point-edit",
5774
5805
  "displayBrick": {
5775
5806
  "useBrick": {
5776
5807
  "brick": "div",
5777
5808
  "properties": {
5778
- "id": "story-point-display"
5779
- },
5780
- "transform": {
5781
- "textContent": "@{storyPoint}"
5809
+ "id": "story-point-display",
5810
+ "textContent": "<% DATA.storyPoint %>"
5782
5811
  }
5783
5812
  }
5784
5813
  },
@@ -5792,6 +5821,7 @@
5792
5821
  "inputBoxStyle": {
5793
5822
  "width": 60
5794
5823
  },
5824
+ "value": "<% DATA.storyPoint %>",
5795
5825
  "allowClear": false,
5796
5826
  "options": [
5797
5827
  {
@@ -5820,9 +5850,6 @@
5820
5850
  }
5821
5851
  ]
5822
5852
  },
5823
- "transform": {
5824
- "value": "@{storyPoint}"
5825
- },
5826
5853
  "events": {
5827
5854
  "general.select.change": [
5828
5855
  {
@@ -5852,9 +5879,6 @@
5852
5879
  "visible.change": {
5853
5880
  "action": "console.log"
5854
5881
  }
5855
- },
5856
- "transform": {
5857
- "data": "@{}"
5858
5882
  }
5859
5883
  }
5860
5884
  },
@@ -5866,6 +5890,7 @@
5866
5890
  "dataset": {
5867
5891
  "testid": "basic-usage-click-demo"
5868
5892
  },
5893
+ "data": "<% DATA %>",
5869
5894
  "showPopoverBg": false,
5870
5895
  "id": "user-quick-edit",
5871
5896
  "displayBrick": {
@@ -5873,10 +5898,8 @@
5873
5898
  "brick": "presentational-bricks.brick-user",
5874
5899
  "properties": {
5875
5900
  "id": "show-user",
5876
- "size": "large"
5877
- },
5878
- "transform": {
5879
- "userNameOrId": "@{assignee[0].name}"
5901
+ "size": "large",
5902
+ "userNameOrId": "<% DATA.assignee[0].name %>"
5880
5903
  }
5881
5904
  }
5882
5905
  },
@@ -5912,9 +5935,6 @@
5912
5935
  "visible.change": {
5913
5936
  "action": "console.log"
5914
5937
  }
5915
- },
5916
- "transform": {
5917
- "data": "@{}"
5918
5938
  }
5919
5939
  }
5920
5940
  }
@@ -5950,6 +5970,7 @@
5950
5970
  },
5951
5971
  "placement": "top",
5952
5972
  "trigger": "hover",
5973
+ "data": "<% DATA %>",
5953
5974
  "popoverIcon": {
5954
5975
  "lib": "easyops",
5955
5976
  "category": "app",
@@ -5958,8 +5979,8 @@
5958
5979
  "displayBrick": {
5959
5980
  "useBrick": {
5960
5981
  "brick": "div",
5961
- "transform": {
5962
- "textContent": "@{name}"
5982
+ "properties": {
5983
+ "textContent": "<% DATA.name %>"
5963
5984
  }
5964
5985
  }
5965
5986
  },
@@ -5980,11 +6001,9 @@
5980
6001
  ],
5981
6002
  "configProps": {
5982
6003
  "pagination": false
5983
- }
5984
- },
5985
- "transform": {
6004
+ },
5986
6005
  "dataSource": {
5987
- "list": "@{data}"
6006
+ "list": "<% DATA.data %>"
5988
6007
  }
5989
6008
  }
5990
6009
  }
@@ -5994,9 +6013,6 @@
5994
6013
  "visible.change": {
5995
6014
  "action": "console.log"
5996
6015
  }
5997
- },
5998
- "transform": {
5999
- "data": "@{}"
6000
6016
  }
6001
6017
  }
6002
6018
  }
@@ -6010,6 +6026,9 @@
6010
6026
  "triggerByIcon": false,
6011
6027
  "placement": "top",
6012
6028
  "trigger": "hover",
6029
+ "style": {
6030
+ "display": "inline-block"
6031
+ },
6013
6032
  "displayBrick": {
6014
6033
  "useBrick": {
6015
6034
  "brick": "presentational-bricks.brick-value-mapping",
@@ -6057,6 +6076,16 @@
6057
6076
  "change": "新增构件 `basic-bricks.popover-container`"
6058
6077
  }
6059
6078
  ],
6079
+ "groupI18n": {
6080
+ "basic": {
6081
+ "en": "Basic",
6082
+ "zh": "常用"
6083
+ },
6084
+ "ui": {
6085
+ "en": "UI",
6086
+ "zh": "外观"
6087
+ }
6088
+ },
6060
6089
  "memo": "### CustomBrick\n\n| property | type | required | default | description |\n| -------- | ------------ | -------- | ------- | ------------------------ |\n| useBrick | UseBrickConf | ✔️ | - | 自定义构件 |\n| data | any | - | - | 数据,优先级高于整体数据 |\n\n### UseBrickConf\n\n| property | type | required | default | description |\n| ------------- | -------------- | -------- | ------- | -------------------------------------------------- |\n| brick | string | ✔️ | - | 构件名称 |\n| properties | object | - | - | 构件属性 |\n| events | BrickEventsMap | - | - | 事件 |\n| transform | string\\|object | - | - | 属性数据转换 |\n| transformFrom | string | - | - | 属性数据转换来自数据源的哪个字段,不填则为整个数据 |",
6061
6090
  "properties": [
6062
6091
  {
@@ -6064,112 +6093,128 @@
6064
6093
  "type": "CustomBrick",
6065
6094
  "required": "true",
6066
6095
  "default": "-",
6067
- "description": "展示构件"
6096
+ "description": "展示构件",
6097
+ "group": "basic"
6068
6098
  },
6069
6099
  {
6070
6100
  "name": "popoverBrick",
6071
6101
  "type": "CustomBrick",
6072
6102
  "required": "true",
6073
6103
  "default": "-",
6074
- "description": "弹出框构件"
6104
+ "description": "弹出框构件",
6105
+ "group": "basic"
6075
6106
  },
6076
6107
  {
6077
6108
  "name": "popoverIcon",
6078
6109
  "type": "MenuIcon",
6079
6110
  "required": "false",
6080
6111
  "default": "{ lib: \"fa\", icon: \"pencil-alt\", prefix: \"fas\" }",
6081
- "description": "触发弹出框的 icon [MenuIcon]((http://docs.developers.easyops.cn/docs/brick-next/icon))"
6112
+ "description": "触发弹出框的 icon [MenuIcon](/next-docs/docs/api-reference/brick-types.menuicon#menuicon-interface)",
6113
+ "group": "ui"
6082
6114
  },
6083
6115
  {
6084
6116
  "name": "popoverContentStyle",
6085
6117
  "type": "Record<string,any>",
6086
6118
  "required": "false",
6087
6119
  "default": "{width:200px}",
6088
- "description": "popover 内容区域的样式,默认给了 200 的宽度。由于我们的弹出框拥有自定义构件的能力,在第一次点击之前,popover 是不知道所渲染构件的宽高,可能发生错位的问题。可以通过设置宽高来解决问题。注意,根据不同的`placement`需要按需调整宽度/高度。[详见](https://github.com/ant-design/ant-design/issues/3545)"
6120
+ "description": "popover 内容区域的样式,默认给了 200 的宽度。由于我们的弹出框拥有自定义构件的能力,在第一次点击之前,popover 是不知道所渲染构件的宽高,可能发生错位的问题。可以通过设置宽高来解决问题。注意,根据不同的`placement`需要按需调整宽度/高度。[详见](https://github.com/ant-design/ant-design/issues/3545)",
6121
+ "group": "ui"
6089
6122
  },
6090
6123
  {
6091
6124
  "name": "placement",
6092
- "type": "top\\|left\\|right\\|bottom\\|topLeft\\|topRight\\|bottomLeft\\|bottomRight\\|leftTop\\|leftBottom\\|rightTop\\|rightBottom",
6125
+ "type": "top|left|right|bottom|topLeft|topRight|bottomLeft|bottomRight|leftTop|leftBottom|rightTop|rightBottom",
6093
6126
  "required": "false",
6094
6127
  "default": "bottom",
6095
- "description": "气泡框位置。注意设置该属性的时候可能需要调整`popoverContentStyle`。"
6128
+ "description": "气泡框位置。注意设置该属性的时候可能需要调整`popoverContentStyle`。",
6129
+ "group": "ui"
6096
6130
  },
6097
6131
  {
6098
6132
  "name": "showIcon",
6099
- "type": "\"always\"\\|\"hover\"\\|\"never\"",
6133
+ "type": "\"always\"|\"hover\"|\"never\"",
6100
6134
  "required": "false",
6101
6135
  "default": "hover",
6102
- "description": "在什么时候显示 Icon"
6136
+ "description": "在什么时候显示 Icon",
6137
+ "group": "ui"
6103
6138
  },
6104
6139
  {
6105
6140
  "name": "zIndex",
6106
6141
  "type": "number",
6107
6142
  "required": "false",
6108
6143
  "default": "1030",
6109
- "description": "popover的z轴顺序"
6144
+ "description": "popover的z轴顺序",
6145
+ "group": "ui"
6110
6146
  },
6111
6147
  {
6112
6148
  "name": "trigger",
6113
6149
  "type": "ActionType | ActionType[]",
6114
6150
  "required": "false",
6115
6151
  "default": "-",
6116
- "description": "触发方式"
6152
+ "description": "触发方式",
6153
+ "group": "basic"
6117
6154
  },
6118
6155
  {
6119
6156
  "name": "data",
6120
6157
  "type": "any",
6121
6158
  "required": "false",
6122
6159
  "default": "false",
6123
- "description": "整体数据,如果展示构件和弹出框构件数据都来自于同一个 provider,可以直接配置 data,如果来源不一样,可以分别配置 CustomBrick.data"
6160
+ "description": "整体数据,如果展示构件和弹出框构件数据都来自于同一个 provider,可以直接配置 data,如果来源不一样,可以分别配置 CustomBrick.data",
6161
+ "group": "basic"
6124
6162
  },
6125
6163
  {
6126
6164
  "name": "triggerByIcon",
6127
- "type": "hover\\|click",
6165
+ "type": "hover|click",
6128
6166
  "required": "false",
6129
6167
  "default": "click",
6130
- "description": "触发行为"
6168
+ "description": "触发行为",
6169
+ "group": "basic"
6131
6170
  },
6132
6171
  {
6133
6172
  "name": "visible",
6134
6173
  "type": "{useBrick:UseBrickConf;data?:any}",
6135
6174
  "required": "false",
6136
6175
  "default": "false",
6137
- "description": "弹出框是否可见"
6176
+ "description": "弹出框是否可见",
6177
+ "group": "ui"
6138
6178
  },
6139
6179
  {
6140
6180
  "name": "showPopoverBg",
6141
6181
  "type": "boolean",
6142
6182
  "required": "false",
6143
6183
  "default": "true",
6144
- "description": "是否显示 popover 的默认背景"
6184
+ "description": "是否显示 popover 的默认背景",
6185
+ "group": "ui"
6145
6186
  },
6146
6187
  {
6147
6188
  "name": "highlighted",
6148
6189
  "type": "boolean",
6149
6190
  "required": "false",
6150
6191
  "default": "false",
6151
- "description": "是否高亮,由[general-graph](developers/brick-book/brick/graph.general-graph)构件设置。"
6192
+ "description": "是否高亮,由[general-graph](developers/brick-book/brick/graph.general-graph)构件设置。",
6193
+ "group": "ui"
6152
6194
  },
6153
6195
  {
6154
6196
  "name": "related",
6155
6197
  "type": "boolean",
6156
6198
  "required": "false",
6157
6199
  "default": "false",
6158
- "description": "是否被关联,由[general-graph](developers/brick-book/brick/graph.general-graph)构件设置。"
6200
+ "description": "是否被关联,由[general-graph](developers/brick-book/brick/graph.general-graph)构件设置。",
6201
+ "group": "ui"
6159
6202
  },
6160
6203
  {
6161
6204
  "name": "faded",
6162
6205
  "type": "boolean",
6163
6206
  "required": "false",
6164
6207
  "default": "false",
6165
- "description": "是否弱化,由[general-graph](developers/brick-book/brick/graph.general-graph)构件设置。"
6208
+ "description": "是否弱化,由[general-graph](developers/brick-book/brick/graph.general-graph)构件设置。",
6209
+ "group": "ui"
6166
6210
  },
6167
6211
  {
6168
6212
  "name": "transferGraphAttrs",
6169
6213
  "type": "boolean",
6170
6214
  "required": "false",
6171
6215
  "default": "false",
6172
- "description": "是否透传拓扑视图的高亮相关属性给子展示构件。由于该构件常用于[general-graph](developers/brick-book/brick/graph.general-graph)构件,故特别增设该属性。开启之后将会透传highlighted(高亮节点)/related(关联节点)/faded(淡化节点)三个属性给子展示构件,以实现高亮功能。"
6216
+ "description": "是否透传拓扑视图的高亮相关属性给子展示构件。由于该构件常用于[general-graph](developers/brick-book/brick/graph.general-graph)构件,故特别增设该属性。开启之后将会透传highlighted(高亮节点)/related(关联节点)/faded(淡化节点)三个属性给子展示构件,以实现高亮功能。",
6217
+ "group": "ui"
6173
6218
  }
6174
6219
  ],
6175
6220
  "events": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/basic-bricks",
3
- "version": "1.179.2",
3
+ "version": "1.179.5",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "https://github.com/easyops-cn/next-basics/tree/master/bricks/basic-bricks",
6
6
  "license": "GPL-3.0",
@@ -30,7 +30,7 @@
30
30
  "test:ci": "cross-env NODE_ENV='test' CI=true jest"
31
31
  },
32
32
  "devDependencies": {
33
- "@next-core/custom-antd-styles": "^1.24.5",
33
+ "@next-core/custom-antd-styles": "^1.24.8",
34
34
  "@next-libs/basic-components": "^3.5.0",
35
35
  "@next-libs/storage": "^2.0.2",
36
36
  "@next-sdk/air-admin-service-sdk": "^2.1.12",
@@ -39,5 +39,5 @@
39
39
  "immutability-helper": "^3.1.1"
40
40
  },
41
41
  "sideEffects": true,
42
- "gitHead": "5a43720d33df3c1a4f2f7d6e6df64e8f5c589db9"
42
+ "gitHead": "1ce9099eb52fafce30a72463d6185d40168a398d"
43
43
  }