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:
+23
-76
@@ -6,7 +6,6 @@ export const ZodMiniType = /*@__PURE__*/ core.$constructor("ZodMiniType", (inst,
|
||||
throw new Error("Uninitialized schema in ZodMiniType.");
|
||||
core.$ZodType.init(inst, def);
|
||||
inst.def = def;
|
||||
inst.type = def.type;
|
||||
inst.parse = (data, params) => parse.parse(inst, data, params, { callee: inst.parse });
|
||||
inst.safeParse = (data, params) => parse.safeParse(inst, data, params);
|
||||
inst.parseAsync = async (data, params) => parse.parseAsync(inst, data, params, { callee: inst.parseAsync });
|
||||
@@ -79,13 +78,6 @@ export const ZodMiniURL = /*@__PURE__*/ core.$constructor("ZodMiniURL", (inst, d
|
||||
export function url(params) {
|
||||
return core._url(ZodMiniURL, params);
|
||||
}
|
||||
export function httpUrl(params) {
|
||||
return core._url(ZodMiniURL, {
|
||||
protocol: /^https?$/,
|
||||
hostname: core.regexes.domain,
|
||||
...util.normalizeParams(params),
|
||||
});
|
||||
}
|
||||
export const ZodMiniEmoji = /*@__PURE__*/ core.$constructor("ZodMiniEmoji", (inst, def) => {
|
||||
core.$ZodEmoji.init(inst, def);
|
||||
ZodMiniStringFormat.init(inst, def);
|
||||
@@ -163,13 +155,6 @@ export const ZodMiniCIDRv6 = /*@__PURE__*/ core.$constructor("ZodMiniCIDRv6", (i
|
||||
export function cidrv6(params) {
|
||||
return core._cidrv6(ZodMiniCIDRv6, params);
|
||||
}
|
||||
export const ZodMiniMAC = /*@__PURE__*/ core.$constructor("ZodMiniMAC", (inst, def) => {
|
||||
core.$ZodMAC.init(inst, def);
|
||||
ZodMiniStringFormat.init(inst, def);
|
||||
});
|
||||
export function mac(params) {
|
||||
return core._mac(ZodMiniMAC, params);
|
||||
}
|
||||
export const ZodMiniBase64 = /*@__PURE__*/ core.$constructor("ZodMiniBase64", (inst, def) => {
|
||||
core.$ZodBase64.init(inst, def);
|
||||
ZodMiniStringFormat.init(inst, def);
|
||||
@@ -205,21 +190,6 @@ export const ZodMiniCustomStringFormat = /*@__PURE__*/ core.$constructor("ZodMin
|
||||
export function stringFormat(format, fnOrRegex, _params = {}) {
|
||||
return core._stringFormat(ZodMiniCustomStringFormat, format, fnOrRegex, _params);
|
||||
}
|
||||
export function hostname(_params) {
|
||||
return core._stringFormat(ZodMiniCustomStringFormat, "hostname", core.regexes.hostname, _params);
|
||||
}
|
||||
export function hex(_params) {
|
||||
return core._stringFormat(ZodMiniCustomStringFormat, "hex", core.regexes.hex, _params);
|
||||
}
|
||||
export function hash(alg, params) {
|
||||
const enc = params?.enc ?? "hex";
|
||||
const format = `${alg}_${enc}`;
|
||||
const regex = core.regexes[format];
|
||||
// check for unrecognized format
|
||||
if (!regex)
|
||||
throw new Error(`Unrecognized hash format: ${format}`);
|
||||
return core._stringFormat(ZodMiniCustomStringFormat, format, regex, params);
|
||||
}
|
||||
export const ZodMiniNumber = /*@__PURE__*/ core.$constructor("ZodMiniNumber", (inst, def) => {
|
||||
core.$ZodNumber.init(inst, def);
|
||||
ZodMiniType.init(inst, def);
|
||||
@@ -350,7 +320,7 @@ export function array(element, params) {
|
||||
// .keyof
|
||||
export function keyof(schema) {
|
||||
const shape = schema._zod.def.shape;
|
||||
return _enum(Object.keys(shape));
|
||||
return literal(Object.keys(shape));
|
||||
}
|
||||
export const ZodMiniObject = /*@__PURE__*/ core.$constructor("ZodMiniObject", (inst, def) => {
|
||||
core.$ZodObject.init(inst, def);
|
||||
@@ -360,7 +330,10 @@ export const ZodMiniObject = /*@__PURE__*/ core.$constructor("ZodMiniObject", (i
|
||||
export function object(shape, params) {
|
||||
const def = {
|
||||
type: "object",
|
||||
shape: shape ?? {},
|
||||
get shape() {
|
||||
util.assignProp(this, "shape", { ...shape });
|
||||
return this.shape;
|
||||
},
|
||||
...util.normalizeParams(params),
|
||||
};
|
||||
return new ZodMiniObject(def);
|
||||
@@ -369,7 +342,11 @@ export function object(shape, params) {
|
||||
export function strictObject(shape, params) {
|
||||
return new ZodMiniObject({
|
||||
type: "object",
|
||||
shape,
|
||||
// shape: shape as core.$ZodLooseShape,
|
||||
get shape() {
|
||||
util.assignProp(this, "shape", { ...shape });
|
||||
return this.shape;
|
||||
},
|
||||
catchall: never(),
|
||||
...util.normalizeParams(params),
|
||||
});
|
||||
@@ -378,7 +355,14 @@ export function strictObject(shape, params) {
|
||||
export function looseObject(shape, params) {
|
||||
return new ZodMiniObject({
|
||||
type: "object",
|
||||
shape,
|
||||
// shape: shape as core.$ZodLooseShape,
|
||||
get shape() {
|
||||
util.assignProp(this, "shape", { ...shape });
|
||||
return this.shape;
|
||||
},
|
||||
// get optional() {
|
||||
// return util.optionalKeys(shape);
|
||||
// },
|
||||
catchall: unknown(),
|
||||
...util.normalizeParams(params),
|
||||
});
|
||||
@@ -387,9 +371,6 @@ export function looseObject(shape, params) {
|
||||
export function extend(schema, shape) {
|
||||
return util.extend(schema, shape);
|
||||
}
|
||||
export function safeExtend(schema, shape) {
|
||||
return util.safeExtend(schema, shape);
|
||||
}
|
||||
export function merge(schema, shape) {
|
||||
return util.extend(schema, shape);
|
||||
}
|
||||
@@ -471,11 +452,9 @@ export function record(keyType, valueType, params) {
|
||||
});
|
||||
}
|
||||
export function partialRecord(keyType, valueType, params) {
|
||||
const k = core.clone(keyType);
|
||||
k._zod.values = undefined;
|
||||
return new ZodMiniRecord({
|
||||
type: "record",
|
||||
keyType: k,
|
||||
keyType: union([keyType, never()]),
|
||||
valueType: valueType,
|
||||
...util.normalizeParams(params),
|
||||
});
|
||||
@@ -506,7 +485,6 @@ export function set(valueType, params) {
|
||||
export const ZodMiniEnum = /*@__PURE__*/ core.$constructor("ZodMiniEnum", (inst, def) => {
|
||||
core.$ZodEnum.init(inst, def);
|
||||
ZodMiniType.init(inst, def);
|
||||
inst.options = Object.values(def.entries);
|
||||
});
|
||||
function _enum(values, params) {
|
||||
const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
|
||||
@@ -592,7 +570,7 @@ export function _default(innerType, defaultValue) {
|
||||
type: "default",
|
||||
innerType: innerType,
|
||||
get defaultValue() {
|
||||
return typeof defaultValue === "function" ? defaultValue() : util.shallowClone(defaultValue);
|
||||
return typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -605,7 +583,7 @@ export function prefault(innerType, defaultValue) {
|
||||
type: "prefault",
|
||||
innerType: innerType,
|
||||
get defaultValue() {
|
||||
return typeof defaultValue === "function" ? defaultValue() : util.shallowClone(defaultValue);
|
||||
return typeof defaultValue === "function" ? defaultValue() : defaultValue;
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -660,19 +638,6 @@ export function pipe(in_, out) {
|
||||
out: out,
|
||||
});
|
||||
}
|
||||
export const ZodMiniCodec = /*@__PURE__*/ core.$constructor("ZodMiniCodec", (inst, def) => {
|
||||
ZodMiniPipe.init(inst, def);
|
||||
core.$ZodCodec.init(inst, def);
|
||||
});
|
||||
export function codec(in_, out, params) {
|
||||
return new ZodMiniCodec({
|
||||
type: "pipe",
|
||||
in: in_,
|
||||
out: out,
|
||||
transform: params.decode,
|
||||
reverseTransform: params.encode,
|
||||
});
|
||||
}
|
||||
export const ZodMiniReadonly = /*@__PURE__*/ core.$constructor("ZodMiniReadonly", (inst, def) => {
|
||||
core.$ZodReadonly.init(inst, def);
|
||||
ZodMiniType.init(inst, def);
|
||||
@@ -740,13 +705,6 @@ export function custom(fn, _params) {
|
||||
export function refine(fn, _params = {}) {
|
||||
return core._refine(ZodMiniCustom, fn, _params);
|
||||
}
|
||||
// superRefine
|
||||
export function superRefine(fn) {
|
||||
return core._superRefine(fn);
|
||||
}
|
||||
// Re-export describe and meta from core
|
||||
export const describe = core.describe;
|
||||
export const meta = core.meta;
|
||||
// instanceof
|
||||
class Class {
|
||||
constructor(..._args) { }
|
||||
@@ -761,9 +719,10 @@ function _instanceof(cls, params = {
|
||||
export { _instanceof as instanceof };
|
||||
// stringbool
|
||||
export const stringbool = (...args) => core._stringbool({
|
||||
Codec: ZodMiniCodec,
|
||||
Pipe: ZodMiniPipe,
|
||||
Boolean: ZodMiniBoolean,
|
||||
String: ZodMiniString,
|
||||
Transform: ZodMiniTransform,
|
||||
}, ...args);
|
||||
export function json() {
|
||||
const jsonSchema = _lazy(() => {
|
||||
@@ -771,15 +730,3 @@ export function json() {
|
||||
});
|
||||
return jsonSchema;
|
||||
}
|
||||
export const ZodMiniFunction = /*@__PURE__*/ core.$constructor("ZodMiniFunction", (inst, def) => {
|
||||
core.$ZodFunction.init(inst, def);
|
||||
ZodMiniType.init(inst, def);
|
||||
});
|
||||
export function _function(params) {
|
||||
return new ZodMiniFunction({
|
||||
type: "function",
|
||||
input: Array.isArray(params?.input) ? tuple(params?.input) : (params?.input ?? array(unknown())),
|
||||
output: params?.output ?? unknown(),
|
||||
});
|
||||
}
|
||||
export { _function as function };
|
||||
|
||||
Reference in New Issue
Block a user