@celljs/ta-team 4.15.0 → 4.15.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.
Files changed (2) hide show
  1. package/package.json +4 -4
  2. package/web/index.js +11 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/ta-team",
3
- "version": "4.15.0",
3
+ "version": "4.15.2",
4
4
  "description": "A pi package for Ta: people let into your Ta by a link, each with a role (admin, collaborator, viewer, guest, or one of your own), what they may do checked by the Ta service for every call and every tool, asking for more and the answers, and a record",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -27,9 +27,9 @@
27
27
  "watch": "tsc -b -w --preserveWatchOutput"
28
28
  },
29
29
  "devDependencies": {
30
- "@celljs/ta-protocol": "4.15.0",
31
- "@celljs/ta-relay": "4.15.0",
32
- "@celljs/ta-web": "4.15.0",
30
+ "@celljs/ta-protocol": "4.15.2",
31
+ "@celljs/ta-relay": "4.15.2",
32
+ "@celljs/ta-web": "4.15.2",
33
33
  "@types/react": "^19.3.0"
34
34
  },
35
35
  "publishConfig": {
package/web/index.js CHANGED
@@ -2145,6 +2145,7 @@ function RoleDialog({ role, close }) {
2145
2145
  }
2146
2146
  setActions(next);
2147
2147
  };
2148
+ const [busy, run] = pi.ui.useBusy();
2148
2149
  const save = async () => {
2149
2150
  const saved = await act(() => call("saveRole", {
2150
2151
  id: role?.id,
@@ -2219,11 +2220,12 @@ function RoleDialog({ role, close }) {
2219
2220
  }, role && !fixed && /* @__PURE__ */ React.createElement("button", {
2220
2221
  type: "button",
2221
2222
  className: "ta-button ta-danger",
2222
- onClick: () => void act(() => call("deleteRole", role.id)).then((done) => {
2223
+ disabled: busy,
2224
+ onClick: () => void run(() => act(() => call("deleteRole", role.id)).then((done) => {
2223
2225
  if (done) {
2224
2226
  close();
2225
2227
  }
2226
- })
2228
+ }))
2227
2229
  }, t("deleteRole")), /* @__PURE__ */ React.createElement("span", {
2228
2230
  className: "ttm-grow"
2229
2231
  }), /* @__PURE__ */ React.createElement("button", {
@@ -2232,10 +2234,13 @@ function RoleDialog({ role, close }) {
2232
2234
  onClick: close
2233
2235
  }, fixed ? t("close") : t("cancel")), !fixed && /* @__PURE__ */ React.createElement("button", {
2234
2236
  type: "button",
2235
- className: "ta-button ta-primary",
2236
- disabled: !name.trim(),
2237
- onClick: () => void save()
2238
- }, t("save")))));
2237
+ className: `ta-button ta-primary${busy ? " ta-busy" : ""}`,
2238
+ "aria-busy": busy || undefined,
2239
+ disabled: busy || !name.trim(),
2240
+ onClick: () => void run(save)
2241
+ }, busy && /* @__PURE__ */ React.createElement("span", {
2242
+ className: "ta-spinner ta-busy-mark ta-on-brand"
2243
+ }), /* @__PURE__ */ React.createElement("span", null, t("save"))))));
2239
2244
  }
2240
2245
  function openRole(role) {
2241
2246
  show(({ close }) => /* @__PURE__ */ React.createElement(RoleDialog, {