@cortezaproject/corteza-vue 2026.9.0-dev.2 → 2026.9.0-rc.1
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/index.cjs +66 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +66 -16
- package/dist/index.js.map +1 -1
- package/dist/src/libs/url.d.ts +16 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -5999,10 +5999,37 @@ function Make({ url = '', query = {}, hash = '', ref = window.location.toString(
|
|
|
5999
5999
|
u.search = qs.stringify(query, Object.assign(Object.assign({}, baseQsConfig), config));
|
|
6000
6000
|
return u.toString();
|
|
6001
6001
|
}
|
|
6002
|
+
/**
|
|
6003
|
+
* Builds a link to another web application
|
|
6004
|
+
*
|
|
6005
|
+
* Applications can be served under a path prefix (HTTP_BASE_URL), so a
|
|
6006
|
+
* root-absolute path like /workflow/... would miss it. The link is derived
|
|
6007
|
+
* from the configured webapp base or, failing that, from the current
|
|
6008
|
+
* application's <base href> which the server rewrites to <prefix>/<app>/.
|
|
6009
|
+
*/
|
|
6010
|
+
function MakeAppURL({ app, path = '', webapp, base }) {
|
|
6011
|
+
if (webapp === undefined) {
|
|
6012
|
+
// @ts-ignore
|
|
6013
|
+
webapp = typeof window !== 'undefined' ? window.CortezaWebapp : undefined;
|
|
6014
|
+
}
|
|
6015
|
+
if (base === undefined) {
|
|
6016
|
+
base = typeof document !== 'undefined' ? document.baseURI : undefined;
|
|
6017
|
+
}
|
|
6018
|
+
const rel = `${app}/${path}`.replace(/\/+$/, '');
|
|
6019
|
+
if (webapp) {
|
|
6020
|
+
const root = webapp.replace(/\/+$/, '');
|
|
6021
|
+
return /^(https?:)?\/\//.test(root)
|
|
6022
|
+
? new URL(`${root}/${rel}`).toString()
|
|
6023
|
+
: Make({ url: `${root}/${rel}`, ref: base });
|
|
6024
|
+
}
|
|
6025
|
+
// the current app lives one level below the webapp base
|
|
6026
|
+
return new URL(`../${rel}`, base).toString();
|
|
6027
|
+
}
|
|
6002
6028
|
|
|
6003
6029
|
var url = /*#__PURE__*/Object.freeze({
|
|
6004
6030
|
__proto__: null,
|
|
6005
|
-
Make: Make
|
|
6031
|
+
Make: Make,
|
|
6032
|
+
MakeAppURL: MakeAppURL
|
|
6006
6033
|
});
|
|
6007
6034
|
|
|
6008
6035
|
const accessToken = Symbol('accessToken');
|
|
@@ -7949,7 +7976,8 @@ var toast = {
|
|
|
7949
7976
|
return function () {
|
|
7950
7977
|
var err = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
7951
7978
|
var toastMsg = '';
|
|
7952
|
-
|
|
7979
|
+
// an error raised by a workflow error step may carry its own title
|
|
7980
|
+
var toastTitle = err.meta && err.meta.title || title;
|
|
7953
7981
|
err.message = _this.getToastMessage(err);
|
|
7954
7982
|
if (err.message) {
|
|
7955
7983
|
toastMsg = err.message;
|
|
@@ -31932,12 +31960,12 @@ var __vue_staticRenderFns__$B = [];
|
|
|
31932
31960
|
/* style */
|
|
31933
31961
|
const __vue_inject_styles__$D = function (inject) {
|
|
31934
31962
|
if (!inject) return
|
|
31935
|
-
inject("data-v-
|
|
31936
|
-
,inject("data-v-
|
|
31963
|
+
inject("data-v-3679b590_0", { source: ".nav-icon[data-v-3679b590]{width:calc(var(--topbar-height) - 24px);height:calc(var(--topbar-height) - 24px)}.nav-user-icon[data-v-3679b590]{min-width:calc(var(--topbar-height) - 16px);min-height:calc(var(--topbar-height) - 16px)}.header-navigation[data-v-3679b590]{width:100vw;min-height:var(--topbar-height);background-color:var(--topbar-bg)}.header-navigation .sidebar-spacer[data-v-3679b590]{display:none;min-width:calc(var(--sidebar-width) - 60px)}@media (min-width:1024px){.header-navigation .sidebar-spacer.expanded[data-v-3679b590]{display:block}}.avatar[data-v-3679b590]{border-radius:50%;background-size:cover;background-repeat:no-repeat;background-position:center}.avatar[data-v-3679b590]:hover{opacity:.8;transition:opacity .25s ease-in-out;-moz-transition:opacity .25s ease-in-out;-webkit-transition:opacity .25s ease-in-out}.title[data-v-3679b590]{display:flex;align-items:center;min-height:calc(var(--topbar-height) - 16px);padding-inline-start:47px}.title>*[data-v-3679b590]{padding:.25rem 0;display:-webkit-box;display:-ms-flexbox;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;overflow:hidden;text-overflow:ellipsis}.tools-wrapper[data-v-3679b590]{flex-grow:1}.tools-wrapper>*[data-v-3679b590]{display:flex;justify-content:end;align-items:center;flex-wrap:wrap}", map: undefined, media: undefined })
|
|
31964
|
+
,inject("data-v-3679b590_1", { source: ".topbar-dropdown-menu{z-index:1051}#theme-dropleft .btn{font-family:var(--font-regular)}", map: undefined, media: undefined });
|
|
31937
31965
|
|
|
31938
31966
|
};
|
|
31939
31967
|
/* scoped */
|
|
31940
|
-
const __vue_scope_id__$D = "data-v-
|
|
31968
|
+
const __vue_scope_id__$D = "data-v-3679b590";
|
|
31941
31969
|
/* module identifier */
|
|
31942
31970
|
const __vue_module_identifier__$D = undefined;
|
|
31943
31971
|
/* functional template */
|
|
@@ -35177,41 +35205,63 @@ var script$i = {
|
|
|
35177
35205
|
},
|
|
35178
35206
|
|
|
35179
35207
|
computed: {
|
|
35208
|
+
// Values come from reports that may yield nothing; never render NaN
|
|
35209
|
+
safeMin () {
|
|
35210
|
+
return Number.isFinite(this.min) ? this.min : 0
|
|
35211
|
+
},
|
|
35212
|
+
|
|
35213
|
+
safeMax () {
|
|
35214
|
+
return Number.isFinite(this.max) ? this.max : 100
|
|
35215
|
+
},
|
|
35216
|
+
|
|
35217
|
+
safeValue () {
|
|
35218
|
+
return Number.isFinite(this.value) ? this.value : this.safeMin
|
|
35219
|
+
},
|
|
35220
|
+
|
|
35180
35221
|
maxValue () {
|
|
35181
|
-
return Math.abs(this.
|
|
35222
|
+
return Math.abs(this.safeMax - this.safeMin)
|
|
35182
35223
|
},
|
|
35183
35224
|
|
|
35184
35225
|
progressValue () {
|
|
35185
|
-
if (this.
|
|
35186
|
-
return this.
|
|
35187
|
-
} else if (this.
|
|
35188
|
-
return this.
|
|
35226
|
+
if (this.safeValue < this.safeMin && this.safeMax > this.safeMin) {
|
|
35227
|
+
return this.safeValue - this.safeMin
|
|
35228
|
+
} else if (this.safeValue > this.safeMin && this.safeMax < this.safeMin) {
|
|
35229
|
+
return this.safeMin - this.safeValue
|
|
35230
|
+
}
|
|
35231
|
+
|
|
35232
|
+
return Math.abs(this.safeValue - this.safeMin)
|
|
35233
|
+
},
|
|
35234
|
+
|
|
35235
|
+
// Share of the range as a rounded percentage; 0 when the range is empty
|
|
35236
|
+
percentage () {
|
|
35237
|
+
if (!this.maxValue) {
|
|
35238
|
+
return 0
|
|
35189
35239
|
}
|
|
35190
35240
|
|
|
35191
|
-
|
|
35241
|
+
// https://stackoverflow.com/a/21907972/17926309
|
|
35242
|
+
return Math.round((((this.progressValue < 0 ? 0 : this.progressValue) / this.maxValue) * 100) * 100) / 100
|
|
35192
35243
|
},
|
|
35193
35244
|
|
|
35194
35245
|
progressLabel () {
|
|
35195
|
-
let value = this.
|
|
35246
|
+
let value = this.safeValue;
|
|
35196
35247
|
|
|
35197
35248
|
if (!this.labeled) {
|
|
35198
35249
|
return
|
|
35199
35250
|
}
|
|
35200
35251
|
|
|
35201
35252
|
if (this.relative) {
|
|
35202
|
-
|
|
35203
|
-
value = `${Math.round((((this.progressValue) / this.maxValue) * 100) * 100) / 100}%`;
|
|
35253
|
+
value = `${this.percentage}%`;
|
|
35204
35254
|
}
|
|
35205
35255
|
|
|
35206
35256
|
if (this.progress) {
|
|
35207
|
-
value = `${value} / ${this.relative ? '100' : this.
|
|
35257
|
+
value = `${value} / ${this.relative ? '100' : this.safeMax}${this.relative ? '%' : ''}`;
|
|
35208
35258
|
}
|
|
35209
35259
|
|
|
35210
35260
|
return value
|
|
35211
35261
|
},
|
|
35212
35262
|
|
|
35213
35263
|
progressVariant () {
|
|
35214
|
-
const value =
|
|
35264
|
+
const value = this.percentage;
|
|
35215
35265
|
|
|
35216
35266
|
let progressVariant = this.variant;
|
|
35217
35267
|
|