@ghentcdh/crouton-api 0.0.1-alpha.55 → 0.0.1-alpha.56
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.cjs +18 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -270,6 +270,7 @@ var ControlType = {
|
|
|
270
270
|
custom: "custom",
|
|
271
271
|
select: "select",
|
|
272
272
|
mutliSelect: "mutliSelect",
|
|
273
|
+
toggle: "toggle",
|
|
273
274
|
boolean: "boolean",
|
|
274
275
|
link: "link",
|
|
275
276
|
relation: "relation",
|
|
@@ -397,6 +398,12 @@ var ControlBuilder = class _ControlBuilder extends ElementBuilder {
|
|
|
397
398
|
...options
|
|
398
399
|
});
|
|
399
400
|
}
|
|
401
|
+
toggle(options) {
|
|
402
|
+
return this.opt({
|
|
403
|
+
format: ControlType.toggle,
|
|
404
|
+
...options
|
|
405
|
+
});
|
|
406
|
+
}
|
|
400
407
|
width(width) {
|
|
401
408
|
const named = [
|
|
402
409
|
"xs",
|
|
@@ -8973,6 +8980,9 @@ var buildSubResources = /* @__PURE__ */ __name((columns, parentRoute, parentMode
|
|
|
8973
8980
|
...childJson?.modalSize && {
|
|
8974
8981
|
modalSize: childJson.modalSize
|
|
8975
8982
|
},
|
|
8983
|
+
...childJson?.display && {
|
|
8984
|
+
display: childJson.display
|
|
8985
|
+
},
|
|
8976
8986
|
...mergedIncludes.length && {
|
|
8977
8987
|
include: mergedIncludes
|
|
8978
8988
|
},
|
|
@@ -9730,12 +9740,19 @@ var CroutonApiModule = class _CroutonApiModule {
|
|
|
9730
9740
|
static {
|
|
9731
9741
|
__name(this, "CroutonApiModule");
|
|
9732
9742
|
}
|
|
9733
|
-
onModuleInit() {
|
|
9743
|
+
async onModuleInit() {
|
|
9734
9744
|
if (!BigInt.prototype.toJSON) {
|
|
9735
9745
|
BigInt.prototype.toJSON = function() {
|
|
9736
9746
|
return Number(this);
|
|
9737
9747
|
};
|
|
9738
9748
|
}
|
|
9749
|
+
try {
|
|
9750
|
+
const { Decimal } = await import("@prisma/client/runtime/client");
|
|
9751
|
+
Decimal.prototype.toJSON = function() {
|
|
9752
|
+
return parseFloat(this.toString());
|
|
9753
|
+
};
|
|
9754
|
+
} catch {
|
|
9755
|
+
}
|
|
9739
9756
|
}
|
|
9740
9757
|
static forResources(configs, dataSources, loader, appConfig, config) {
|
|
9741
9758
|
const { baseUrl, prefix, security } = appConfig;
|