@sprucelabs/heartwood-view-controllers 118.0.9 → 118.0.11
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.
|
@@ -114,7 +114,7 @@ export default class AbstractViewController {
|
|
|
114
114
|
alert(options) {
|
|
115
115
|
return __awaiter(this, void 0, void 0, function* () {
|
|
116
116
|
var _a, _b, _c;
|
|
117
|
-
const { title = 'Alert!', message, style } = options;
|
|
117
|
+
const { title = 'Alert!', message, style, okButtonLabel } = options;
|
|
118
118
|
const header = {
|
|
119
119
|
title,
|
|
120
120
|
};
|
|
@@ -124,21 +124,26 @@ export default class AbstractViewController {
|
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
126
126
|
this.activeAlert = Object.assign(Object.assign({}, options), { title });
|
|
127
|
+
const text = {};
|
|
128
|
+
if (message.includes('<')) {
|
|
129
|
+
text.html = message;
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
text.content = message;
|
|
133
|
+
}
|
|
127
134
|
const dlg = this.renderInDialog({
|
|
128
135
|
header,
|
|
129
136
|
body: {
|
|
130
137
|
sections: [
|
|
131
138
|
{
|
|
132
|
-
text
|
|
133
|
-
content: message,
|
|
134
|
-
},
|
|
139
|
+
text,
|
|
135
140
|
},
|
|
136
141
|
],
|
|
137
142
|
},
|
|
138
143
|
footer: {
|
|
139
144
|
buttons: [
|
|
140
145
|
{
|
|
141
|
-
label: 'Ok',
|
|
146
|
+
label: okButtonLabel !== null && okButtonLabel !== void 0 ? okButtonLabel : 'Ok',
|
|
142
147
|
type: buttonStyleToType(style),
|
|
143
148
|
onClick: () => {
|
|
144
149
|
void dlg.hide();
|
|
@@ -101,7 +101,7 @@ class AbstractViewController {
|
|
|
101
101
|
this.toastHandler(options);
|
|
102
102
|
}
|
|
103
103
|
async alert(options) {
|
|
104
|
-
const { title = 'Alert!', message, style } = options;
|
|
104
|
+
const { title = 'Alert!', message, style, okButtonLabel } = options;
|
|
105
105
|
const header = {
|
|
106
106
|
title,
|
|
107
107
|
};
|
|
@@ -111,21 +111,26 @@ class AbstractViewController {
|
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
113
113
|
this.activeAlert = { ...options, title };
|
|
114
|
+
const text = {};
|
|
115
|
+
if (message.includes('<')) {
|
|
116
|
+
text.html = message;
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
text.content = message;
|
|
120
|
+
}
|
|
114
121
|
const dlg = this.renderInDialog({
|
|
115
122
|
header,
|
|
116
123
|
body: {
|
|
117
124
|
sections: [
|
|
118
125
|
{
|
|
119
|
-
text
|
|
120
|
-
content: message,
|
|
121
|
-
},
|
|
126
|
+
text,
|
|
122
127
|
},
|
|
123
128
|
],
|
|
124
129
|
},
|
|
125
130
|
footer: {
|
|
126
131
|
buttons: [
|
|
127
132
|
{
|
|
128
|
-
label: 'Ok',
|
|
133
|
+
label: okButtonLabel ?? 'Ok',
|
|
129
134
|
type: buttonStyleToType(style),
|
|
130
135
|
onClick: () => {
|
|
131
136
|
void dlg.hide();
|
package/package.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"sideEffects": false,
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"description": "All the power of Heartwood in one, convenient package.",
|
|
16
|
-
"version": "118.0.
|
|
16
|
+
"version": "118.0.11",
|
|
17
17
|
"skill": {
|
|
18
18
|
"namespace": "HeartwoodViewControllers",
|
|
19
19
|
"commandOverrides": {
|
|
@@ -76,17 +76,17 @@
|
|
|
76
76
|
"@babel/plugin-transform-class-properties": "^7.25.9",
|
|
77
77
|
"@babel/plugin-transform-runtime": "^7.26.10",
|
|
78
78
|
"@babel/preset-env": "^7.26.9",
|
|
79
|
-
"@babel/preset-typescript": "^7.
|
|
80
|
-
"@sprucelabs/calendar-utils": "^42.0.
|
|
79
|
+
"@babel/preset-typescript": "^7.27.0",
|
|
80
|
+
"@sprucelabs/calendar-utils": "^42.0.659",
|
|
81
81
|
"@sprucelabs/error": "^6.0.589",
|
|
82
82
|
"@sprucelabs/globby": "^2.0.502",
|
|
83
|
-
"@sprucelabs/mercury-core-events": "^26.0.
|
|
84
|
-
"@sprucelabs/mercury-types": "^47.2.
|
|
85
|
-
"@sprucelabs/schema": "^31.0.
|
|
86
|
-
"@sprucelabs/spruce-core-schemas": "^40.1.
|
|
87
|
-
"@sprucelabs/spruce-event-utils": "^40.2.
|
|
88
|
-
"@sprucelabs/spruce-skill-utils": "^31.2.
|
|
89
|
-
"@sprucelabs/test-utils": "^5.5.
|
|
83
|
+
"@sprucelabs/mercury-core-events": "^26.0.41",
|
|
84
|
+
"@sprucelabs/mercury-types": "^47.2.55",
|
|
85
|
+
"@sprucelabs/schema": "^31.0.69",
|
|
86
|
+
"@sprucelabs/spruce-core-schemas": "^40.1.659",
|
|
87
|
+
"@sprucelabs/spruce-event-utils": "^40.2.62",
|
|
88
|
+
"@sprucelabs/spruce-skill-utils": "^31.2.74",
|
|
89
|
+
"@sprucelabs/test-utils": "^5.5.28",
|
|
90
90
|
"@swc/core": "1.2.103",
|
|
91
91
|
"babel-loader": "^10.0.0",
|
|
92
92
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
@@ -99,14 +99,14 @@
|
|
|
99
99
|
"webpack": "5.70.0"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
-
"@sprucelabs/esm-postbuild": "^6.0.
|
|
103
|
-
"@sprucelabs/jest-json-reporter": "^8.0.
|
|
104
|
-
"@sprucelabs/mercury-client": "^42.0.
|
|
105
|
-
"@sprucelabs/mercury-event-emitter": "^42.0.
|
|
102
|
+
"@sprucelabs/esm-postbuild": "^6.0.556",
|
|
103
|
+
"@sprucelabs/jest-json-reporter": "^8.0.591",
|
|
104
|
+
"@sprucelabs/mercury-client": "^42.0.758",
|
|
105
|
+
"@sprucelabs/mercury-event-emitter": "^42.0.758",
|
|
106
106
|
"@sprucelabs/resolve-path-aliases": "^2.0.538",
|
|
107
107
|
"@sprucelabs/semantic-release": "^5.0.2",
|
|
108
108
|
"@sprucelabs/test": "^9.0.77",
|
|
109
|
-
"@types/node": "^22.13.
|
|
109
|
+
"@types/node": "^22.13.13",
|
|
110
110
|
"@types/terser-webpack-plugin": "^5.2.0",
|
|
111
111
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
|
|
112
112
|
"chokidar-cli": "^3.0.0",
|