sass-cms-template-common 0.0.18 → 0.0.19
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.d.ts +53 -4
- package/dist/index.js +1753 -1739
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +22 -0
- package/dist/server.js +2 -2
- package/dist/{services-CyMIBZpF.js → services-DiR0yIFz.js} +76 -34
- package/dist/services-DiR0yIFz.js.map +1 -0
- package/package.json +1 -1
- package/dist/services-CyMIBZpF.js.map +0 -1
package/dist/server.d.ts
CHANGED
|
@@ -2184,6 +2184,25 @@ export declare function findPublicationBySlug(sites: SiteSection[], slug: string
|
|
|
2184
2184
|
|
|
2185
2185
|
export declare function findPublicationLabel(sites: SiteSection[], publicationId: string): string;
|
|
2186
2186
|
|
|
2187
|
+
/**
|
|
2188
|
+
* Formatea un instante como tiempo transcurrido hasta "ahora": "hace 18 minutos",
|
|
2189
|
+
* "hace 3 días", "hace 3 meses". Elige sola la unidad más significativa y se
|
|
2190
|
+
* traduce al idioma del `localeTag` vía `Intl.RelativeTimeFormat` (no requiere
|
|
2191
|
+
* claves i18n propias).
|
|
2192
|
+
*
|
|
2193
|
+
* La cuenta es una resta de instantes UTC, así que NO depende del GMT del sitio
|
|
2194
|
+
* ni de la zona del navegador (a diferencia de `formatSiteDateTime`).
|
|
2195
|
+
*
|
|
2196
|
+
* @param epochMs Instante en milisegundos (UTC).
|
|
2197
|
+
* @param localeTag Tag BCP 47 (p. ej. `"es-AR"`); usar `getIntlLocaleTag(locale)`.
|
|
2198
|
+
* @param options `nowMs` (referencia de "ahora", por defecto `Date.now()`) y
|
|
2199
|
+
* `style` (por defecto `"long"`).
|
|
2200
|
+
*/
|
|
2201
|
+
export declare function formatRelativeTime(epochMs: number, localeTag: string, options?: {
|
|
2202
|
+
nowMs?: number;
|
|
2203
|
+
style?: RelativeTimeStyle;
|
|
2204
|
+
}): string;
|
|
2205
|
+
|
|
2187
2206
|
/**
|
|
2188
2207
|
* Formatea un instante (epoch ms) en la zona horaria del sitio, de forma
|
|
2189
2208
|
* estable entre navegadores.
|
|
@@ -4290,6 +4309,9 @@ export declare interface RecipesPublishCheckResponse extends CmsResponse {
|
|
|
4290
4309
|
[key: string]: unknown;
|
|
4291
4310
|
}
|
|
4292
4311
|
|
|
4312
|
+
/** Estilo del texto relativo (`Intl.RelativeTimeFormat`). */
|
|
4313
|
+
export declare type RelativeTimeStyle = 'long' | 'short' | 'narrow';
|
|
4314
|
+
|
|
4293
4315
|
/** Devuelve la severidad de toast para un código de error (`warning`/`error`). */
|
|
4294
4316
|
export declare function resolveErrorSeverity(errorCode: string | number | Array<string | number> | null | undefined): CmsErrorSeverity;
|
|
4295
4317
|
|
package/dist/server.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o,
|
|
2
|
-
export { i as CmsAudiosServices, t as CmsAuthLoginServices, o as CmsAuthServices, a as CmsCategoriesServices, v as CmsCkeditorServices, r as CmsCommentsServices,
|
|
1
|
+
import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, H as s, I as c, J as l, L as u, M as d, N as f, O as p, P as m, Q as h, R as g, S as _, T as v, V as y, X as b, Y as x, Z as S, _ as C, a as w, at as T, b as E, c as D, ct as O, d as k, dt as A, et as j, f as M, g as N, h as P, i as F, it as I, j as L, k as R, l as z, lt as B, m as V, n as H, nt as U, o as W, ot as G, p as K, q, r as J, rt as Y, s as X, st as Z, t as Q, tt as $, u as ee, ut as te, v as ne, w as re, x as ie, y as ae, z as oe } from "./services-DiR0yIFz.js";
|
|
2
|
+
export { i as CmsAudiosServices, t as CmsAuthLoginServices, o as CmsAuthServices, a as CmsCategoriesServices, v as CmsCkeditorServices, r as CmsCommentsServices, Q as CmsCommonServices, _ as CmsContributionsServices, re as CmsCopilotServices, m as CmsDashboardServices, ae as CmsEventsServices, ne as CmsFileExplorerServices, C as CmsGeneralServices, N as CmsImagesServices, P as CmsNewsServices, V as CmsNotificationServices, K as CmsPeopleServices, M as CmsPlanningServices, k as CmsPollsServices, p as CmsPreviewServices, E as CmsProductivityPlanServices, f as CmsProfileServices, d as CmsPublicationsServices, ee as CmsRecipesServices, ie as CmsSectionsServices, L as CmsSitesServices, H as CmsTagsServices, J as CmsTranscribeServices, F as CmsTriviasServices, R as CmsUploadServices, z as CmsUsersServices, w as CmsVideosServices, W as CmsVodsServices, X as CmsWorkpaperServices, D as CmsZonesServices, $ as NETWORK_ERROR_CODES, U as classifyNetworkError, e as cmsNetworkBridge, A as commonErrorsEn, te as commonErrorsEs, B as commonErrorsPt, c as filterModulesByPermissions, q as findPublicationBySlug, l as findPublicationLabel, g as formatRelativeTime, oe as formatSiteDateTime, x as getAllPublications, G as getCommonError, b as getDefaultPublicationSlug, Y as getNetworkErrorCodeFromResult, n as getSiteNow, u as hasModulePermission, I as isNetworkErrorCode, T as isRetryableNetworkCode, Z as normalizeErrorCode, y as parseGmtOffsetMinutes, S as parsePublicationSlug, O as resolveErrorSeverity, j as resumeAxiosOnNetworkError, s as toSiteWallClock, h as toTestId };
|
|
@@ -908,9 +908,51 @@ function K(e, t, n, r = G) {
|
|
|
908
908
|
function fe(e, t, n = G) {
|
|
909
909
|
return K(Date.now(), e, t, n);
|
|
910
910
|
}
|
|
911
|
+
var pe = [
|
|
912
|
+
{
|
|
913
|
+
amount: 60,
|
|
914
|
+
unit: "second"
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
amount: 60,
|
|
918
|
+
unit: "minute"
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
amount: 24,
|
|
922
|
+
unit: "hour"
|
|
923
|
+
},
|
|
924
|
+
{
|
|
925
|
+
amount: 7,
|
|
926
|
+
unit: "day"
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
amount: 4.34524,
|
|
930
|
+
unit: "week"
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
amount: 12,
|
|
934
|
+
unit: "month"
|
|
935
|
+
},
|
|
936
|
+
{
|
|
937
|
+
amount: Infinity,
|
|
938
|
+
unit: "year"
|
|
939
|
+
}
|
|
940
|
+
];
|
|
941
|
+
function me(e, t, n = {}) {
|
|
942
|
+
let { nowMs: r = Date.now(), style: i = "long" } = n, a = new Intl.RelativeTimeFormat(t, {
|
|
943
|
+
numeric: "always",
|
|
944
|
+
style: i
|
|
945
|
+
}), o = (e - r) / 1e3;
|
|
946
|
+
o > -1 && (o = -1);
|
|
947
|
+
for (let e of pe) {
|
|
948
|
+
if (Math.abs(o) < e.amount) return a.format(Math.round(o), e.unit);
|
|
949
|
+
o /= e.amount;
|
|
950
|
+
}
|
|
951
|
+
return a.format(Math.round(o), "year");
|
|
952
|
+
}
|
|
911
953
|
//#endregion
|
|
912
954
|
//#region src/lib/utils/permissions.ts
|
|
913
|
-
function
|
|
955
|
+
function he(e, t) {
|
|
914
956
|
if (!e) return !1;
|
|
915
957
|
if (e.isAdmin) return !0;
|
|
916
958
|
let n = t.toUpperCase();
|
|
@@ -1165,7 +1207,7 @@ var J = class {
|
|
|
1165
1207
|
return console.error("[/sites/get]", e), Promise.reject(e);
|
|
1166
1208
|
}
|
|
1167
1209
|
};
|
|
1168
|
-
},
|
|
1210
|
+
}, ge = class {
|
|
1169
1211
|
props;
|
|
1170
1212
|
constructor(e) {
|
|
1171
1213
|
this.props = e;
|
|
@@ -1267,7 +1309,7 @@ var J = class {
|
|
|
1267
1309
|
}
|
|
1268
1310
|
}
|
|
1269
1311
|
};
|
|
1270
|
-
},
|
|
1312
|
+
}, _e = (e) => btoa(e), ve = class {
|
|
1271
1313
|
props;
|
|
1272
1314
|
authentication;
|
|
1273
1315
|
constructor(e) {
|
|
@@ -1276,7 +1318,7 @@ var J = class {
|
|
|
1276
1318
|
authParams = () => {
|
|
1277
1319
|
let { token: e, browserId: t, publication: n, siteName: r, project: i } = this.authentication;
|
|
1278
1320
|
return {
|
|
1279
|
-
token:
|
|
1321
|
+
token: _e(e),
|
|
1280
1322
|
browserId: t,
|
|
1281
1323
|
publication: n,
|
|
1282
1324
|
siteName: r,
|
|
@@ -1305,7 +1347,7 @@ var J = class {
|
|
|
1305
1347
|
...n ?? {}
|
|
1306
1348
|
}
|
|
1307
1349
|
});
|
|
1308
|
-
},
|
|
1350
|
+
}, ye = class {
|
|
1309
1351
|
props;
|
|
1310
1352
|
authentication;
|
|
1311
1353
|
constructor(e) {
|
|
@@ -1335,7 +1377,7 @@ var J = class {
|
|
|
1335
1377
|
...t
|
|
1336
1378
|
});
|
|
1337
1379
|
};
|
|
1338
|
-
},
|
|
1380
|
+
}, be = class {
|
|
1339
1381
|
props;
|
|
1340
1382
|
authentication;
|
|
1341
1383
|
constructor(e) {
|
|
@@ -1358,7 +1400,7 @@ var J = class {
|
|
|
1358
1400
|
return console.error("[/audios/adminConfiguration]", e), Promise.reject(e);
|
|
1359
1401
|
}
|
|
1360
1402
|
};
|
|
1361
|
-
},
|
|
1403
|
+
}, xe = class {
|
|
1362
1404
|
props;
|
|
1363
1405
|
authentication;
|
|
1364
1406
|
constructor(e) {
|
|
@@ -1394,7 +1436,7 @@ var J = class {
|
|
|
1394
1436
|
return console.error("[/categories/test]", e), Promise.reject(e);
|
|
1395
1437
|
}
|
|
1396
1438
|
};
|
|
1397
|
-
},
|
|
1439
|
+
}, Se = class {
|
|
1398
1440
|
props;
|
|
1399
1441
|
authentication;
|
|
1400
1442
|
constructor(e) {
|
|
@@ -1437,7 +1479,7 @@ var J = class {
|
|
|
1437
1479
|
return console.error("[/ckeditor/audioCode]", e), Promise.reject(e);
|
|
1438
1480
|
}
|
|
1439
1481
|
};
|
|
1440
|
-
},
|
|
1482
|
+
}, Ce = class {
|
|
1441
1483
|
props;
|
|
1442
1484
|
authentication;
|
|
1443
1485
|
constructor(e) {
|
|
@@ -1475,7 +1517,7 @@ var J = class {
|
|
|
1475
1517
|
return console.error("[/copilot/snooze]", e), Promise.reject(e);
|
|
1476
1518
|
}
|
|
1477
1519
|
};
|
|
1478
|
-
},
|
|
1520
|
+
}, we = class {
|
|
1479
1521
|
props;
|
|
1480
1522
|
authentication;
|
|
1481
1523
|
constructor(e) {
|
|
@@ -1641,7 +1683,7 @@ var J = class {
|
|
|
1641
1683
|
return console.error("[/comments/user/get]", e), Promise.reject(e);
|
|
1642
1684
|
}
|
|
1643
1685
|
};
|
|
1644
|
-
},
|
|
1686
|
+
}, Te = class {
|
|
1645
1687
|
props;
|
|
1646
1688
|
authentication;
|
|
1647
1689
|
constructor(e) {
|
|
@@ -1717,7 +1759,7 @@ var J = class {
|
|
|
1717
1759
|
return console.error("[/contributions/paymentGateways/get]", e), Promise.reject(e);
|
|
1718
1760
|
}
|
|
1719
1761
|
};
|
|
1720
|
-
},
|
|
1762
|
+
}, Ee = class {
|
|
1721
1763
|
props;
|
|
1722
1764
|
authentication;
|
|
1723
1765
|
constructor(e) {
|
|
@@ -1773,7 +1815,7 @@ var J = class {
|
|
|
1773
1815
|
return console.error("[/sections/update]", e), Promise.reject(e);
|
|
1774
1816
|
}
|
|
1775
1817
|
};
|
|
1776
|
-
},
|
|
1818
|
+
}, De = class {
|
|
1777
1819
|
props;
|
|
1778
1820
|
authentication;
|
|
1779
1821
|
constructor(e) {
|
|
@@ -2059,7 +2101,7 @@ var J = class {
|
|
|
2059
2101
|
return console.error("[/productivityPlan/reviewr/detail]", e), Promise.reject(e);
|
|
2060
2102
|
}
|
|
2061
2103
|
};
|
|
2062
|
-
},
|
|
2104
|
+
}, Oe = class {
|
|
2063
2105
|
props;
|
|
2064
2106
|
authentication;
|
|
2065
2107
|
constructor(e) {
|
|
@@ -2082,7 +2124,7 @@ var J = class {
|
|
|
2082
2124
|
return console.error("[/events/get]", e), Promise.reject(e);
|
|
2083
2125
|
}
|
|
2084
2126
|
};
|
|
2085
|
-
},
|
|
2127
|
+
}, ke = class {
|
|
2086
2128
|
props;
|
|
2087
2129
|
authentication;
|
|
2088
2130
|
constructor(e) {
|
|
@@ -2108,7 +2150,7 @@ var J = class {
|
|
|
2108
2150
|
return console.error("[/fileExplorer/getFolders]", e), Promise.reject(e);
|
|
2109
2151
|
}
|
|
2110
2152
|
};
|
|
2111
|
-
},
|
|
2153
|
+
}, Ae = class {
|
|
2112
2154
|
props;
|
|
2113
2155
|
authentication;
|
|
2114
2156
|
constructor(e) {
|
|
@@ -2124,7 +2166,7 @@ var J = class {
|
|
|
2124
2166
|
return console.error("[/updateCDN]", e), Promise.reject(e);
|
|
2125
2167
|
}
|
|
2126
2168
|
};
|
|
2127
|
-
},
|
|
2169
|
+
}, je = class {
|
|
2128
2170
|
props;
|
|
2129
2171
|
authentication;
|
|
2130
2172
|
constructor(e) {
|
|
@@ -2320,7 +2362,7 @@ var J = class {
|
|
|
2320
2362
|
return console.error("[/images/ckeditor/getImageComparation]", e), Promise.reject(e);
|
|
2321
2363
|
}
|
|
2322
2364
|
};
|
|
2323
|
-
},
|
|
2365
|
+
}, Me = class {
|
|
2324
2366
|
props;
|
|
2325
2367
|
authentication;
|
|
2326
2368
|
constructor(e) {
|
|
@@ -2893,7 +2935,7 @@ var J = class {
|
|
|
2893
2935
|
return console.error("[/news/searchConsole/inspection]", e), Promise.reject(e);
|
|
2894
2936
|
}
|
|
2895
2937
|
};
|
|
2896
|
-
},
|
|
2938
|
+
}, Ne = class {
|
|
2897
2939
|
props;
|
|
2898
2940
|
authentication;
|
|
2899
2941
|
constructor(e) {
|
|
@@ -2923,7 +2965,7 @@ var J = class {
|
|
|
2923
2965
|
return console.error("[/notification/topics]", e), Promise.reject(e);
|
|
2924
2966
|
}
|
|
2925
2967
|
};
|
|
2926
|
-
},
|
|
2968
|
+
}, Pe = class {
|
|
2927
2969
|
props;
|
|
2928
2970
|
authentication;
|
|
2929
2971
|
constructor(e) {
|
|
@@ -2999,7 +3041,7 @@ var J = class {
|
|
|
2999
3041
|
return console.error("[/people/adminConfiguration]", e), Promise.reject(e);
|
|
3000
3042
|
}
|
|
3001
3043
|
};
|
|
3002
|
-
},
|
|
3044
|
+
}, $ = class {
|
|
3003
3045
|
props;
|
|
3004
3046
|
authentication;
|
|
3005
3047
|
constructor(e) {
|
|
@@ -3055,7 +3097,7 @@ var J = class {
|
|
|
3055
3097
|
return console.error("[/planning/activity/copy]", e), Promise.reject(e);
|
|
3056
3098
|
}
|
|
3057
3099
|
};
|
|
3058
|
-
},
|
|
3100
|
+
}, Fe = class {
|
|
3059
3101
|
props;
|
|
3060
3102
|
authentication;
|
|
3061
3103
|
constructor(e) {
|
|
@@ -3213,7 +3255,7 @@ var J = class {
|
|
|
3213
3255
|
return console.error("[/polls/publish/now]", e), Promise.reject(e);
|
|
3214
3256
|
}
|
|
3215
3257
|
};
|
|
3216
|
-
},
|
|
3258
|
+
}, Ie = class {
|
|
3217
3259
|
props;
|
|
3218
3260
|
authentication;
|
|
3219
3261
|
constructor(e) {
|
|
@@ -3381,7 +3423,7 @@ var J = class {
|
|
|
3381
3423
|
return console.error("[/recipes/publish/schedule]", e), Promise.reject(e);
|
|
3382
3424
|
}
|
|
3383
3425
|
};
|
|
3384
|
-
},
|
|
3426
|
+
}, Le = class {
|
|
3385
3427
|
props;
|
|
3386
3428
|
authentication;
|
|
3387
3429
|
constructor(e) {
|
|
@@ -3477,7 +3519,7 @@ var J = class {
|
|
|
3477
3519
|
return console.error("[/users/actions/resetMfa]", e), Promise.reject(e);
|
|
3478
3520
|
}
|
|
3479
3521
|
};
|
|
3480
|
-
},
|
|
3522
|
+
}, Re = class {
|
|
3481
3523
|
props;
|
|
3482
3524
|
authentication;
|
|
3483
3525
|
constructor(e) {
|
|
@@ -3534,7 +3576,7 @@ var J = class {
|
|
|
3534
3576
|
return console.error("[/zones/order]", e), Promise.reject(e);
|
|
3535
3577
|
}
|
|
3536
3578
|
};
|
|
3537
|
-
},
|
|
3579
|
+
}, ze = class {
|
|
3538
3580
|
props;
|
|
3539
3581
|
authentication;
|
|
3540
3582
|
constructor(e) {
|
|
@@ -3567,7 +3609,7 @@ var J = class {
|
|
|
3567
3609
|
return console.error("[/workpaper/status]", e), Promise.reject(e);
|
|
3568
3610
|
}
|
|
3569
3611
|
};
|
|
3570
|
-
},
|
|
3612
|
+
}, Be = class {
|
|
3571
3613
|
props;
|
|
3572
3614
|
authentication;
|
|
3573
3615
|
constructor(e) {
|
|
@@ -3611,7 +3653,7 @@ var J = class {
|
|
|
3611
3653
|
return console.error("[/vods/playlist/create]", e), Promise.reject(e);
|
|
3612
3654
|
}
|
|
3613
3655
|
};
|
|
3614
|
-
},
|
|
3656
|
+
}, Ve = class {
|
|
3615
3657
|
props;
|
|
3616
3658
|
authentication;
|
|
3617
3659
|
constructor(e) {
|
|
@@ -3973,7 +4015,7 @@ var J = class {
|
|
|
3973
4015
|
return console.error("[/videos/nativos/download]", e), Promise.reject(e);
|
|
3974
4016
|
}
|
|
3975
4017
|
};
|
|
3976
|
-
},
|
|
4018
|
+
}, He = class {
|
|
3977
4019
|
props;
|
|
3978
4020
|
authentication;
|
|
3979
4021
|
constructor(e) {
|
|
@@ -4090,7 +4132,7 @@ var J = class {
|
|
|
4090
4132
|
return console.error("[/trivias/edit/inline]", e), Promise.reject(e);
|
|
4091
4133
|
}
|
|
4092
4134
|
};
|
|
4093
|
-
},
|
|
4135
|
+
}, Ue = class {
|
|
4094
4136
|
props;
|
|
4095
4137
|
authentication;
|
|
4096
4138
|
constructor(e) {
|
|
@@ -4106,7 +4148,7 @@ var J = class {
|
|
|
4106
4148
|
return console.error("[/transcribe/get]", e), Promise.reject(e);
|
|
4107
4149
|
}
|
|
4108
4150
|
};
|
|
4109
|
-
},
|
|
4151
|
+
}, We = class {
|
|
4110
4152
|
props;
|
|
4111
4153
|
authentication;
|
|
4112
4154
|
constructor(e) {
|
|
@@ -4212,7 +4254,7 @@ var J = class {
|
|
|
4212
4254
|
return console.error("[/tags/changeStatus]", e), Promise.reject(e);
|
|
4213
4255
|
}
|
|
4214
4256
|
};
|
|
4215
|
-
},
|
|
4257
|
+
}, Ge = class {
|
|
4216
4258
|
props;
|
|
4217
4259
|
authentication;
|
|
4218
4260
|
publications;
|
|
@@ -4244,6 +4286,6 @@ var J = class {
|
|
|
4244
4286
|
};
|
|
4245
4287
|
};
|
|
4246
4288
|
//#endregion
|
|
4247
|
-
export {
|
|
4289
|
+
export { j as $, ge as A, fe as B, we as C, s as Ct, be as D, xe as E, p as Et, J as F, F as G, W as H, q as I, B as J, P as K, he as L, Z as M, X as N, ye as O, Y as P, N as Q, me as R, Te as S, o as St, Se as T, d as Tt, L as U, U as V, I as W, V as X, R as Y, H as Z, Ae as _, c as _t, Ve as a, ue as at, De as b, ee as bt, Re as c, se as ct, Fe as d, x as dt, M as et, $ as f, y as ft, je as g, l as gt, Me as h, g as ht, He as i, le as it, Q as j, ve as k, Le as l, C as lt, Ne as m, te as mt, We as n, D as nt, Be as o, oe as ot, Pe as p, i as pt, z as q, Ue as r, de as rt, ze as s, w as st, Ge as t, T as tt, Ie as u, S as ut, ke as v, b as vt, Ce as w, re as wt, Ee as x, a as xt, Oe as y, ne as yt, K as z };
|
|
4248
4290
|
|
|
4249
|
-
//# sourceMappingURL=services-
|
|
4291
|
+
//# sourceMappingURL=services-DiR0yIFz.js.map
|