@middag-io/react 0.31.0 → 0.31.2
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/README.md
CHANGED
|
@@ -62,7 +62,7 @@ Create a token at [github.com/settings/tokens](https://github.com/settings/token
|
|
|
62
62
|
import { ContractPage, registerDefaults } from '@middag-io/react';
|
|
63
63
|
import type { PageContract } from '@middag-io/react';
|
|
64
64
|
|
|
65
|
-
// Register core shells, layouts, and the
|
|
65
|
+
// Register core shells, layouts, and the standard Community blocks
|
|
66
66
|
registerDefaults();
|
|
67
67
|
|
|
68
68
|
// Render a contract-driven page
|
|
@@ -366,7 +366,7 @@ cd packages/react-demo && npm run deploy
|
|
|
366
366
|
**Tiered.** Two packages, two licenses:
|
|
367
367
|
|
|
368
368
|
- **`@middag-io/react`** (this library — npm public + GitHub Packages): **Apache-2.0 OSS**. The
|
|
369
|
-
rendering engine, the
|
|
369
|
+
rendering engine, the standard Community blocks, shells, layouts, contracts and registries. Free to use, fork and
|
|
370
370
|
ship. See [`LICENSE`](./LICENSE).
|
|
371
371
|
- **`@middag-io/react-pro`** (GitHub Packages, MIDDAG team only): **proprietary / UNLICENSED**.
|
|
372
372
|
The reserved developer-experience toolkit. Access-gated by GitHub Packages auth — no runtime
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* register-defaults — populates the registries with core shells,
|
|
3
|
-
* layouts and the
|
|
3
|
+
* layouts and the standard Community block types available out-of-the-box.
|
|
4
4
|
*
|
|
5
5
|
* The 6 heavy/interactive blocks (chart_panel, flow_editor, condition_tree,
|
|
6
6
|
* sentence_builder, form_builder, kanban_board) and the rich ProductShell +
|
|
7
7
|
* chrome are Pro: they register via @middag-io/react-pro's registerProDefaults()
|
|
8
8
|
* (which overrides the `product` shell fallback). The Community engine ships the
|
|
9
|
-
* ImmersiveShell +
|
|
9
|
+
* ImmersiveShell + the standard Community blocks (form_panel included — heavy deps lazy).
|
|
10
10
|
*
|
|
11
11
|
* IIFE consumers (WordPress) should NOT call this function. Instead, import
|
|
12
12
|
* individual blocks from the barrel and call registerBlock() selectively to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DenseTableBlock.d.ts","sourceRoot":"","sources":["../../../src/base/blocks/DenseTableBlock.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAA4C,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAGpF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAQnD,OAAO,KAAK,EAAsB,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAKtF,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE,UAAU,CAAC,mBAAmB,CAAC,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"DenseTableBlock.d.ts","sourceRoot":"","sources":["../../../src/base/blocks/DenseTableBlock.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAA4C,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAGpF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAQnD,OAAO,KAAK,EAAsB,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAKtF,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE,UAAU,CAAC,mBAAmB,CAAC,GAAG,YAAY,CA8TxF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Block data contracts — typed data shapes for
|
|
2
|
+
* Block data contracts — typed data shapes for the ADR-807 block types.
|
|
3
3
|
*
|
|
4
4
|
* Imported by block components for BlockProps<TData> type parameter.
|
|
5
5
|
* These mirror the JSON shapes sent from PHP controllers via Inertia.
|
package/dist-lib/middag-react.js
CHANGED
|
@@ -7690,8 +7690,21 @@ function Tf({ block: e }) {
|
|
|
7690
7690
|
}, [l]), x = W((e, t) => {
|
|
7691
7691
|
let r = n.bulkActions?.find((t) => t.id === e);
|
|
7692
7692
|
if (!r) return;
|
|
7693
|
-
let i = Yl(r);
|
|
7694
|
-
|
|
7693
|
+
let i = Yl(r), a = i.kind === "link" ? "post" : i.method;
|
|
7694
|
+
if (r.confirmation) {
|
|
7695
|
+
g({
|
|
7696
|
+
open: !0,
|
|
7697
|
+
confirmation: r.confirmation,
|
|
7698
|
+
row: { count: t.length },
|
|
7699
|
+
href: i.url,
|
|
7700
|
+
method: a,
|
|
7701
|
+
isNavigation: !1,
|
|
7702
|
+
waiting: !1,
|
|
7703
|
+
payload: { ids: t }
|
|
7704
|
+
});
|
|
7705
|
+
return;
|
|
7706
|
+
}
|
|
7707
|
+
K[a](i.url, { ids: t }, {
|
|
7695
7708
|
preserveState: !0,
|
|
7696
7709
|
only: [l]
|
|
7697
7710
|
});
|
|
@@ -7747,14 +7760,15 @@ function Tf({ block: e }) {
|
|
|
7747
7760
|
};
|
|
7748
7761
|
}), T = W(() => {
|
|
7749
7762
|
if (!h) return;
|
|
7750
|
-
let { href: e, method: t, isNavigation: n, confirmation: r } = h;
|
|
7763
|
+
let { href: e, method: t, isNavigation: n, confirmation: r, payload: i } = h;
|
|
7751
7764
|
r.waitForPolling ? g((e) => e ? {
|
|
7752
7765
|
...e,
|
|
7753
7766
|
waiting: !0
|
|
7754
7767
|
} : null) : g(null), e && (n ? K.visit(e) : t === "delete" ? K.delete(e, {
|
|
7768
|
+
...i ? { data: i } : {},
|
|
7755
7769
|
preserveState: !0,
|
|
7756
7770
|
only: [l]
|
|
7757
|
-
}) : K[t ?? "post"](e, {}, {
|
|
7771
|
+
}) : K[t ?? "post"](e, i ?? {}, {
|
|
7758
7772
|
preserveState: !0,
|
|
7759
7773
|
only: [l]
|
|
7760
7774
|
}));
|