Skip to content

Commit 93b5362

Browse files
committed
update js libs
1 parent bd99a48 commit 93b5362

File tree

7 files changed

+11330
-9108
lines changed

7 files changed

+11330
-9108
lines changed

MyApp/wwwroot/lib/js/highlight.js

Lines changed: 245 additions & 233 deletions
Large diffs are not rendered by default.

MyApp/wwwroot/lib/mjs/servicestack-client.min.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

MyApp/wwwroot/lib/mjs/servicestack-client.mjs

Lines changed: 112 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ export class MetadataPropertyType {
138138
allowableMin;
139139
allowableMax;
140140
attributes;
141+
uploadTo;
142+
input;
143+
format;
144+
ref;
141145
constructor(init) { Object.assign(this, init); }
142146
}
143147
export class MetadataType {
@@ -148,6 +152,8 @@ export class MetadataType {
148152
implements;
149153
displayType;
150154
description;
155+
notes;
156+
icon;
151157
isNested;
152158
isEnum;
153159
isEnumInt;
@@ -164,6 +170,63 @@ export class MetadataType {
164170
meta;
165171
constructor(init) { Object.assign(this, init); }
166172
}
173+
export class ImageInfo {
174+
svg;
175+
uri;
176+
alt;
177+
cls;
178+
}
179+
export class InputInfo {
180+
id;
181+
name;
182+
type;
183+
value;
184+
placeholder;
185+
help;
186+
label;
187+
title;
188+
size;
189+
pattern;
190+
readOnly;
191+
required;
192+
disabled;
193+
autocomplete;
194+
autofocus;
195+
min;
196+
max;
197+
step;
198+
minLength;
199+
maxLength;
200+
accept;
201+
capture;
202+
multiple;
203+
allowableValues;
204+
allowableEntries;
205+
options;
206+
ignore;
207+
css;
208+
meta;
209+
}
210+
export class FormatInfo {
211+
method;
212+
options;
213+
locale;
214+
}
215+
export class RefInfo {
216+
model;
217+
selfId;
218+
refId;
219+
refLabel;
220+
}
221+
export class KeyValuePair {
222+
key;
223+
value;
224+
}
225+
export class FieldCss {
226+
field;
227+
input;
228+
label;
229+
}
167230
export class NewInstanceResolver {
168231
tryResolve(ctor) {
169232
return new ctor();
@@ -1198,7 +1261,7 @@ export function createErrorStatus(message, errorCode = 'Exception') {
11981261
export function createFieldError(fieldName, message, errorCode = 'Exception') {
11991262
return new ResponseStatus({ errors: [new ResponseError({ fieldName, errorCode, message })] });
12001263
}
1201-
export function isFormData(body) { return typeof window != "undefined" && body instanceof FormData; }
1264+
export function isFormData(body) { return body instanceof FormData; }
12021265
function createErrorResponse(errorCode, message, type = null) {
12031266
const error = apply(new ErrorResponse(), e => {
12041267
if (type != null)
@@ -1219,9 +1282,34 @@ export function createError(errorCode, message, fieldName) {
12191282
})
12201283
});
12211284
}
1222-
export function toCamelCase(s) { return !s ? s : s.charAt(0).toLowerCase() + s.substring(1); }
1223-
export function toPascalCase(s) { return !s ? s : s.charAt(0).toUpperCase() + s.substring(1); }
1224-
export function toKebabCase(s) { return (s || '').replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); }
1285+
export function toPascalCase(s) {
1286+
if (!s)
1287+
return '';
1288+
const isAllCaps = s.match(/^[A-Z0-9_]+$/);
1289+
if (isAllCaps) {
1290+
const words = s.split('_');
1291+
return words.map(x => x[0].toUpperCase() + x.substring(1).toLowerCase()).join('');
1292+
}
1293+
if (s.includes('_')) {
1294+
return s.split('_').filter(x => x[0]).map(x => x[0].toUpperCase() + x.substring(1)).join('');
1295+
}
1296+
return s.charAt(0).toUpperCase() + s.substring(1);
1297+
}
1298+
export function toCamelCase(s) {
1299+
s = toPascalCase(s);
1300+
if (!s)
1301+
return '';
1302+
return s.charAt(0).toLowerCase() + s.substring(1);
1303+
}
1304+
export function toKebabCase(s) {
1305+
if (!s || s.length <= 1)
1306+
return s.toLowerCase();
1307+
return s
1308+
.replace(/([A-Z0-9])/g, '-$1')
1309+
.toLowerCase()
1310+
.replace(/^-/, '')
1311+
.replace(/-+/g, '-');
1312+
}
12251313
export function map(o, f) { return o == null ? null : f(o); }
12261314
export function camelCaseAny(o) {
12271315
if (!o || !(o instanceof Object) || Array.isArray(o))
@@ -1361,7 +1449,11 @@ export function splitTitleCase(s) {
13611449
to.push(s.substring(lastSplit, s.length));
13621450
return to.filter(x => !!x);
13631451
}
1364-
export function humanify(s) { return !s || s.indexOf(' ') >= 0 ? s : ucFirst(splitTitleCase(s).join(' ')); }
1452+
export function humanify(s) {
1453+
return !s || indexOfAny(s, [' ', ',', '.', ':', '-']) >= 0
1454+
? s
1455+
: ucFirst(splitTitleCase(s).join(' '));
1456+
}
13651457
export function queryString(url) {
13661458
if (!url || url.indexOf('?') === -1)
13671459
return {};
@@ -2247,30 +2339,34 @@ export function safeVarName(s) {
22472339
}
22482340
export function pick(o, keys) {
22492341
const to = {};
2250-
for (const k in o) {
2251-
if (o.hasOwnProperty(k) && keys.indexOf(k) >= 0) {
2342+
Object.keys(o).forEach(k => {
2343+
if (keys.indexOf(k) >= 0) {
22522344
to[k] = o[k];
22532345
}
2254-
}
2346+
});
22552347
return to;
22562348
}
22572349
export function omit(o, keys) {
22582350
const to = {};
2259-
for (const k in o) {
2260-
if (o.hasOwnProperty(k) && keys.indexOf(k) < 0) {
2351+
if (!o)
2352+
return to;
2353+
Object.keys(o).forEach(k => {
2354+
if (keys.indexOf(k) < 0) {
22612355
to[k] = o[k];
22622356
}
2263-
}
2357+
});
22642358
return to;
22652359
}
22662360
export function omitEmpty(o) {
22672361
const to = {};
2268-
for (const k in o) {
2362+
if (!o)
2363+
return to;
2364+
Object.keys(o).forEach(k => {
22692365
const v = o[k];
22702366
if (v != null && v !== '') {
22712367
to[k] = v;
22722368
}
2273-
}
2369+
});
22742370
return to;
22752371
}
22762372
export function apply(x, fn) {
@@ -2835,9 +2931,10 @@ export class Inspect {
28352931
if (!inspectVarsPath || !obj)
28362932
return;
28372933
// resolve dynamic path to prevent ng webpack static analysis
2934+
const I = (s) => import(/* @vite-ignore */ s);
28382935
const nodeModule = (m) => 'no' + 'de:' + `${m}`;
2839-
await import(nodeModule('fs')).then(async (fs) => {
2840-
await import(nodeModule('path')).then(path => {
2936+
await I(nodeModule('fs')).then(async (fs) => {
2937+
await I(nodeModule('path')).then(path => {
28412938
let varsPath = inspectVarsPath.replace(/\\/g, '/');
28422939
if (varsPath.indexOf('/') >= 0) {
28432940
let dir = path.dirname(varsPath);

MyApp/wwwroot/lib/mjs/servicestack-vue.min.mjs

Lines changed: 12 additions & 12 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)