bm-admin-ui 1.0.78-alpha → 1.0.80-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.
Files changed (37) hide show
  1. package/es/components/float-table/index.js +3077 -1
  2. package/es/components/float-table/src/rowDrag.d.ts +1 -0
  3. package/es/components/form-designer/index.js +1 -1
  4. package/es/components/search-filter/index.js +161 -5
  5. package/es/components/search-filter/src/form-select-all.vue.d.ts +741 -0
  6. package/es/components/select-all/index.js +1 -1
  7. package/es/components/staffs-selector/index.d.ts +1 -81
  8. package/es/components/staffs-selector/index.js +52 -377
  9. package/es/components/staffs-selector/src/action.d.ts +8 -3
  10. package/es/components/staffs-selector/src/departmentCmp.vue.d.ts +1 -5
  11. package/es/components/staffs-selector/src/multipleCmp.vue.d.ts +0 -5
  12. package/es/components/staffs-selector/src/staffs-selector.vue.d.ts +1 -81
  13. package/es/components/staffs-selector/src/variedCmp.vue.d.ts +1 -4
  14. package/lib/components/float-table/index.js +3076 -0
  15. package/lib/components/float-table/src/rowDrag.d.ts +1 -0
  16. package/lib/components/form-designer/index.js +1 -1
  17. package/lib/components/search-filter/index.js +161 -4
  18. package/lib/components/search-filter/src/form-select-all.vue.d.ts +741 -0
  19. package/lib/components/select-all/index.js +1 -1
  20. package/lib/components/staffs-selector/index.d.ts +1 -81
  21. package/lib/components/staffs-selector/index.js +50 -375
  22. package/lib/components/staffs-selector/src/action.d.ts +8 -3
  23. package/lib/components/staffs-selector/src/departmentCmp.vue.d.ts +1 -5
  24. package/lib/components/staffs-selector/src/multipleCmp.vue.d.ts +0 -5
  25. package/lib/components/staffs-selector/src/staffs-selector.vue.d.ts +1 -81
  26. package/lib/components/staffs-selector/src/variedCmp.vue.d.ts +1 -4
  27. package/package.json +1 -1
  28. package/theme-chalk/float-table.css +1 -1
  29. package/theme-chalk/index.css +1 -1
  30. package/types/components/float-table/src/rowDrag.d.ts +1 -0
  31. package/types/components/search-filter/src/form-select-all.vue.d.ts +741 -0
  32. package/types/components/staffs-selector/index.d.ts +1 -81
  33. package/types/components/staffs-selector/src/action.d.ts +8 -3
  34. package/types/components/staffs-selector/src/departmentCmp.vue.d.ts +1 -5
  35. package/types/components/staffs-selector/src/multipleCmp.vue.d.ts +0 -5
  36. package/types/components/staffs-selector/src/staffs-selector.vue.d.ts +1 -81
  37. package/types/components/staffs-selector/src/variedCmp.vue.d.ts +1 -4
@@ -0,0 +1 @@
1
+ export default function useRowDrag(xGrid: any): void;
@@ -4091,7 +4091,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
4091
4091
  }, rule);
4092
4092
  }
