@gisce/react-ooui 1.2.0-rc.82 → 1.2.0-rc.84
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/react-ooui.es.js +67 -60
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/react-ooui.umd.js +2 -2
- package/dist/react-ooui.umd.js.map +1 -1
- package/dist/widgets/base/one2many/One2manyInput.d.ts.map +1 -1
- package/dist/widgets/custom/ButtonGroup.d.ts +1 -1
- package/dist/widgets/custom/ButtonGroup.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/widgets/base/one2many/One2manyInput.tsx +3 -5
- package/src/widgets/custom/ButtonGroup.tsx +31 -21
package/dist/react-ooui.es.js
CHANGED
|
@@ -689,78 +689,88 @@ const Button = (e) => {
|
|
|
689
689
|
}
|
|
690
690
|
$();
|
|
691
691
|
}
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
onClick: _,
|
|
699
|
-
icon: /* @__PURE__ */ jsx(DownOutlined, {}),
|
|
700
|
-
type: d ? "primary" : void 0,
|
|
701
|
-
overlay: Items({
|
|
702
|
-
ooui: n
|
|
692
|
+
if (t.buttons.length === 0)
|
|
693
|
+
return null;
|
|
694
|
+
if (t.buttons.length > 1)
|
|
695
|
+
return /* @__PURE__ */ jsx(Field$1, {
|
|
696
|
+
ooui: new Field$2({
|
|
697
|
+
ooui: t
|
|
703
698
|
}),
|
|
704
|
-
children:
|
|
705
|
-
|
|
706
|
-
|
|
699
|
+
children: /* @__PURE__ */ jsxs(Dropdown.Button, {
|
|
700
|
+
disabled: !s || y,
|
|
701
|
+
onClick: _,
|
|
702
|
+
icon: /* @__PURE__ */ jsx(DownOutlined, {}),
|
|
703
|
+
type: d ? "primary" : void 0,
|
|
704
|
+
overlay: /* @__PURE__ */ jsx(Items, {
|
|
705
|
+
ooui: n,
|
|
706
|
+
executeButtonAction: h,
|
|
707
|
+
lang: v
|
|
708
|
+
}),
|
|
709
|
+
children: [x(), a]
|
|
710
|
+
})
|
|
711
|
+
});
|
|
712
|
+
if (r)
|
|
713
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
714
|
+
ooui: r
|
|
715
|
+
});
|
|
707
716
|
}, Items = (e) => {
|
|
708
717
|
const {
|
|
709
|
-
ooui: t
|
|
710
|
-
|
|
718
|
+
ooui: t,
|
|
719
|
+
executeButtonAction: r,
|
|
720
|
+
lang: n
|
|
721
|
+
} = e;
|
|
722
|
+
if (!t)
|
|
723
|
+
return null;
|
|
724
|
+
const o = t.map((a) => {
|
|
711
725
|
const {
|
|
712
|
-
id:
|
|
713
|
-
caption:
|
|
714
|
-
activated:
|
|
715
|
-
buttonType:
|
|
716
|
-
confirmMessage:
|
|
717
|
-
icon:
|
|
718
|
-
context:
|
|
719
|
-
readOnly:
|
|
720
|
-
danger:
|
|
721
|
-
} =
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
b(!0), await m({
|
|
728
|
-
type: l,
|
|
729
|
-
action: o,
|
|
730
|
-
context: d
|
|
726
|
+
id: s,
|
|
727
|
+
caption: l,
|
|
728
|
+
activated: c,
|
|
729
|
+
buttonType: u,
|
|
730
|
+
confirmMessage: d,
|
|
731
|
+
icon: f,
|
|
732
|
+
context: p,
|
|
733
|
+
readOnly: y,
|
|
734
|
+
danger: m
|
|
735
|
+
} = a, [h, b] = useState$1(!1);
|
|
736
|
+
async function g() {
|
|
737
|
+
b(!0), await r({
|
|
738
|
+
type: u,
|
|
739
|
+
action: s,
|
|
740
|
+
context: p
|
|
731
741
|
}), b(!1);
|
|
732
742
|
}
|
|
733
|
-
function
|
|
734
|
-
if (
|
|
743
|
+
function v() {
|
|
744
|
+
if (d) {
|
|
735
745
|
showDialog$9({
|
|
736
|
-
confirmMessage:
|
|
737
|
-
lang:
|
|
746
|
+
confirmMessage: d,
|
|
747
|
+
lang: n,
|
|
738
748
|
onOk: () => {
|
|
739
|
-
|
|
749
|
+
g();
|
|
740
750
|
}
|
|
741
751
|
});
|
|
742
752
|
return;
|
|
743
753
|
}
|
|
744
|
-
|
|
754
|
+
g();
|
|
745
755
|
}
|
|
746
|
-
function
|
|
756
|
+
function x() {
|
|
747
757
|
if (h)
|
|
748
758
|
return /* @__PURE__ */ jsx(LoadingOutlined, {});
|
|
749
|
-
if (
|
|
750
|
-
const
|
|
751
|
-
return
|
|
759
|
+
if (f) {
|
|
760
|
+
const $ = iconMapper(f);
|
|
761
|
+
return $ && /* @__PURE__ */ jsx($, {});
|
|
752
762
|
}
|
|
753
763
|
}
|
|
754
764
|
return /* @__PURE__ */ jsx(Menu.Item, {
|
|
755
|
-
disabled: !
|
|
756
|
-
onClick:
|
|
757
|
-
icon:
|
|
758
|
-
danger:
|
|
759
|
-
children:
|
|
765
|
+
disabled: !c || y,
|
|
766
|
+
onClick: v,
|
|
767
|
+
icon: x(),
|
|
768
|
+
danger: m,
|
|
769
|
+
children: l
|
|
760
770
|
});
|
|
761
771
|
});
|
|
762
772
|
return /* @__PURE__ */ jsx(Menu, {
|
|
763
|
-
children:
|
|
773
|
+
children: o
|
|
764
774
|
});
|
|
765
775
|
}, MODAL_WIDTH_CONSTANT = 0.7;
|
|
766
776
|
function getWindowDimensions() {
|
|
@@ -24158,17 +24168,14 @@ const One2manyInput = (e) => {
|
|
|
24158
24168
|
}
|
|
24159
24169
|
};
|
|
24160
24170
|
async function Z() {
|
|
24161
|
-
k && (B.current =
|
|
24162
|
-
domain:
|
|
24163
|
-
|
|
24164
|
-
values: transformPlainMany2Ones({
|
|
24165
|
-
fields: p(),
|
|
24166
|
-
values: y()
|
|
24167
|
-
}),
|
|
24171
|
+
k && (B.current = await ConnectionProvider.getHandler().evalDomain({
|
|
24172
|
+
domain: k,
|
|
24173
|
+
values: transformPlainMany2Ones({
|
|
24168
24174
|
fields: p(),
|
|
24169
|
-
|
|
24175
|
+
values: y()
|
|
24170
24176
|
}),
|
|
24171
|
-
|
|
24177
|
+
fields: p(),
|
|
24178
|
+
context: m()
|
|
24172
24179
|
})), h && h.length > 0 && (B.current = B.current.concat(transformDomainForChildWidget({
|
|
24173
24180
|
domain: h,
|
|
24174
24181
|
widgetFieldName: X
|