dce-reactkit 3.7.37 → 3.8.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.
package/dist/esm/index.js CHANGED
@@ -483,6 +483,8 @@ const Modal = (props) => {
483
483
  var _a;
484
484
  /* -------------- Props ------------- */
485
485
  const { type = ModalType$1.NoButtons, size = ModalSize$1.Large, title, largeTitle, children, onClose, dontAllowBackdropExit, dontShowXButton, onTopOfOtherModals, } = props;
486
+ // Determine if no header either
487
+ const noHeader = (!title && type === ModalType$1.NoButtons);
486
488
  /* -------------- State ------------- */
487
489
  // True if animation is in use
488
490
  const [animatingIn, setAnimatingIn] = useState(true);
@@ -620,7 +622,7 @@ const Modal = (props) => {
620
622
  ? 'gray'
621
623
  : undefined),
622
624
  } },
623
- React__default.createElement("div", { className: "modal-header", style: {
625
+ !noHeader && (React__default.createElement("div", { className: "modal-header", style: {
624
626
  color: (isDarkModeOn()
625
627
  ? 'white'
626
628
  : undefined),
@@ -644,7 +646,7 @@ const Modal = (props) => {
644
646
  }, onClick: () => {
645
647
  // Handle close
646
648
  handleClose(ModalButtonType$1.Cancel);
647
- } }))),
649
+ } })))),
648
650
  children && (React__default.createElement("div", { className: "modal-body", style: {
649
651
  color: (isDarkModeOn()
650
652
  ? 'white'
@@ -767,10 +769,21 @@ const visitServerEndpoint = (opts) => __awaiter(void 0, void 0, void 0, function
767
769
  if (opts.params) {
768
770
  params = Object.fromEntries(Object
769
771
  .entries(opts.params)
770
- .filter(([key, value]) => {
772
+ .filter(([, value]) => {
771
773
  return value !== undefined;
772
774
  }));
773
775
  }
776
+ // Automatically JSONify arrays and objects
777
+ if (params) {
778
+ params = Object.fromEntries(Object
779
+ .entries(params)
780
+ .map(([key, value]) => {
781
+ if (Array.isArray(value) || typeof value === 'object') {
782
+ return [key, JSON.stringify(value)];
783
+ }
784
+ return [key, value];
785
+ }));
786
+ }
774
787
  // Send the request
775
788
  const sendRequest = yield getSendRequest();
776
789
  const response = yield sendRequest({