pacem 0.51.4-dirac → 0.51.4-euler
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/css/pacem-dark-content.min.css +1 -1
- package/dist/css/pacem-dark-shell.min.css +1 -1
- package/dist/css/pacem-dark.min.css +1 -1
- package/dist/css/pacem-light-content.min.css +1 -1
- package/dist/css/pacem-light-shell.min.css +1 -1
- package/dist/css/pacem-light.min.css +1 -1
- package/dist/css/pacem-phousys-content.min.css +1 -1
- package/dist/css/pacem-phousys-shell.min.css +1 -1
- package/dist/css/pacem-phousys.min.css +1 -1
- package/dist/js/azure-maps.d.ts +1 -1
- package/dist/js/pacem-2d.d.ts +1 -1
- package/dist/js/pacem-2d.js +1 -1
- package/dist/js/pacem-2d.min.js +1 -1
- package/dist/js/pacem-3d.d.ts +1 -1
- package/dist/js/pacem-3d.js +1 -1
- package/dist/js/pacem-3d.min.js +1 -1
- package/dist/js/pacem-charts.d.ts +1 -1
- package/dist/js/pacem-charts.js +1 -1
- package/dist/js/pacem-charts.min.js +1 -1
- package/dist/js/pacem-cms.d.ts +1 -1
- package/dist/js/pacem-cms.js +1 -1
- package/dist/js/pacem-cms.min.js +1 -1
- package/dist/js/pacem-core.d.ts +26 -3
- package/dist/js/pacem-core.js +93 -56
- package/dist/js/pacem-core.min.js +2 -2
- package/dist/js/pacem-foundation.d.ts +1 -1
- package/dist/js/pacem-foundation.js +1 -1
- package/dist/js/pacem-foundation.min.js +1 -1
- package/dist/js/pacem-fx.d.ts +1 -1
- package/dist/js/pacem-fx.js +1 -1
- package/dist/js/pacem-fx.min.js +1 -1
- package/dist/js/pacem-logging.d.ts +1 -1
- package/dist/js/pacem-logging.js +1 -1
- package/dist/js/pacem-logging.min.js +1 -1
- package/dist/js/pacem-maps.d.ts +1 -1
- package/dist/js/pacem-maps.js +1 -1
- package/dist/js/pacem-maps.min.js +1 -1
- package/dist/js/pacem-media.d.ts +1 -1
- package/dist/js/pacem-media.js +1 -1
- package/dist/js/pacem-media.min.js +1 -1
- package/dist/js/pacem-networking.d.ts +1 -1
- package/dist/js/pacem-networking.js +1 -1
- package/dist/js/pacem-networking.min.js +1 -1
- package/dist/js/pacem-numerical.d.ts +1 -1
- package/dist/js/pacem-numerical.js +1 -1
- package/dist/js/pacem-numerical.min.js +1 -1
- package/dist/js/pacem-plus.d.ts +1 -1
- package/dist/js/pacem-plus.js +1 -1
- package/dist/js/pacem-plus.min.js +1 -1
- package/dist/js/pacem-scaffolding.d.ts +1 -1
- package/dist/js/pacem-scaffolding.js +1 -1
- package/dist/js/pacem-scaffolding.min.js +1 -1
- package/dist/js/pacem-ui.d.ts +1 -1
- package/dist/js/pacem-ui.js +1 -1
- package/dist/js/pacem-ui.min.js +1 -1
- package/dist/js/swagger-types.d.ts +1 -1
- package/package.json +1 -1
package/dist/js/azure-maps.d.ts
CHANGED
package/dist/js/pacem-2d.d.ts
CHANGED
package/dist/js/pacem-2d.js
CHANGED
package/dist/js/pacem-2d.min.js
CHANGED
package/dist/js/pacem-3d.d.ts
CHANGED
package/dist/js/pacem-3d.js
CHANGED
package/dist/js/pacem-3d.min.js
CHANGED
package/dist/js/pacem-charts.js
CHANGED
package/dist/js/pacem-cms.d.ts
CHANGED
package/dist/js/pacem-cms.js
CHANGED
package/dist/js/pacem-cms.min.js
CHANGED
package/dist/js/pacem-core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* pacem v0.51.4-
|
|
2
|
+
* pacem v0.51.4-euler (https://js.pacem.it)
|
|
3
3
|
* Copyright 2025 Pacem (https://pacem.it)
|
|
4
4
|
* Licensed under Apache-2.0
|
|
5
5
|
*/
|
|
@@ -139,6 +139,22 @@ declare namespace Pacem {
|
|
|
139
139
|
[key: string]: string;
|
|
140
140
|
};
|
|
141
141
|
};
|
|
142
|
+
export type RouterState = {
|
|
143
|
+
[key: string]: string;
|
|
144
|
+
} & {
|
|
145
|
+
$pathname: string;
|
|
146
|
+
$path: string;
|
|
147
|
+
$querystring?: string;
|
|
148
|
+
$query: {
|
|
149
|
+
[key: string]: string;
|
|
150
|
+
};
|
|
151
|
+
$hash?: string;
|
|
152
|
+
};
|
|
153
|
+
type RouteMetadata = {
|
|
154
|
+
name: string;
|
|
155
|
+
optional: boolean;
|
|
156
|
+
index: number;
|
|
157
|
+
};
|
|
142
158
|
/** To be replaced when Cookie Store API types will be included in TypeScript. */
|
|
143
159
|
export type CookieData = {
|
|
144
160
|
name: string;
|
|
@@ -408,6 +424,15 @@ declare namespace Pacem {
|
|
|
408
424
|
}, removeNullEntries?: boolean, hash?: boolean) => string;
|
|
409
425
|
parseQuery: (query?: string | Location) => Record<string, string>;
|
|
410
426
|
hasMandatoryTemplateSegments: (url: any) => boolean;
|
|
427
|
+
parseRoute: (pathTemplate: string) => RouteMetadata[];
|
|
428
|
+
split: (url: string) => {
|
|
429
|
+
protocol?: string;
|
|
430
|
+
domain?: string;
|
|
431
|
+
path: string;
|
|
432
|
+
query?: string;
|
|
433
|
+
hash?: string;
|
|
434
|
+
};
|
|
435
|
+
parseState: (metadata: RouteMetadata[], url: string, path?: string, query?: string, hash?: string) => RouterState;
|
|
411
436
|
};
|
|
412
437
|
/**
|
|
413
438
|
* Ensures the proper parsing of Web API results, including deprecated/legacy Pacem wrapped results.
|
|
@@ -1494,8 +1519,6 @@ declare namespace Pacem.Components {
|
|
|
1494
1519
|
private _parseTemplate;
|
|
1495
1520
|
private _segmentateUrl;
|
|
1496
1521
|
private _parseState;
|
|
1497
|
-
private _parseHash;
|
|
1498
|
-
private _parseQuery;
|
|
1499
1522
|
}
|
|
1500
1523
|
}
|
|
1501
1524
|
declare namespace Pacem.Components {
|
package/dist/js/pacem-core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* pacem v0.51.4-
|
|
2
|
+
* pacem v0.51.4-euler (https://js.pacem.it)
|
|
3
3
|
* Copyright 2025 Pacem (https://pacem.it)
|
|
4
4
|
* Licensed under Apache-2.0
|
|
5
5
|
*/
|
|
@@ -282,6 +282,8 @@ var Pacem;
|
|
|
282
282
|
evt.preventDefault();
|
|
283
283
|
evt.stopPropagation();
|
|
284
284
|
};
|
|
285
|
+
const SEGMENT_PATTERN = /^\/[^\/]+/;
|
|
286
|
+
const ROUTE_SEGMENT_PATTERN = /\/\{([a-z\$_][\w]*)\??\}/;
|
|
285
287
|
class Utils {
|
|
286
288
|
static get core() {
|
|
287
289
|
const root = window['Pacem'];
|
|
@@ -1202,6 +1204,91 @@ var Pacem;
|
|
|
1202
1204
|
},
|
|
1203
1205
|
hasMandatoryTemplateSegments: function (url) {
|
|
1204
1206
|
return /(^|\/)\{\.*\}(\/|$)/.test(url);
|
|
1207
|
+
},
|
|
1208
|
+
parseRoute: function (pathTemplate) {
|
|
1209
|
+
let tmpl = pathTemplate;
|
|
1210
|
+
const trunks = [];
|
|
1211
|
+
if (!Utils.isNullOrEmpty(tmpl)) {
|
|
1212
|
+
let res;
|
|
1213
|
+
let j = 0;
|
|
1214
|
+
while ((res = SEGMENT_PATTERN.exec(tmpl)) != null) {
|
|
1215
|
+
const item = res[0];
|
|
1216
|
+
const res1 = ROUTE_SEGMENT_PATTERN.exec(item);
|
|
1217
|
+
if (!Utils.isNullOrEmpty(res1)) {
|
|
1218
|
+
const prop = res1[1];
|
|
1219
|
+
trunks.push({ name: prop, optional: item.charAt(item.length - 2) === '?', index: j });
|
|
1220
|
+
}
|
|
1221
|
+
tmpl = tmpl.substring(res.index + item.length);
|
|
1222
|
+
j++;
|
|
1223
|
+
}
|
|
1224
|
+
}
|
|
1225
|
+
return trunks;
|
|
1226
|
+
},
|
|
1227
|
+
split: function (url) {
|
|
1228
|
+
const URL_PATTERN = /^((https?:)?\/\/[^\/]+)?([^\?#]+)(\?[^#]*)?(#[^#]*)?$/;
|
|
1229
|
+
const regArr = URL_PATTERN.exec(url);
|
|
1230
|
+
if (!regArr /*|| regArr.length <= 3*/) {
|
|
1231
|
+
return null;
|
|
1232
|
+
}
|
|
1233
|
+
return { domain: regArr[2] ?? '', protocol: regArr[1] ?? '', path: regArr[3] ?? '', query: regArr[4] ?? '', hash: regArr[5] ?? '' };
|
|
1234
|
+
},
|
|
1235
|
+
parseState: function (metadata, url, path, query, hash) {
|
|
1236
|
+
let fullPath = url;
|
|
1237
|
+
if (Utils.isNullOrEmpty(path)) {
|
|
1238
|
+
const split = Utils.URIs.split(url);
|
|
1239
|
+
path = split.path;
|
|
1240
|
+
if (Utils.isNullOrEmpty(query)) {
|
|
1241
|
+
query = split.query ?? '';
|
|
1242
|
+
}
|
|
1243
|
+
if (Utils.isNullOrEmpty(hash)) {
|
|
1244
|
+
hash = split.hash ?? '';
|
|
1245
|
+
}
|
|
1246
|
+
fullPath = path + query + hash;
|
|
1247
|
+
}
|
|
1248
|
+
const parseHash = (hash) => {
|
|
1249
|
+
const ndx = hash.indexOf('#');
|
|
1250
|
+
if (ndx !== 0) {
|
|
1251
|
+
return null;
|
|
1252
|
+
}
|
|
1253
|
+
return hash.substring(ndx + 1);
|
|
1254
|
+
};
|
|
1255
|
+
const parseQuery = (search) => {
|
|
1256
|
+
const ndx = search.indexOf('?');
|
|
1257
|
+
if (ndx === 0) {
|
|
1258
|
+
return Utils.URIs.parseQuery(search.substring(ndx + 1));
|
|
1259
|
+
}
|
|
1260
|
+
return {};
|
|
1261
|
+
};
|
|
1262
|
+
let obj = {
|
|
1263
|
+
$path: fullPath,
|
|
1264
|
+
$pathname: path,
|
|
1265
|
+
$querystring: query.length > 0 ? query.substring(1) : query,
|
|
1266
|
+
$query: parseQuery(query),
|
|
1267
|
+
$hash: parseHash(hash)
|
|
1268
|
+
}, i = 0;
|
|
1269
|
+
const tmpl = metadata.slice();
|
|
1270
|
+
if (!Utils.isNullOrEmpty(tmpl)) {
|
|
1271
|
+
let res;
|
|
1272
|
+
while ((res = SEGMENT_PATTERN.exec(path)) != null) {
|
|
1273
|
+
const v = res[0];
|
|
1274
|
+
const tmplIndex = tmpl.findIndex(t => t.index === i);
|
|
1275
|
+
if (tmplIndex >= 0) {
|
|
1276
|
+
const tmplItem = tmpl[tmplIndex];
|
|
1277
|
+
const { name: prop } = tmplItem;
|
|
1278
|
+
Object.defineProperty(obj, prop, { enumerable: true, value: v.substring(1) });
|
|
1279
|
+
// remove used value
|
|
1280
|
+
tmpl.splice(tmplIndex, 1);
|
|
1281
|
+
}
|
|
1282
|
+
i++;
|
|
1283
|
+
path = path.substring(res.index + v.length);
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
for (let k = 0; k < tmpl.length; k++) {
|
|
1287
|
+
if (!tmpl[k].optional) {
|
|
1288
|
+
throw `Must provide "${tmpl[k].name}" route value.`;
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
return obj;
|
|
1205
1292
|
}
|
|
1206
1293
|
}; }
|
|
1207
1294
|
/**
|
|
@@ -5775,7 +5862,6 @@ var Pacem;
|
|
|
5775
5862
|
var Components;
|
|
5776
5863
|
(function (Components) {
|
|
5777
5864
|
const CHECK_PATTERN = /^([\w\.]:)?\/\/[^\/]+/;
|
|
5778
|
-
const URL_PATTERN = /^((https?:)?\/\/[^\/]+)?([^\?#]+)(\?[^#]*)?(#[^#]*)?$/;
|
|
5779
5865
|
let PacemRouterElement = class PacemRouterElement extends Components.PacemEventTarget {
|
|
5780
5866
|
constructor() {
|
|
5781
5867
|
super(...arguments);
|
|
@@ -5905,67 +5991,18 @@ var Pacem;
|
|
|
5905
5991
|
if (!Pacem.Utils.isNullOrEmpty(this.#template)) {
|
|
5906
5992
|
return this.#template;
|
|
5907
5993
|
}
|
|
5908
|
-
|
|
5909
|
-
if (!Pacem.Utils.isNullOrEmpty(tmpl)) {
|
|
5910
|
-
let res;
|
|
5911
|
-
while ((res = /\/\{([a-z\$_][\w]*)\??\}/g.exec(tmpl)) != null) {
|
|
5912
|
-
const prop = res[1], item = res[0];
|
|
5913
|
-
trunks.push({ name: prop, optional: item.charAt(item.length - 2) === '?' });
|
|
5914
|
-
tmpl = tmpl.substring(res.index + item.length);
|
|
5915
|
-
}
|
|
5916
|
-
}
|
|
5917
|
-
return this.#template = trunks;
|
|
5994
|
+
return this.#template = Pacem.Utils.URIs.parseRoute(tmpl);
|
|
5918
5995
|
}
|
|
5919
5996
|
_segmentateUrl(url) {
|
|
5920
|
-
const
|
|
5921
|
-
if (
|
|
5997
|
+
const retval = Pacem.Utils.URIs.split(url);
|
|
5998
|
+
if (Pacem.Utils.isNullOrEmpty(retval.path)) {
|
|
5922
5999
|
return null;
|
|
5923
6000
|
}
|
|
5924
|
-
return
|
|
6001
|
+
return retval;
|
|
5925
6002
|
}
|
|
5926
6003
|
_parseState(fullPath, path, query, hash) {
|
|
5927
|
-
var obj = {
|
|
5928
|
-
$path: fullPath,
|
|
5929
|
-
$pathname: path,
|
|
5930
|
-
$querystring: query.length > 0 ? query.substring(1) : query,
|
|
5931
|
-
$query: this._parseQuery(query),
|
|
5932
|
-
$hash: this._parseHash(hash)
|
|
5933
|
-
}, i = 0;
|
|
5934
6004
|
const tmpl = this._parseTemplate();
|
|
5935
|
-
|
|
5936
|
-
const pattern = /^\/[^\/]+/;
|
|
5937
|
-
let res;
|
|
5938
|
-
while ((res = pattern.exec(path)) != null) {
|
|
5939
|
-
const v = res[0];
|
|
5940
|
-
if (i >= tmpl.length) {
|
|
5941
|
-
throw `Length mismatch: cannot compare provided path with current template.`;
|
|
5942
|
-
}
|
|
5943
|
-
const prop = tmpl[i];
|
|
5944
|
-
Object.defineProperty(obj, prop.name, { enumerable: true, value: v.substring(1) });
|
|
5945
|
-
i++;
|
|
5946
|
-
path = path.substring(res.index + v.length);
|
|
5947
|
-
}
|
|
5948
|
-
}
|
|
5949
|
-
for (let k = i; k < tmpl.length; k++) {
|
|
5950
|
-
if (!tmpl[k].optional) {
|
|
5951
|
-
throw `Must provide "${tmpl[k].name}" route value.`;
|
|
5952
|
-
}
|
|
5953
|
-
}
|
|
5954
|
-
return obj;
|
|
5955
|
-
}
|
|
5956
|
-
_parseHash(hash) {
|
|
5957
|
-
const ndx = hash.indexOf('#');
|
|
5958
|
-
if (ndx !== 0) {
|
|
5959
|
-
return null;
|
|
5960
|
-
}
|
|
5961
|
-
return hash.substring(ndx + 1);
|
|
5962
|
-
}
|
|
5963
|
-
_parseQuery(search) {
|
|
5964
|
-
const ndx = search.indexOf('?');
|
|
5965
|
-
if (ndx === 0) {
|
|
5966
|
-
return Pacem.Utils.URIs.parseQuery(search.substring(ndx + 1));
|
|
5967
|
-
}
|
|
5968
|
-
return {};
|
|
6005
|
+
return Pacem.Utils.URIs.parseState(tmpl, fullPath, path, query, hash);
|
|
5969
6006
|
}
|
|
5970
6007
|
};
|
|
5971
6008
|
__decorate([
|