@design.estate/dees-catalog 21.47.0 → 21.48.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_bundle/bundle.js +25 -3
- package/dist_bundle/bundle.js.map +1 -1
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/dist_ts_web/elements/00group-feedback/dees-statusbutton/dees-statusbutton.d.ts +13 -4
- package/dist_ts_web/elements/00group-feedback/dees-statusbutton/dees-statusbutton.demo.js +17 -2
- package/dist_ts_web/elements/00group-feedback/dees-statusbutton/dees-statusbutton.js +10 -2
- package/package.json +1 -1
- package/readme.md +10 -3
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/ts_web/elements/00group-feedback/dees-statusbutton/dees-statusbutton.demo.ts +16 -1
- package/ts_web/elements/00group-feedback/dees-statusbutton/dees-statusbutton.ts +20 -5
package/dist_bundle/bundle.js
CHANGED
|
@@ -72501,6 +72501,18 @@ var demoFunc68 = /* @__PURE__ */ __name(() => {
|
|
|
72501
72501
|
throw new Error("The bank refused the connection (403).");
|
|
72502
72502
|
}, "action")
|
|
72503
72503
|
}
|
|
72504
|
+
},
|
|
72505
|
+
{
|
|
72506
|
+
key: "unmatched",
|
|
72507
|
+
severity: "warning",
|
|
72508
|
+
text: "1 payment is not matched to an invoice.",
|
|
72509
|
+
action: {
|
|
72510
|
+
label: "Match payment",
|
|
72511
|
+
iconName: "lucide:Link",
|
|
72512
|
+
// Matching opens in the page, under the panel: the panel closes before it does.
|
|
72513
|
+
closesPanel: true,
|
|
72514
|
+
action: /* @__PURE__ */ __name(() => showDemoResult(actionStatus, "Match payment: the panel closed first (panel-toggle: action), the focus is on the status button, and the matching would open in the page now."), "action")
|
|
72515
|
+
}
|
|
72504
72516
|
}
|
|
72505
72517
|
];
|
|
72506
72518
|
return demoPage("Status button", "A page's status in its header: one button beside the page's actions that shows the worst status and a count of the warnings and errors, and opens a speech-bubble panel that lists them. An error or a severe warning opens the panel by itself.", b`
|
|
@@ -72581,10 +72593,13 @@ const statuses: IStatusbuttonItem[] = [
|
|
|
72581
72593
|
</div>
|
|
72582
72594
|
${demoOutput("Add an error.")}
|
|
72583
72595
|
`)}
|
|
72584
|
-
${demoSection("Actions on statuses", "A status can offer the way to resolve it. Remove duplicates runs for a moment and resolves its warning; Retry sync fails, and the failure is reported as dees-action-error, here shown as a toast.", b`
|
|
72596
|
+
${demoSection("Actions on statuses", "A status can offer the way to resolve it. Remove duplicates runs for a moment and resolves its warning; Retry sync fails, and the failure is reported as dees-action-error, here shown as a toast. Match payment takes the reader on to a flow in the page (closesPanel): the panel closes before it runs.", b`
|
|
72585
72597
|
<div class="dees-demo-row">
|
|
72586
72598
|
${actionStatus}
|
|
72587
72599
|
</div>
|
|
72600
|
+
${demoOutput("Press Match payment.")}
|
|
72601
|
+
${demoCode(`{ key: 'unmatched', severity: 'warning', text: '1 payment is not matched to an invoice.',
|
|
72602
|
+
action: { label: 'Match payment', iconName: 'lucide:Link', closesPanel: true, action: () => openMatching() } }`)}
|
|
72588
72603
|
`)}
|
|
72589
72604
|
`);
|
|
72590
72605
|
}, "demoFunc");
|
|
@@ -72637,6 +72652,8 @@ var _DeesStatusbutton = class _DeesStatusbutton extends (_a98 = DeesElement, _it
|
|
|
72637
72652
|
__publicField(this, "autoOpening", false);
|
|
72638
72653
|
/** Why the panel is about to open, set by whoever opens it; unset, the host set `open`. */
|
|
72639
72654
|
__publicField(this, "openReason");
|
|
72655
|
+
/** Why the panel is closing through the popover's `close()`, set around the call; unset, a press of the button. */
|
|
72656
|
+
__publicField(this, "closeReason");
|
|
72640
72657
|
/** The popover accepted the last opening: the panel is on screen. */
|
|
72641
72658
|
__publicField(this, "panelShown", false);
|
|
72642
72659
|
/** Tells when the button comes on screen, for an automatic opening that had to wait. */
|
|
@@ -72659,7 +72676,7 @@ var _DeesStatusbutton = class _DeesStatusbutton extends (_a98 = DeesElement, _it
|
|
|
72659
72676
|
if (!shown) return;
|
|
72660
72677
|
this.clearAnnouncements();
|
|
72661
72678
|
const reason = event.detail.reason;
|
|
72662
|
-
this.dispatchToggle(false, reason === "explicit" ? "button" : reason);
|
|
72679
|
+
this.dispatchToggle(false, reason === "explicit" ? this.closeReason ?? "button" : reason);
|
|
72663
72680
|
}, "handlePopoverClose"));
|
|
72664
72681
|
}
|
|
72665
72682
|
/** The statuses, an absent list counting as none. */
|
|
@@ -72951,6 +72968,11 @@ var _DeesStatusbutton = class _DeesStatusbutton extends (_a98 = DeesElement, _it
|
|
|
72951
72968
|
async runItemAction(item, button) {
|
|
72952
72969
|
const action = item.action;
|
|
72953
72970
|
if (!action || action.disabled || this.pendingActions.has(item.key)) return;
|
|
72971
|
+
if (action.closesPanel && this.open) {
|
|
72972
|
+
this.closeReason = "action";
|
|
72973
|
+
this.popoverElement?.close();
|
|
72974
|
+
this.closeReason = void 0;
|
|
72975
|
+
}
|
|
72954
72976
|
this.pendingActions = /* @__PURE__ */ new Set([...this.pendingActions, item.key]);
|
|
72955
72977
|
try {
|
|
72956
72978
|
await runAction(this, { action, source: "statusbutton-action" }, () => action.action());
|
|
@@ -125299,7 +125321,7 @@ var bright = {
|
|
|
125299
125321
|
// ts_web/00_commitinfo_data.ts
|
|
125300
125322
|
var commitinfo = {
|
|
125301
125323
|
name: "@design.estate/dees-catalog",
|
|
125302
|
-
version: "21.
|
|
125324
|
+
version: "21.48.0",
|
|
125303
125325
|
description: "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript."
|
|
125304
125326
|
};
|
|
125305
125327
|
export {
|