feat(planning): grille hebdomadaire complète avec API et filtres
- Connexion API via proxy Angular (résolution CORS, base path /api) - Import CSS ng-zorro global pour les modales et composants - Filtres Camion/Show câblés sur l'affichage de la grille - Camions affichés via TrucksService (linkés au show du même créneau) - Panneau de détails : spectacles + camions du jour sélectionné - Modale de création de spectacle stylisée avec fond et centrage - Positionnement précis des events à la minute dans leur créneau - Auto-scroll vers l'heure courante au chargement - Ligne "maintenant" sur la colonne du jour actuel - Régénération des services OpenAPI (nouveaux noms de types) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+49
-104
@@ -23,8 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ZodFile = exports.ZodLiteral = exports.ZodEnum = exports.ZodSet = exports.ZodMap = exports.ZodRecord = exports.ZodTuple = exports.ZodIntersection = exports.ZodDiscriminatedUnion = exports.ZodUnion = exports.ZodObject = exports.ZodArray = exports.ZodDate = exports.ZodVoid = exports.ZodNever = exports.ZodUnknown = exports.ZodAny = exports.ZodNull = exports.ZodUndefined = exports.ZodSymbol = exports.ZodBigIntFormat = exports.ZodBigInt = exports.ZodBoolean = exports.ZodNumberFormat = exports.ZodNumber = exports.ZodCustomStringFormat = exports.ZodJWT = exports.ZodE164 = exports.ZodBase64URL = exports.ZodBase64 = exports.ZodCIDRv6 = exports.ZodCIDRv4 = exports.ZodIPv6 = exports.ZodMAC = exports.ZodIPv4 = exports.ZodKSUID = exports.ZodXID = exports.ZodULID = exports.ZodCUID2 = exports.ZodCUID = exports.ZodNanoID = exports.ZodEmoji = exports.ZodURL = exports.ZodUUID = exports.ZodGUID = exports.ZodEmail = exports.ZodStringFormat = exports.ZodString = exports._ZodString = exports.ZodType = void 0;
|
||||
exports.stringbool = exports.meta = exports.describe = exports.ZodCustom = exports.ZodFunction = exports.ZodPromise = exports.ZodLazy = exports.ZodTemplateLiteral = exports.ZodReadonly = exports.ZodCodec = exports.ZodPipe = exports.ZodNaN = exports.ZodCatch = exports.ZodSuccess = exports.ZodNonOptional = exports.ZodPrefault = exports.ZodDefault = exports.ZodNullable = exports.ZodOptional = exports.ZodTransform = void 0;
|
||||
exports.ZodTransform = exports.ZodFile = exports.ZodLiteral = exports.ZodEnum = exports.ZodSet = exports.ZodMap = exports.ZodRecord = exports.ZodTuple = exports.ZodIntersection = exports.ZodDiscriminatedUnion = exports.ZodUnion = exports.ZodObject = exports.ZodArray = exports.ZodDate = exports.ZodVoid = exports.ZodNever = exports.ZodUnknown = exports.ZodAny = exports.ZodNull = exports.ZodUndefined = exports.ZodSymbol = exports.ZodBigIntFormat = exports.ZodBigInt = exports.ZodBoolean = exports.ZodNumberFormat = exports.ZodNumber = exports.ZodCustomStringFormat = exports.ZodJWT = exports.ZodE164 = exports.ZodBase64URL = exports.ZodBase64 = exports.ZodCIDRv6 = exports.ZodCIDRv4 = exports.ZodIPv6 = exports.ZodIPv4 = exports.ZodKSUID = exports.ZodXID = exports.ZodULID = exports.ZodCUID2 = exports.ZodCUID = exports.ZodNanoID = exports.ZodEmoji = exports.ZodURL = exports.ZodUUID = exports.ZodGUID = exports.ZodEmail = exports.ZodStringFormat = exports.ZodString = exports._ZodString = exports.ZodType = void 0;
|
||||
exports.stringbool = exports.ZodCustom = exports.ZodPromise = exports.ZodLazy = exports.ZodTemplateLiteral = exports.ZodReadonly = exports.ZodPipe = exports.ZodNaN = exports.ZodCatch = exports.ZodSuccess = exports.ZodNonOptional = exports.ZodPrefault = exports.ZodDefault = exports.ZodNullable = exports.ZodOptional = void 0;
|
||||
exports.string = string;
|
||||
exports.email = email;
|
||||
exports.guid = guid;
|
||||
@@ -33,7 +33,6 @@ exports.uuidv4 = uuidv4;
|
||||
exports.uuidv6 = uuidv6;
|
||||
exports.uuidv7 = uuidv7;
|
||||
exports.url = url;
|
||||
exports.httpUrl = httpUrl;
|
||||
exports.emoji = emoji;
|
||||
exports.nanoid = nanoid;
|
||||
exports.cuid = cuid;
|
||||
@@ -42,7 +41,6 @@ exports.ulid = ulid;
|
||||
exports.xid = xid;
|
||||
exports.ksuid = ksuid;
|
||||
exports.ipv4 = ipv4;
|
||||
exports.mac = mac;
|
||||
exports.ipv6 = ipv6;
|
||||
exports.cidrv4 = cidrv4;
|
||||
exports.cidrv6 = cidrv6;
|
||||
@@ -51,9 +49,6 @@ exports.base64url = base64url;
|
||||
exports.e164 = e164;
|
||||
exports.jwt = jwt;
|
||||
exports.stringFormat = stringFormat;
|
||||
exports.hostname = hostname;
|
||||
exports.hex = hex;
|
||||
exports.hash = hash;
|
||||
exports.number = number;
|
||||
exports.int = int;
|
||||
exports.float32 = float32;
|
||||
@@ -100,15 +95,10 @@ exports.success = success;
|
||||
exports.catch = _catch;
|
||||
exports.nan = nan;
|
||||
exports.pipe = pipe;
|
||||
exports.codec = codec;
|
||||
exports.readonly = readonly;
|
||||
exports.templateLiteral = templateLiteral;
|
||||
exports.lazy = lazy;
|
||||
exports.promise = promise;
|
||||
exports._function = _function;
|
||||
exports.function = _function;
|
||||
exports._function = _function;
|
||||
exports.function = _function;
|
||||
exports.check = check;
|
||||
exports.custom = custom;
|
||||
exports.refine = refine;
|
||||
@@ -124,16 +114,18 @@ const parse = __importStar(require("./parse.cjs"));
|
||||
exports.ZodType = core.$constructor("ZodType", (inst, def) => {
|
||||
core.$ZodType.init(inst, def);
|
||||
inst.def = def;
|
||||
inst.type = def.type;
|
||||
Object.defineProperty(inst, "_def", { value: def });
|
||||
// base methods
|
||||
inst.check = (...checks) => {
|
||||
return inst.clone(index_js_1.util.mergeDefs(def, {
|
||||
return inst.clone({
|
||||
...def,
|
||||
checks: [
|
||||
...(def.checks ?? []),
|
||||
...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch),
|
||||
],
|
||||
}));
|
||||
}
|
||||
// { parent: true }
|
||||
);
|
||||
};
|
||||
inst.clone = (def, params) => core.clone(inst, def, params);
|
||||
inst.brand = () => inst;
|
||||
@@ -147,15 +139,6 @@ exports.ZodType = core.$constructor("ZodType", (inst, def) => {
|
||||
inst.parseAsync = async (data, params) => parse.parseAsync(inst, data, params, { callee: inst.parseAsync });
|
||||
inst.safeParseAsync = async (data, params) => parse.safeParseAsync(inst, data, params);
|
||||
inst.spa = inst.safeParseAsync;
|
||||
// encoding/decoding
|
||||
inst.encode = (data, params) => parse.encode(inst, data, params);
|
||||
inst.decode = (data, params) => parse.decode(inst, data, params);
|
||||
inst.encodeAsync = async (data, params) => parse.encodeAsync(inst, data, params);
|
||||
inst.decodeAsync = async (data, params) => parse.decodeAsync(inst, data, params);
|
||||
inst.safeEncode = (data, params) => parse.safeEncode(inst, data, params);
|
||||
inst.safeDecode = (data, params) => parse.safeDecode(inst, data, params);
|
||||
inst.safeEncodeAsync = async (data, params) => parse.safeEncodeAsync(inst, data, params);
|
||||
inst.safeDecodeAsync = async (data, params) => parse.safeDecodeAsync(inst, data, params);
|
||||
// refinements
|
||||
inst.refine = (check, params) => inst.check(refine(check, params));
|
||||
inst.superRefine = (refinement) => inst.check(superRefine(refinement));
|
||||
@@ -224,7 +207,6 @@ exports._ZodString = core.$constructor("_ZodString", (inst, def) => {
|
||||
inst.normalize = (...args) => inst.check(checks.normalize(...args));
|
||||
inst.toLowerCase = () => inst.check(checks.toLowerCase());
|
||||
inst.toUpperCase = () => inst.check(checks.toUpperCase());
|
||||
inst.slugify = () => inst.check(checks.slugify());
|
||||
});
|
||||
exports.ZodString = core.$constructor("ZodString", (inst, def) => {
|
||||
core.$ZodString.init(inst, def);
|
||||
@@ -308,13 +290,6 @@ exports.ZodURL = core.$constructor("ZodURL", (inst, def) => {
|
||||
function url(params) {
|
||||
return core._url(exports.ZodURL, params);
|
||||
}
|
||||
function httpUrl(params) {
|
||||
return core._url(exports.ZodURL, {
|
||||
protocol: /^https?$/,
|
||||
hostname: core.regexes.domain,
|
||||
...index_js_1.util.normalizeParams(params),
|
||||
});
|
||||
}
|
||||
exports.ZodEmoji = core.$constructor("ZodEmoji", (inst, def) => {
|
||||
// ZodStringFormat.init(inst, def);
|
||||
core.$ZodEmoji.init(inst, def);
|
||||
@@ -379,14 +354,6 @@ exports.ZodIPv4 = core.$constructor("ZodIPv4", (inst, def) => {
|
||||
function ipv4(params) {
|
||||
return core._ipv4(exports.ZodIPv4, params);
|
||||
}
|
||||
exports.ZodMAC = core.$constructor("ZodMAC", (inst, def) => {
|
||||
// ZodStringFormat.init(inst, def);
|
||||
core.$ZodMAC.init(inst, def);
|
||||
exports.ZodStringFormat.init(inst, def);
|
||||
});
|
||||
function mac(params) {
|
||||
return core._mac(exports.ZodMAC, params);
|
||||
}
|
||||
exports.ZodIPv6 = core.$constructor("ZodIPv6", (inst, def) => {
|
||||
// ZodStringFormat.init(inst, def);
|
||||
core.$ZodIPv6.init(inst, def);
|
||||
@@ -449,20 +416,6 @@ exports.ZodCustomStringFormat = core.$constructor("ZodCustomStringFormat", (inst
|
||||
function stringFormat(format, fnOrRegex, _params = {}) {
|
||||
return core._stringFormat(exports.ZodCustomStringFormat, format, fnOrRegex, _params);
|
||||
}
|
||||
function hostname(_params) {
|
||||
return core._stringFormat(exports.ZodCustomStringFormat, "hostname", core.regexes.hostname, _params);
|
||||
}
|
||||
function hex(_params) {
|
||||
return core._stringFormat(exports.ZodCustomStringFormat, "hex", core.regexes.hex, _params);
|
||||
}
|
||||
function hash(alg, params) {
|
||||
const enc = params?.enc ?? "hex";
|
||||
const format = `${alg}_${enc}`;
|
||||
const regex = core.regexes[format];
|
||||
if (!regex)
|
||||
throw new Error(`Unrecognized hash format: ${format}`);
|
||||
return core._stringFormat(exports.ZodCustomStringFormat, format, regex, params);
|
||||
}
|
||||
exports.ZodNumber = core.$constructor("ZodNumber", (inst, def) => {
|
||||
core.$ZodNumber.init(inst, def);
|
||||
exports.ZodType.init(inst, def);
|
||||
@@ -633,26 +586,22 @@ function array(element, params) {
|
||||
// .keyof
|
||||
function keyof(schema) {
|
||||
const shape = schema._zod.def.shape;
|
||||
return _enum(Object.keys(shape));
|
||||
return literal(Object.keys(shape));
|
||||
}
|
||||
exports.ZodObject = core.$constructor("ZodObject", (inst, def) => {
|
||||
core.$ZodObjectJIT.init(inst, def);
|
||||
core.$ZodObject.init(inst, def);
|
||||
exports.ZodType.init(inst, def);
|
||||
index_js_1.util.defineLazy(inst, "shape", () => {
|
||||
return def.shape;
|
||||
});
|
||||
index_js_1.util.defineLazy(inst, "shape", () => def.shape);
|
||||
inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
|
||||
inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall: catchall });
|
||||
inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
|
||||
// inst.nonstrict = () => inst.clone({ ...inst._zod.def, catchall: api.unknown() });
|
||||
inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
|
||||
inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
|
||||
inst.strip = () => inst.clone({ ...inst._zod.def, catchall: undefined });
|
||||
inst.extend = (incoming) => {
|
||||
return index_js_1.util.extend(inst, incoming);
|
||||
};
|
||||
inst.safeExtend = (incoming) => {
|
||||
return index_js_1.util.safeExtend(inst, incoming);
|
||||
};
|
||||
inst.merge = (other) => index_js_1.util.merge(inst, other);
|
||||
inst.pick = (mask) => index_js_1.util.pick(inst, mask);
|
||||
inst.omit = (mask) => index_js_1.util.omit(inst, mask);
|
||||
@@ -662,7 +611,10 @@ exports.ZodObject = core.$constructor("ZodObject", (inst, def) => {
|
||||
function object(shape, params) {
|
||||
const def = {
|
||||
type: "object",
|
||||
shape: shape ?? {},
|
||||
get shape() {
|
||||
index_js_1.util.assignProp(this, "shape", { ...shape });
|
||||
return this.shape;
|
||||
},
|
||||
...index_js_1.util.normalizeParams(params),
|
||||
};
|
||||
return new exports.ZodObject(def);
|
||||
@@ -671,7 +623,10 @@ function object(shape, params) {
|
||||
function strictObject(shape, params) {
|
||||
return new exports.ZodObject({
|
||||
type: "object",
|
||||
shape,
|
||||
get shape() {
|
||||
index_js_1.util.assignProp(this, "shape", { ...shape });
|
||||
return this.shape;
|
||||
},
|
||||
catchall: never(),
|
||||
...index_js_1.util.normalizeParams(params),
|
||||
});
|
||||
@@ -680,7 +635,10 @@ function strictObject(shape, params) {
|
||||
function looseObject(shape, params) {
|
||||
return new exports.ZodObject({
|
||||
type: "object",
|
||||
shape,
|
||||
get shape() {
|
||||
index_js_1.util.assignProp(this, "shape", { ...shape });
|
||||
return this.shape;
|
||||
},
|
||||
catchall: unknown(),
|
||||
...index_js_1.util.normalizeParams(params),
|
||||
});
|
||||
@@ -756,11 +714,9 @@ function record(keyType, valueType, params) {
|
||||
}
|
||||
// type alksjf = core.output<core.$ZodRecordKey>;
|
||||
function partialRecord(keyType, valueType, params) {
|
||||
const k = core.clone(keyType);
|
||||
k._zod.values = undefined;
|
||||
return new exports.ZodRecord({
|
||||
type: "record",
|
||||
keyType: k,
|
||||
keyType: union([keyType, never()]),
|
||||
valueType: valueType,
|
||||
...index_js_1.util.normalizeParams(params),
|
||||
});
|
||||
@@ -889,9 +845,6 @@ exports.ZodTransform = core.$constructor("ZodTransform", (inst, def) => {
|
||||
core.$ZodTransform.init(inst, def);
|
||||
exports.ZodType.init(inst, def);
|
||||
inst._zod.parse = (payload, _ctx) => {
|
||||
if (_ctx.direction === "backward") {
|
||||
throw new core.$ZodEncodeError(inst.constructor.name);
|
||||
}
|
||||
payload.addIssue = (issue) => {
|
||||
if (typeof issue === "string") {
|
||||
payload.issues.push(index_js_1.util.issue(issue, payload.value, def));
|
||||
@@ -904,7 +857,7 @@ exports.ZodTransform = core.$constructor("ZodTransform", (inst, def) => {
|
||||
_issue.code ?? (_issue.code = "custom");
|
||||
_issue.input ?? (_issue.input = payload.value);
|
||||
_issue.inst ?? (_issue.inst = inst);
|
||||
// _issue.continue ??= true;
|
||||
_issue.continue ?? (_issue.continue = true);
|
||||
payload.issues.push(index_js_1.util.issue(_issue));
|
||||
}
|
||||
};
|
||||
@@ -962,7 +915,7 @@ function _default(innerType, defaultValue) {
|
||||
type: "default",
|
||||
innerType: innerType,
|
||||
get defaultValue() {
|
||||
return typeof defaultValue === "function" ? defaultValue() : index_js_1.util.shallowClone(defaultValue);
|
||||
return typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -976,7 +929,7 @@ function prefault(innerType, defaultValue) {
|
||||
type: "prefault",
|
||||
innerType: innerType,
|
||||
get defaultValue() {
|
||||
return typeof defaultValue === "function" ? defaultValue() : index_js_1.util.shallowClone(defaultValue);
|
||||
return typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -1037,23 +990,9 @@ function pipe(in_, out) {
|
||||
// ...util.normalizeParams(params),
|
||||
});
|
||||
}
|
||||
exports.ZodCodec = core.$constructor("ZodCodec", (inst, def) => {
|
||||
exports.ZodPipe.init(inst, def);
|
||||
core.$ZodCodec.init(inst, def);
|
||||
});
|
||||
function codec(in_, out, params) {
|
||||
return new exports.ZodCodec({
|
||||
type: "pipe",
|
||||
in: in_,
|
||||
out: out,
|
||||
transform: params.decode,
|
||||
reverseTransform: params.encode,
|
||||
});
|
||||
}
|
||||
exports.ZodReadonly = core.$constructor("ZodReadonly", (inst, def) => {
|
||||
core.$ZodReadonly.init(inst, def);
|
||||
exports.ZodType.init(inst, def);
|
||||
inst.unwrap = () => inst._zod.def.innerType;
|
||||
});
|
||||
function readonly(innerType) {
|
||||
return new exports.ZodReadonly({
|
||||
@@ -1094,17 +1033,6 @@ function promise(innerType) {
|
||||
innerType: innerType,
|
||||
});
|
||||
}
|
||||
exports.ZodFunction = core.$constructor("ZodFunction", (inst, def) => {
|
||||
core.$ZodFunction.init(inst, def);
|
||||
exports.ZodType.init(inst, def);
|
||||
});
|
||||
function _function(params) {
|
||||
return new exports.ZodFunction({
|
||||
type: "function",
|
||||
input: Array.isArray(params?.input) ? tuple(params?.input) : (params?.input ?? array(unknown())),
|
||||
output: params?.output ?? unknown(),
|
||||
});
|
||||
}
|
||||
exports.ZodCustom = core.$constructor("ZodCustom", (inst, def) => {
|
||||
core.$ZodCustom.init(inst, def);
|
||||
exports.ZodType.init(inst, def);
|
||||
@@ -1126,11 +1054,27 @@ function refine(fn, _params = {}) {
|
||||
}
|
||||
// superRefine
|
||||
function superRefine(fn) {
|
||||
return core._superRefine(fn);
|
||||
const ch = check((payload) => {
|
||||
payload.addIssue = (issue) => {
|
||||
if (typeof issue === "string") {
|
||||
payload.issues.push(index_js_1.util.issue(issue, payload.value, ch._zod.def));
|
||||
}
|
||||
else {
|
||||
// for Zod 3 backwards compatibility
|
||||
const _issue = issue;
|
||||
if (_issue.fatal)
|
||||
_issue.continue = false;
|
||||
_issue.code ?? (_issue.code = "custom");
|
||||
_issue.input ?? (_issue.input = payload.value);
|
||||
_issue.inst ?? (_issue.inst = ch);
|
||||
_issue.continue ?? (_issue.continue = !ch._zod.def.abort);
|
||||
payload.issues.push(index_js_1.util.issue(_issue));
|
||||
}
|
||||
};
|
||||
return fn(payload.value, payload);
|
||||
});
|
||||
return ch;
|
||||
}
|
||||
// Re-export describe and meta from core
|
||||
exports.describe = core.describe;
|
||||
exports.meta = core.meta;
|
||||
function _instanceof(cls, params = {
|
||||
error: `Input not instance of ${cls.name}`,
|
||||
}) {
|
||||
@@ -1146,9 +1090,10 @@ function _instanceof(cls, params = {
|
||||
}
|
||||
// stringbool
|
||||
const stringbool = (...args) => core._stringbool({
|
||||
Codec: exports.ZodCodec,
|
||||
Pipe: exports.ZodPipe,
|
||||
Boolean: exports.ZodBoolean,
|
||||
String: exports.ZodString,
|
||||
Transform: exports.ZodTransform,
|
||||
}, ...args);
|
||||
exports.stringbool = stringbool;
|
||||
function json(params) {
|
||||
|
||||
Reference in New Issue
Block a user