4093
4093
  function copyPropValue(oldRule, newRule, needCopyField = false) {
4094
- if (needCopyField) {
4094
+ if (needCopyField && oldRule.field) {
4095
4095
  newRule.field = oldRule.field;
4096
4096
  }
4097
4097
  newRule.config.propsFields.forEach((field) => {
@@ -6,10 +6,12 @@ var withInstall = require('bm-admin-ui/lib/utils/with-install');
6
6
  var vue = require('vue');
7
7
  var FormCreateCtr = require('@form-create/ant-design-vue');
8
8
  var iconsVue = require('@ant-design/icons-vue');
9
+ var ASelect = require('ant-design-vue/lib/select');
9
10
 
10
11
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
11
12
 
12
13
  var FormCreateCtr__default = /*#__PURE__*/_interopDefaultLegacy(FormCreateCtr);
14
+ var ASelect__default = /*#__PURE__*/_interopDefaultLegacy(ASelect);
13
15
 
14
16
  const searchResetBtnProps = {
15
17
  showExpandBtn: {
@@ -83,8 +85,8 @@ var _export_sfc = (sfc, props) => {
83
85
  return target;
84
86
  };
85
87
 
86
- const _hoisted_1 = { class: "bm-search-filter-actions" };
87
- const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
88
+ const _hoisted_1$1 = { class: "bm-search-filter-actions" };
89
+ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
88
90
  __name: "search-reset-btn",
89
91
  props: searchResetBtnProps,
90
92
  emits: ["submit", "reset", "expand"],
@@ -119,7 +121,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
119
121
  vue.createTextVNode(vue.toDisplayString(isExpand.value ? props.collapseText : props.expandText), 1),
120
122
  isExpand.value ? (vue.openBlock(), vue.createBlock(vue.unref(iconsVue.UpOutlined), { key: 0 })) : (vue.openBlock(), vue.createBlock(vue.unref(iconsVue.DownOutlined), { key: 1 }))
121
123
  ])) : vue.createCommentVNode("v-if", true),
122
- vue.createElementVNode("span", _hoisted_1, [
124
+ vue.createElementVNode("span", _hoisted_1$1, [
123
125
  vue.createVNode(_component_a_button, { onClick: handleReset }, {
124
126
  default: vue.withCtx(() => [
125
127
  vue.createTextVNode("\u91CD\u7F6E")
@@ -142,7 +144,160 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
142
144
  };
143
145
  }
144
146
  });
145
- var SearchResetBtn = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "search-reset-btn.vue"]]);
147
+ var SearchResetBtn = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "search-reset-btn.vue"]]);
148
+
149
+ const _hoisted_1 = { class: "bm-select-header" };
150
+ const _hoisted_2 = { class: "bm-select-header-btn" };
151
+ const _hoisted_3 = ["onClick"];
152
+ const _hoisted_4 = /* @__PURE__ */ vue.createElementVNode("span", { class: "checkbox-label" }, "\u5168\u9009", -1);
153
+ const _hoisted_5 = ["onClick"];
154
+ const _hoisted_6 = /* @__PURE__ */ vue.createElementVNode("span", { class: "checkbox-label" }, "\u53CD\u9009", -1);
155
+ const _hoisted_7 = { class: "blue" };
156
+ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
157
+ __name: "form-select-all",
158
+ props: {
159
+ modelValue: {
160
+ type: Array || String || Number || void 0
161
+ },
162
+ disabled: Boolean
163
+ },
164
+ emits: ["onSelectAll", "onChange", "update:modelValue"],
165
+ setup(__props, { emit }) {
166
+ const props = __props;
167
+ const instance = vue.getCurrentInstance();
168
+ const state = vue.reactive({
169
+ search: {
170
+ indeterminate: false,
171
+ checkedAll: false,
172
+ checkedReverse: false
173
+ }
174
+ });
175
+ let selectValue = vue.ref([]);
176
+ vue.watch(
177
+ () => props.modelValue,
178
+ (val) => {
179
+ selectValue.value = val;
180
+ },
181
+ {
182
+ immediate: true
183
+ }
184
+ );
185
+ const selectAll = (e) => {
186
+ let key = "value";
187
+ if (instance?.attrs.fieldNames || instance?.attrs["field-names"])
188
+ key = (instance?.attrs).fieldNames?.value || (instance?.attrs)["field-names"].value;
189
+ state.search.checkedAll = !state.search.checkedAll;
190
+ state.search.indeterminate = false;
191
+ state.search.checkedReverse = false;
192
+ if (state.search.checkedAll) {
193
+ selectValue.value = (instance?.attrs.options).map(
194
+ (v) => {
195
+ return v[key];
196
+ }
197
+ );
198
+ } else {
199
+ selectValue.value = [];
200
+ }
201
+ emit("update:modelValue", selectValue.value);
202
+ emit("onSelectAll", {
203
+ type: "all",
204
+ value: selectValue.value
205
+ });
206
+ };
207
+ const reverseAll = (e) => {
208
+ let key = "value";
209
+ if (instance?.attrs.fieldNames || instance?.attrs["field-names"])
210
+ key = (instance?.attrs).fieldNames?.value || (instance?.attrs)["field-names"].value;
211
+ if (selectValue.value.length <= 0)
212
+ return state.search.checkedReverse = false;
213
+ state.search.checkedReverse = !state.search.checkedReverse;
214
+ if (state.search.checkedReverse) {
215
+ state.search.indeterminate = false;
216
+ state.search.checkedAll = false;
217
+ } else {
218
+ state.search.indeterminate = !!selectValue.value.length && selectValue.value.length < (instance?.attrs.options).length;
219
+ state.search.checkedAll = selectValue.value.length === (instance?.attrs.options).length;
220
+ }
221
+ selectValue.value = (instance?.attrs.options).filter(
222
+ (v) => !selectValue.value.some((ele) => ele === v[key])
223
+ ).map((x) => x[key]);
224
+ emit("update:modelValue", selectValue.value);
225
+ emit("onSelectAll", {
226
+ type: "reverse",
227
+ value: selectValue.value
228
+ });
229
+ };
230
+ const onChange = (value, option) => {
231
+ state.search.checkedReverse = false;
232
+ state.search.indeterminate = !!value.length && value.length < (instance?.attrs.options).length;
233
+ state.search.checkedAll = value.length === (instance?.attrs.options).length;
234
+ emit("update:modelValue", value);
235
+ emit("onChange", {
236
+ value,
237
+ option
238
+ });
239
+ };
240
+ const VNodes = (_, { attrs }) => {
241
+ return vue.h(attrs.vnodes);
242
+ };
243
+ return (_ctx, _cache) => {
244
+ const _component_a_checkbox = vue.resolveComponent("a-checkbox");
245
+ const _component_a_form_item_rest = vue.resolveComponent("a-form-item-rest");
246
+ return vue.openBlock(), vue.createBlock(vue.unref(ASelect__default["default"]), vue.mergeProps({
247
+ value: vue.unref(selectValue),
248
+ "onUpdate:value": _cache[4] || (_cache[4] = ($event) => vue.isRef(selectValue) ? selectValue.value = $event : selectValue = $event),
249
+ class: "bm-select"
250
+ }, _ctx.$attrs, {
251
+ mode: "multiple",
252
+ disabled: props.disabled,
253
+ placeholder: vue.unref(instance)?.attrs.placeholder ? vue.unref(instance)?.attrs.placeholder : "\u8BF7\u9009\u62E9",
254
+ "get-popup-container": (nodes) => nodes.parentNode,
255
+ onChange
256
+ }), {
257
+ dropdownRender: vue.withCtx(({ menuNode: menu }) => [
258
+ vue.createElementVNode("div", _hoisted_1, [
259
+ vue.createVNode(_component_a_form_item_rest, null, {
260
+ default: vue.withCtx(() => [
261
+ vue.createElementVNode("div", _hoisted_2, [
262
+ vue.createElementVNode("div", {
263
+ onClick: vue.withModifiers(selectAll, ["prevent"]),
264
+ onMousedown: _cache[1] || (_cache[1] = (e) => e.preventDefault())
265
+ }, [
266
+ vue.createVNode(_component_a_checkbox, {
267
+ checked: state.search.checkedAll,
268
+ "onUpdate:checked": _cache[0] || (_cache[0] = ($event) => state.search.checkedAll = $event),
269
+ indeterminate: state.search.indeterminate
270
+ }, null, 8, ["checked", "indeterminate"]),
271
+ _hoisted_4
272
+ ], 40, _hoisted_3),
273
+ vue.createElementVNode("div", {
274
+ onClick: vue.withModifiers(reverseAll, ["prevent"]),
275
+ onMousedown: _cache[3] || (_cache[3] = (e) => e.preventDefault())
276
+ }, [
277
+ vue.createVNode(_component_a_checkbox, {
278
+ checked: state.search.checkedReverse,
279
+ "onUpdate:checked": _cache[2] || (_cache[2] = ($event) => state.search.checkedReverse = $event)
280
+ }, null, 8, ["checked"]),
281
+ _hoisted_6
282
+ ], 40, _hoisted_5)
283
+ ])
284
+ ]),
285
+ _: 1
286
+ }),
287
+ vue.createElementVNode("div", null, [
288
+ vue.createTextVNode(" \u5DF2\u9009\u62E9 "),
289
+ vue.createElementVNode("span", _hoisted_7, vue.toDisplayString(vue.unref(selectValue)?.length), 1),
290
+ vue.createTextVNode(" \u9879 ")
291
+ ])
292
+ ]),
293
+ vue.createVNode(VNodes, { vnodes: menu }, null, 8, ["vnodes"])
294
+ ]),
295
+ _: 1
296
+ }, 16, ["value", "disabled", "placeholder", "get-popup-container"]);
297
+ };
298
+ }
299
+ });
300
+ var SelectAll = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "form-select-all.vue"]]);
146
301
 
147
302
  const __default__ = {
148
303
  name: "BmSearchFilter"
@@ -154,6 +309,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
154
309
  setup(__props, { expose, emit: emits }) {
155
310
  const props = __props;
156
311
  FormCreateCtr__default["default"].component("SearchResetBtn", SearchResetBtn);
312
+ FormCreateCtr__default["default"].component("SelectAll", SelectAll);
313
+ FormCreateCtr__default["default"].maker.create("SelectAll", "field", "\u5168\u9009\u53CD\u9009\u7EC4\u4EF6").value([]);
157
314
  const isExpand = vue.ref(false);
158
315
  const searchResetBtnRule = vue.reactive([
159
316
  {