bm-admin-ui 1.0.59-alpha → 1.0.60-alpha

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.
@@ -4160,62 +4160,66 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
4160
4160
  return pass;
4161
4161
  }
4162
4162
  function flowConditionEffect(activeProps2, flowCondition) {
4163
- const disabled = !!flowCondition[activeRule.value.field];
4164
- const ruleName = activeRule.value.config.config.name;
4165
- if (disabled) {
4166
- const requiredRule = activeProps2?.find(
4167
- (rule) => rule.field === "effect.required"
4168
- );
4169
- if (requiredRule) {
4170
- if (!requiredRule.props) {
4171
- requiredRule.props = {};
4172
- }
4173
- requiredRule.props.disabled = true;
4174
- }
4175
- if (["radio", "checkbox"].includes(ruleName)) {
4176
- const optionsRule = activeProps2?.find((rule) => rule.field === "options");
4177
- optionsRule.props.disabled = true;
4178
- }
4179
- if (ruleName === "shop") {
4180
- const dataFilteringRule = activeProps2?.find(
4181
- (rule) => rule.field === "config.dataFiltering"
4182
- );
4183
- const isMainRule = activeProps2?.find(
4184
- (rule) => rule.field === "config.isMain"
4163
+ if (activeRule.value.config) {
4164
+ const disabled = !!flowCondition[activeRule.value.field];
4165
+ const ruleName = activeRule.value.config.config.name;
4166
+ if (disabled) {
4167
+ const requiredRule = activeProps2?.find(
4168
+ (rule) => rule.field === "effect.required"
4185
4169
  );
4186
- if (dataFilteringRule) {
4187
- dataFilteringRule.props = {
4170
+ if (requiredRule) {
4171
+ if (!requiredRule.props) {
4172
+ requiredRule.props = {};
4173
+ }
4174
+ requiredRule.props.disabled = true;
4175
+ }
4176
+ if (["radio", "checkbox"].includes(ruleName)) {
4177
+ const optionsRule = activeProps2?.find(
4178
+ (rule) => rule.field === "options"
4179
+ );
4180
+ optionsRule.props.disabled = true;
4181
+ }
4182
+ if (ruleName === "shop") {
4183
+ const dataFilteringRule = activeProps2?.find(
4184
+ (rule) => rule.field === "config.dataFiltering"
4185
+ );
4186
+ const isMainRule = activeProps2?.find(
4187
+ (rule) => rule.field === "config.isMain"
4188
+ );
4189
+ if (dataFilteringRule) {
4190
+ dataFilteringRule.props = {
4191
+ disabled: true
4192
+ };
4193
+ }
4194
+ if (isMainRule) {
4195
+ isMainRule.props = {
4196
+ disabled: true
4197
+ };
4198
+ }
4199
+ }
4200
+ if (ruleName === "materialType") {
4201
+ const formatRule = activeProps2?.find(
4202
+ (rule) => rule.field === "config.format"
4203
+ );
4204
+ const multipleRule = activeProps2?.find(
4205
+ (rule) => rule.field === "props.multiple"
4206
+ );
4207
+ formatRule.props = {
4208
+ disabled: true
4209
+ };
4210
+ multipleRule.props = {
4188
4211
  disabled: true
4189
4212
  };
4190
4213
  }
4191
- if (isMainRule) {
4192
- isMainRule.props = {
4214
+ if (["people", "department"].includes(ruleName)) {
4215
+ const limitRule = activeProps2?.find(
4216
+ (rule) => rule.field === "props.limit"
4217
+ );
4218
+ limitRule.props = {
4193
4219
  disabled: true
4194
4220
  };
4195
4221
  }
4196
4222
  }
4197
- if (ruleName === "materialType") {
4198
- const formatRule = activeProps2?.find(
4199
- (rule) => rule.field === "config.format"
4200
- );
4201
- const multipleRule = activeProps2?.find(
4202
- (rule) => rule.field === "props.multiple"
4203
- );
4204
- formatRule.props = {
4205
- disabled: true
4206
- };
4207
- multipleRule.props = {
4208
- disabled: true
4209
- };
4210
- }
4211
- if (["people", "department"].includes(ruleName)) {
4212
- const limitRule = activeProps2?.find(
4213
- (rule) => rule.field === "props.limit"
4214
- );
4215
- limitRule.props = {
4216
- disabled: true
4217
- };
4218
- }
4219
4223
  }
4220
4224
  }
4221
4225
  function resetActiveRule() {
@@ -4170,62 +4170,66 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
4170
4170
  return pass;
4171
4171
  }
4172
4172
  function flowConditionEffect(activeProps2, flowCondition) {
4173
- const disabled = !!flowCondition[activeRule.value.field];
4174
- const ruleName = activeRule.value.config.config.name;
4175
- if (disabled) {
4176
- const requiredRule = activeProps2?.find(
4177
- (rule) => rule.field === "effect.required"
4178
- );
4179
- if (requiredRule) {
4180
- if (!requiredRule.props) {
4181
- requiredRule.props = {};
4182
- }
4183
- requiredRule.props.disabled = true;
4184
- }
4185
- if (["radio", "checkbox"].includes(ruleName)) {
4186
- const optionsRule = activeProps2?.find((rule) => rule.field === "options");
4187
- optionsRule.props.disabled = true;
4188
- }
4189
- if (ruleName === "shop") {
4190
- const dataFilteringRule = activeProps2?.find(
4191
- (rule) => rule.field === "config.dataFiltering"
4192
- );
4193
- const isMainRule = activeProps2?.find(
4194
- (rule) => rule.field === "config.isMain"
4173
+ if (activeRule.value.config) {
4174
+ const disabled = !!flowCondition[activeRule.value.field];
4175
+ const ruleName = activeRule.value.config.config.name;
4176
+ if (disabled) {
4177
+ const requiredRule = activeProps2?.find(
4178
+ (rule) => rule.field === "effect.required"
4195
4179
  );
4196
- if (dataFilteringRule) {
4197
- dataFilteringRule.props = {
4180
+ if (requiredRule) {
4181
+ if (!requiredRule.props) {
4182
+ requiredRule.props = {};
4183
+ }
4184
+ requiredRule.props.disabled = true;
4185
+ }
4186
+ if (["radio", "checkbox"].includes(ruleName)) {
4187
+ const optionsRule = activeProps2?.find(
4188
+ (rule) => rule.field === "options"
4189
+ );
4190
+ optionsRule.props.disabled = true;
4191
+ }
4192
+ if (ruleName === "shop") {
4193
+ const dataFilteringRule = activeProps2?.find(
4194
+ (rule) => rule.field === "config.dataFiltering"
4195
+ );
4196
+ const isMainRule = activeProps2?.find(
4197
+ (rule) => rule.field === "config.isMain"
4198
+ );
4199
+ if (dataFilteringRule) {
4200
+ dataFilteringRule.props = {
4201
+ disabled: true
4202
+ };
4203
+ }
4204
+ if (isMainRule) {
4205
+ isMainRule.props = {
4206
+ disabled: true
4207
+ };
4208
+ }
4209
+ }
4210
+ if (ruleName === "materialType") {
4211
+ const formatRule = activeProps2?.find(
4212
+ (rule) => rule.field === "config.format"
4213
+ );
4214
+ const multipleRule = activeProps2?.find(
4215
+ (rule) => rule.field === "props.multiple"
4216
+ );
4217
+ formatRule.props = {
4218
+ disabled: true
4219
+ };
4220
+ multipleRule.props = {
4198
4221
  disabled: true
4199
4222
  };
4200
4223
  }
4201
- if (isMainRule) {
4202
- isMainRule.props = {
4224
+ if (["people", "department"].includes(ruleName)) {
4225
+ const limitRule = activeProps2?.find(
4226
+ (rule) => rule.field === "props.limit"
4227
+ );
4228
+ limitRule.props = {
4203
4229
  disabled: true
4204
4230
  };
4205
4231
  }
4206
4232
  }
4207
- if (ruleName === "materialType") {
4208
- const formatRule = activeProps2?.find(
4209
- (rule) => rule.field === "config.format"
4210
- );
4211
- const multipleRule = activeProps2?.find(
4212
- (rule) => rule.field === "props.multiple"
4213
- );
4214
- formatRule.props = {
4215
- disabled: true
4216
- };
4217
- multipleRule.props = {
4218
- disabled: true
4219
- };
4220
- }
4221
- if (["people", "department"].includes(ruleName)) {
4222
- const limitRule = activeProps2?.find(
4223
- (rule) => rule.field === "props.limit"
4224
- );
4225
- limitRule.props = {
4226
- disabled: true
4227
- };
4228
- }
4229
4233
  }
4230
4234
  }
4231
4235
  function resetActiveRule() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bm-admin-ui",
3
- "version": "1.0.59-alpha",
3
+ "version": "1.0.60-alpha",
4
4
  "private": false,
5
5
  "description": "An Admin Component Library for Bm",
6
6
  "license": "UNLICENSED",