@atscript/moost-ui-presets 0.1.98 → 0.1.100
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.mts +129 -2
- package/dist/index.mjs +55 -1
- package/package.json +17 -17
- package/dist/as-preset-entry-BCmIVhgQ.mjs +0 -56
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,136 @@
|
|
|
1
|
-
import { n as AsCapabilitiesQuery, t as AsPresetEntry } from "./as-preset-entry-BCmIVhgQ.mjs";
|
|
2
1
|
import { AsDbController } from "@atscript/moost-db";
|
|
3
|
-
import { TAtscriptAnnotatedType } from "@atscript/typescript/utils";
|
|
2
|
+
import { TAtscriptAnnotatedType, TAtscriptTypeComplex, TAtscriptTypeObject, TMetadataMap, TValidatorOptions, Validator } from "@atscript/typescript/utils";
|
|
4
3
|
import { APP_CONF_PREFIX, AppConfData, AsPresetEntryData, AsPresetsErrorCode, FilterCondition, FilterConditionType, PRESET_ASPECTS, PresetAspect, PresetCapabilities, PresetCapabilities as PresetCapabilities$1, PresetData, PresetLimitReachedBody, PresetSnapshotWire, RESERVED_ID_PREFIXES, SYSTEM_PRESET_PREFIX, USER_CONF_PREFIX, UserConfData, appConfId, userConfId } from "@atscript/ui-table";
|
|
5
4
|
import { FilterExpr } from "@uniqu/core";
|
|
6
5
|
|
|
6
|
+
//#region src/as-capabilities-query.as.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Atscript interface **AsCapabilitiesQuery**
|
|
9
|
+
* @see {@link ./as-capabilities-query.as:10:18}
|
|
10
|
+
*/
|
|
11
|
+
declare class AsCapabilitiesQuery {
|
|
12
|
+
app: string;
|
|
13
|
+
tableKey: string;
|
|
14
|
+
static __is_atscript_annotated_type: true;
|
|
15
|
+
static type: TAtscriptTypeObject<keyof AsCapabilitiesQuery, AsCapabilitiesQuery>;
|
|
16
|
+
static metadata: TMetadataMap<AtscriptMetadata>;
|
|
17
|
+
static validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof AsCapabilitiesQuery>;
|
|
18
|
+
/** @deprecated JSON Schema support is disabled. Calling this method will throw a runtime error. To enable, set `jsonSchema: 'lazy'` or `jsonSchema: 'bundle'` in tsPlugin options, or add `@emit.jsonSchema` annotation to individual interfaces. */
|
|
19
|
+
static toJsonSchema: () => any;
|
|
20
|
+
/** @deprecated Example Data support is disabled. To enable, set `exampleData: true` in tsPlugin options. */
|
|
21
|
+
static toExampleData?: () => any;
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/as-preset-entry.as.d.ts
|
|
25
|
+
/**
|
|
26
|
+
* Atscript type **PresetAspect**
|
|
27
|
+
* @see {@link ./as-preset-entry.as:9:6}
|
|
28
|
+
*/
|
|
29
|
+
declare type PresetAspect$1 = "columns" | "filters" | "filterOps" | "sorters" | "itemsPerPage";
|
|
30
|
+
declare namespace PresetAspect$1 {
|
|
31
|
+
const __is_atscript_annotated_type: true;
|
|
32
|
+
const type: TAtscriptTypeComplex<PresetAspect$1>;
|
|
33
|
+
const metadata: TMetadataMap<AtscriptMetadata>;
|
|
34
|
+
const validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof PresetAspect$1>;
|
|
35
|
+
/** @deprecated JSON Schema support is disabled. Calling this method will throw a runtime error. To enable, set `jsonSchema: 'lazy'` or `jsonSchema: 'bundle'` in tsPlugin options, or add `@emit.jsonSchema` annotation to individual interfaces. */
|
|
36
|
+
const toJsonSchema: () => any;
|
|
37
|
+
/** @deprecated Example Data support is disabled. To enable, set `exampleData: true` in tsPlugin options. */
|
|
38
|
+
const toExampleData: (() => any) | undefined;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Atscript interface **AsPresetEntry**
|
|
42
|
+
* @see {@link ./as-preset-entry.as:12:18}
|
|
43
|
+
*/
|
|
44
|
+
declare class AsPresetEntry {
|
|
45
|
+
id: string;
|
|
46
|
+
type: "preset" | "userConf" | "appConf";
|
|
47
|
+
app: string;
|
|
48
|
+
tableKey?: string;
|
|
49
|
+
user: string;
|
|
50
|
+
userLabel?: string;
|
|
51
|
+
public?: boolean;
|
|
52
|
+
label?: string;
|
|
53
|
+
publicLabel?: string;
|
|
54
|
+
aspects?: PresetAspect$1[];
|
|
55
|
+
data: {
|
|
56
|
+
label: string;
|
|
57
|
+
content?: {
|
|
58
|
+
columns?: {
|
|
59
|
+
columnNames: string[];
|
|
60
|
+
columnWidths?: {
|
|
61
|
+
field: string;
|
|
62
|
+
width: string;
|
|
63
|
+
}[];
|
|
64
|
+
};
|
|
65
|
+
filters?: string[];
|
|
66
|
+
filterOps?: {
|
|
67
|
+
field: string;
|
|
68
|
+
conditions: {
|
|
69
|
+
type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "starts" | "ends" | "bw" | "null" | "notNull" | "regex";
|
|
70
|
+
value: (string | number | boolean)[];
|
|
71
|
+
}[];
|
|
72
|
+
}[];
|
|
73
|
+
sorters?: {
|
|
74
|
+
field: string;
|
|
75
|
+
direction: "asc" | "desc";
|
|
76
|
+
}[];
|
|
77
|
+
itemsPerPage?: number;
|
|
78
|
+
};
|
|
79
|
+
} | {
|
|
80
|
+
defaultPresetId?: string;
|
|
81
|
+
favPresetIds?: string[];
|
|
82
|
+
} | {
|
|
83
|
+
appearance?: "system" | "light" | "dark";
|
|
84
|
+
language?: string;
|
|
85
|
+
timezone?: string;
|
|
86
|
+
density?: "compact" | "cozy" | "comfortable";
|
|
87
|
+
dateFormat?: "iso" | "us" | "eu";
|
|
88
|
+
firstDayOfWeek?: 0 | 1 | 6;
|
|
89
|
+
customJson?: string;
|
|
90
|
+
};
|
|
91
|
+
createdAt: number;
|
|
92
|
+
updatedAt: number;
|
|
93
|
+
static __is_atscript_annotated_type: true;
|
|
94
|
+
static type: TAtscriptTypeObject<keyof AsPresetEntry, AsPresetEntry>;
|
|
95
|
+
static metadata: TMetadataMap<AtscriptMetadata>;
|
|
96
|
+
static validator: (opts?: Partial<TValidatorOptions>) => Validator<typeof AsPresetEntry>;
|
|
97
|
+
/** @deprecated JSON Schema support is disabled. Calling this method will throw a runtime error. To enable, set `jsonSchema: 'lazy'` or `jsonSchema: 'bundle'` in tsPlugin options, or add `@emit.jsonSchema` annotation to individual interfaces. */
|
|
98
|
+
static toJsonSchema: () => any;
|
|
99
|
+
/** @deprecated Example Data support is disabled. To enable, set `exampleData: true` in tsPlugin options. */
|
|
100
|
+
static toExampleData?: () => any;
|
|
101
|
+
static __flat: {
|
|
102
|
+
"id": string;
|
|
103
|
+
"type": "preset" | "userConf" | "appConf";
|
|
104
|
+
"app": string;
|
|
105
|
+
"tableKey"?: string;
|
|
106
|
+
"user": string;
|
|
107
|
+
"userLabel"?: string;
|
|
108
|
+
"public"?: boolean;
|
|
109
|
+
"label"?: string;
|
|
110
|
+
"publicLabel"?: string;
|
|
111
|
+
"aspects"?: never;
|
|
112
|
+
"data": string;
|
|
113
|
+
"createdAt": number;
|
|
114
|
+
"updatedAt": number;
|
|
115
|
+
};
|
|
116
|
+
static __ownProps: {
|
|
117
|
+
"id": string;
|
|
118
|
+
"type": "preset" | "userConf" | "appConf";
|
|
119
|
+
"app": string;
|
|
120
|
+
"tableKey"?: string;
|
|
121
|
+
"user": string;
|
|
122
|
+
"userLabel"?: string;
|
|
123
|
+
"public"?: boolean;
|
|
124
|
+
"label"?: string;
|
|
125
|
+
"publicLabel"?: string;
|
|
126
|
+
"aspects"?: never;
|
|
127
|
+
"data": string;
|
|
128
|
+
"createdAt": number;
|
|
129
|
+
"updatedAt": number;
|
|
130
|
+
};
|
|
131
|
+
static __pk: string;
|
|
132
|
+
}
|
|
133
|
+
//#endregion
|
|
7
134
|
//#region src/preset-rules.d.ts
|
|
8
135
|
type WriteAction = "insert" | "insertMany" | "replace" | "replaceMany" | "update" | "updateMany";
|
|
9
136
|
//#endregion
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,63 @@
|
|
|
1
|
-
import { n as AsCapabilitiesQuery, t as AsPresetEntry } from "./as-preset-entry-BCmIVhgQ.mjs";
|
|
2
1
|
import { AsDbController } from "@atscript/moost-db";
|
|
3
2
|
import { Get, HttpError, Query } from "@moostjs/event-http";
|
|
4
3
|
import { Inherit } from "moost";
|
|
4
|
+
import { defineAnnotatedType, throwFeatureDisabled } from "@atscript/typescript/utils";
|
|
5
5
|
import { APP_CONF_PREFIX, PRESET_ASPECTS, RESERVED_ID_PREFIXES, RESERVED_ID_PREFIXES as RESERVED_ID_PREFIXES$1, SYSTEM_PRESET_PREFIX, USER_CONF_PREFIX, appConfId, appConfId as appConfId$1, derivePresetAspects, isSystemPresetId, userConfId, userConfId as userConfId$1 } from "@atscript/ui-table";
|
|
6
6
|
import { walkFilter } from "@uniqu/core";
|
|
7
|
+
//#region src/as-capabilities-query.as
|
|
8
|
+
var AsCapabilitiesQuery = class {
|
|
9
|
+
static __is_atscript_annotated_type = true;
|
|
10
|
+
static type = {};
|
|
11
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
12
|
+
static id = "AsCapabilitiesQuery";
|
|
13
|
+
static toJsonSchema() {
|
|
14
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
defineAnnotatedType("object", AsCapabilitiesQuery).prop("app", defineAnnotatedType().designType("string").tags("string").annotate("expect.maxLength", { length: 128 }).annotate("expect.minLength", { length: 1 }).$type).prop("tableKey", defineAnnotatedType().designType("string").tags("string").annotate("expect.maxLength", { length: 64 }).annotate("expect.minLength", { length: 1 }).$type);
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/as-preset-entry.as
|
|
20
|
+
var PresetId = class {
|
|
21
|
+
static __is_atscript_annotated_type = true;
|
|
22
|
+
static type = {};
|
|
23
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
24
|
+
static id = "PresetId";
|
|
25
|
+
static toJsonSchema() {
|
|
26
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var FieldPath = class {
|
|
30
|
+
static __is_atscript_annotated_type = true;
|
|
31
|
+
static type = {};
|
|
32
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
33
|
+
static id = "FieldPath";
|
|
34
|
+
static toJsonSchema() {
|
|
35
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var PresetAspect = class {
|
|
39
|
+
static __is_atscript_annotated_type = true;
|
|
40
|
+
static type = {};
|
|
41
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
42
|
+
static id = "PresetAspect";
|
|
43
|
+
static toJsonSchema() {
|
|
44
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
var AsPresetEntry = class {
|
|
48
|
+
static __is_atscript_annotated_type = true;
|
|
49
|
+
static type = {};
|
|
50
|
+
static metadata = /* @__PURE__ */ new Map();
|
|
51
|
+
static id = "AsPresetEntry";
|
|
52
|
+
static toJsonSchema() {
|
|
53
|
+
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
defineAnnotatedType("", PresetId).designType("string").tags("string").annotate("expect.maxLength", { length: 64 }).annotate("expect.minLength", { length: 3 });
|
|
57
|
+
defineAnnotatedType("", FieldPath).designType("string").tags("string").annotate("expect.maxLength", { length: 256 }).annotate("expect.minLength", { length: 1 });
|
|
58
|
+
defineAnnotatedType("union", PresetAspect).item(defineAnnotatedType().designType("string").value("columns").$type).item(defineAnnotatedType().designType("string").value("filters").$type).item(defineAnnotatedType().designType("string").value("filterOps").$type).item(defineAnnotatedType().designType("string").value("sorters").$type).item(defineAnnotatedType().designType("string").value("itemsPerPage").$type);
|
|
59
|
+
defineAnnotatedType("object", AsPresetEntry).prop("id", defineAnnotatedType().designType("string").tags("string").annotate("meta.id", true).annotate("db.default.uuid", true).annotate("expect.maxLength", { length: 256 }).annotate("expect.minLength", { length: 3 }).$type).prop("type", defineAnnotatedType("union").item(defineAnnotatedType().designType("string").value("preset").$type).item(defineAnnotatedType().designType("string").value("userConf").$type).item(defineAnnotatedType().designType("string").value("appConf").$type).annotate("db.index.plain", { name: "preset_scope_idx" }, true).$type).prop("app", defineAnnotatedType().designType("string").tags("string").annotate("db.index.plain", { name: "preset_scope_idx" }, true).annotate("db.index.unique", "preset_public_label_idx", true).annotate("expect.maxLength", { length: 128 }).annotate("expect.minLength", { length: 1 }).$type).prop("tableKey", defineAnnotatedType().designType("string").tags("string").annotate("db.index.plain", { name: "preset_scope_idx" }, true).annotate("db.index.unique", "preset_public_label_idx", true).annotate("expect.maxLength", { length: 64 }).annotate("expect.minLength", { length: 1 }).optional().$type).prop("user", defineAnnotatedType().designType("string").tags("string").annotate("db.index.plain", { name: "preset_scope_idx" }, true).annotate("db.index.plain", { name: "preset_user_idx" }, true).annotate("expect.maxLength", { length: 128 }).annotate("expect.minLength", { length: 1 }).annotate("db.default", "").$type).prop("userLabel", defineAnnotatedType().designType("string").tags("string").annotate("expect.maxLength", { length: 128 }).annotate("expect.minLength", { length: 1 }).optional().$type).prop("public", defineAnnotatedType().designType("boolean").tags("boolean").annotate("db.index.plain", { name: "preset_public_idx" }, true).optional().$type).prop("label", defineAnnotatedType().designType("string").tags("string").annotate("db.index.plain", { name: "preset_label_idx" }, true).annotate("expect.maxLength", { length: 128 }).annotate("expect.minLength", { length: 1 }).optional().$type).prop("publicLabel", defineAnnotatedType().designType("string").tags("string").annotate("db.index.unique", "preset_public_label_idx", true).annotate("expect.maxLength", { length: 128 }).annotate("expect.minLength", { length: 1 }).optional().$type).prop("aspects", defineAnnotatedType("array").of(defineAnnotatedType().refTo(PresetAspect).$type).annotate("expect.array.uniqueItems", {}).optional().$type).prop("data", defineAnnotatedType("union").item(defineAnnotatedType("object").prop("label", defineAnnotatedType().designType("string").tags("string").annotate("expect.maxLength", { length: 128 }).annotate("expect.minLength", { length: 1 }).$type).prop("content", defineAnnotatedType("object").prop("columns", defineAnnotatedType("object").prop("columnNames", defineAnnotatedType("array").of(defineAnnotatedType().refTo(FieldPath).annotate("expect.maxLength", { length: 256 }).annotate("expect.minLength", { length: 1 }).$type).$type).prop("columnWidths", defineAnnotatedType("array").of(defineAnnotatedType("object").prop("field", defineAnnotatedType().refTo(FieldPath).annotate("expect.maxLength", { length: 256 }).annotate("expect.minLength", { length: 1 }).$type).prop("width", defineAnnotatedType().designType("string").tags("string").annotate("expect.maxLength", { length: 32 }).annotate("expect.minLength", { length: 1 }).$type).$type).optional().$type).optional().$type).prop("filters", defineAnnotatedType("array").of(defineAnnotatedType().refTo(FieldPath).annotate("expect.maxLength", { length: 256 }).annotate("expect.minLength", { length: 1 }).$type).optional().$type).prop("filterOps", defineAnnotatedType("array").of(defineAnnotatedType("object").prop("field", defineAnnotatedType().refTo(FieldPath).annotate("expect.maxLength", { length: 256 }).annotate("expect.minLength", { length: 1 }).$type).prop("conditions", defineAnnotatedType("array").of(defineAnnotatedType("object").prop("type", defineAnnotatedType("union").item(defineAnnotatedType().designType("string").value("eq").$type).item(defineAnnotatedType().designType("string").value("ne").$type).item(defineAnnotatedType().designType("string").value("gt").$type).item(defineAnnotatedType().designType("string").value("gte").$type).item(defineAnnotatedType().designType("string").value("lt").$type).item(defineAnnotatedType().designType("string").value("lte").$type).item(defineAnnotatedType().designType("string").value("contains").$type).item(defineAnnotatedType().designType("string").value("starts").$type).item(defineAnnotatedType().designType("string").value("ends").$type).item(defineAnnotatedType().designType("string").value("bw").$type).item(defineAnnotatedType().designType("string").value("null").$type).item(defineAnnotatedType().designType("string").value("notNull").$type).item(defineAnnotatedType().designType("string").value("regex").$type).$type).prop("value", defineAnnotatedType("array").of(defineAnnotatedType("union").item(defineAnnotatedType().designType("string").tags("string").$type).item(defineAnnotatedType().designType("number").tags("number").$type).item(defineAnnotatedType().designType("boolean").tags("boolean").$type).$type).$type).$type).$type).$type).optional().$type).prop("sorters", defineAnnotatedType("array").of(defineAnnotatedType("object").prop("field", defineAnnotatedType().refTo(FieldPath).annotate("expect.maxLength", { length: 256 }).annotate("expect.minLength", { length: 1 }).$type).prop("direction", defineAnnotatedType("union").item(defineAnnotatedType().designType("string").value("asc").$type).item(defineAnnotatedType().designType("string").value("desc").$type).$type).$type).optional().$type).prop("itemsPerPage", defineAnnotatedType().designType("number").tags("number").optional().$type).optional().$type).$type).item(defineAnnotatedType("object").prop("defaultPresetId", defineAnnotatedType().refTo(PresetId).annotate("expect.maxLength", { length: 64 }).annotate("expect.minLength", { length: 3 }).optional().$type).prop("favPresetIds", defineAnnotatedType("array").of(defineAnnotatedType().refTo(PresetId).annotate("expect.maxLength", { length: 64 }).annotate("expect.minLength", { length: 3 }).$type).optional().$type).$type).item(defineAnnotatedType("object").prop("appearance", defineAnnotatedType("union").item(defineAnnotatedType().designType("string").value("system").$type).item(defineAnnotatedType().designType("string").value("light").$type).item(defineAnnotatedType().designType("string").value("dark").$type).optional().$type).prop("language", defineAnnotatedType().designType("string").tags("string").annotate("expect.maxLength", { length: 5 }).annotate("expect.minLength", { length: 2 }).optional().$type).prop("timezone", defineAnnotatedType().designType("string").tags("string").annotate("expect.maxLength", { length: 64 }).annotate("expect.minLength", { length: 3 }).optional().$type).prop("density", defineAnnotatedType("union").item(defineAnnotatedType().designType("string").value("compact").$type).item(defineAnnotatedType().designType("string").value("cozy").$type).item(defineAnnotatedType().designType("string").value("comfortable").$type).optional().$type).prop("dateFormat", defineAnnotatedType("union").item(defineAnnotatedType().designType("string").value("iso").$type).item(defineAnnotatedType().designType("string").value("us").$type).item(defineAnnotatedType().designType("string").value("eu").$type).optional().$type).prop("firstDayOfWeek", defineAnnotatedType("union").item(defineAnnotatedType().designType("number").value(0).$type).item(defineAnnotatedType().designType("number").value(1).$type).item(defineAnnotatedType().designType("number").value(6).$type).optional().$type).prop("customJson", defineAnnotatedType().designType("string").tags("string").annotate("expect.maxLength", { length: 1024 }).optional().$type).$type).annotate("db.json", true).$type).prop("createdAt", defineAnnotatedType().designType("number").tags("number").annotate("db.default.now", true).$type).prop("updatedAt", defineAnnotatedType().designType("number").tags("number").annotate("db.default.now", true).$type).annotate("db.table", "as_presets");
|
|
60
|
+
//#endregion
|
|
7
61
|
//#region src/preset-rules.ts
|
|
8
62
|
const IDENTITY_FIELDS = [
|
|
9
63
|
"user",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/moost-ui-presets",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.100",
|
|
4
4
|
"description": "Moost controller and atscript schema for table-preset persistence — server-side persistence layer for atscript-ui table presets",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atscript",
|
|
@@ -41,29 +41,29 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@atscript/core": "^0.1.
|
|
45
|
-
"@atscript/db": "^0.1.
|
|
46
|
-
"@atscript/db-sqlite": "^0.1.
|
|
47
|
-
"@atscript/moost-db": "^0.1.
|
|
48
|
-
"@atscript/typescript": "^0.1.
|
|
49
|
-
"@moostjs/event-http": "^0.6.
|
|
44
|
+
"@atscript/core": "^0.1.76",
|
|
45
|
+
"@atscript/db": "^0.1.106",
|
|
46
|
+
"@atscript/db-sqlite": "^0.1.106",
|
|
47
|
+
"@atscript/moost-db": "^0.1.106",
|
|
48
|
+
"@atscript/typescript": "^0.1.76",
|
|
49
|
+
"@moostjs/event-http": "^0.6.27",
|
|
50
50
|
"@swc/core": "^1.15.40",
|
|
51
51
|
"@uniqu/core": "^0.1.6",
|
|
52
52
|
"@wooksjs/event-http": "^0.7.19",
|
|
53
|
-
"moost": "^0.6.
|
|
54
|
-
"unplugin-atscript": "^0.1.
|
|
53
|
+
"moost": "^0.6.27",
|
|
54
|
+
"unplugin-atscript": "^0.1.76",
|
|
55
55
|
"unplugin-swc": "^1.5.9",
|
|
56
56
|
"vitest": "npm:@voidzero-dev/vite-plus-test@0.1.14",
|
|
57
|
-
"@atscript/ui-table": "0.1.
|
|
57
|
+
"@atscript/ui-table": "0.1.100"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@atscript/core": "^0.1.
|
|
61
|
-
"@atscript/db": "^0.1.
|
|
62
|
-
"@atscript/moost-db": "^0.1.
|
|
63
|
-
"@atscript/typescript": "^0.1.
|
|
64
|
-
"@moostjs/event-http": "^0.6.
|
|
65
|
-
"moost": "^0.6.
|
|
66
|
-
"@atscript/ui-table": "^0.1.
|
|
60
|
+
"@atscript/core": "^0.1.76",
|
|
61
|
+
"@atscript/db": "^0.1.106",
|
|
62
|
+
"@atscript/moost-db": "^0.1.106",
|
|
63
|
+
"@atscript/typescript": "^0.1.76",
|
|
64
|
+
"@moostjs/event-http": "^0.6.27",
|
|
65
|
+
"moost": "^0.6.27",
|
|
66
|
+
"@atscript/ui-table": "^0.1.100"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"build": "vp pack",
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { defineAnnotatedType, throwFeatureDisabled } from "@atscript/typescript/utils";
|
|
2
|
-
//#region src/as-capabilities-query.as
|
|
3
|
-
var AsCapabilitiesQuery = class {
|
|
4
|
-
static __is_atscript_annotated_type = true;
|
|
5
|
-
static type = {};
|
|
6
|
-
static metadata = /* @__PURE__ */ new Map();
|
|
7
|
-
static id = "AsCapabilitiesQuery";
|
|
8
|
-
static toJsonSchema() {
|
|
9
|
-
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
defineAnnotatedType("object", AsCapabilitiesQuery).prop("app", defineAnnotatedType().designType("string").tags("string").annotate("expect.maxLength", { length: 128 }).annotate("expect.minLength", { length: 1 }).$type).prop("tableKey", defineAnnotatedType().designType("string").tags("string").annotate("expect.maxLength", { length: 64 }).annotate("expect.minLength", { length: 1 }).$type);
|
|
13
|
-
//#endregion
|
|
14
|
-
//#region src/as-preset-entry.as
|
|
15
|
-
var PresetId = class {
|
|
16
|
-
static __is_atscript_annotated_type = true;
|
|
17
|
-
static type = {};
|
|
18
|
-
static metadata = /* @__PURE__ */ new Map();
|
|
19
|
-
static id = "PresetId";
|
|
20
|
-
static toJsonSchema() {
|
|
21
|
-
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
var FieldPath = class {
|
|
25
|
-
static __is_atscript_annotated_type = true;
|
|
26
|
-
static type = {};
|
|
27
|
-
static metadata = /* @__PURE__ */ new Map();
|
|
28
|
-
static id = "FieldPath";
|
|
29
|
-
static toJsonSchema() {
|
|
30
|
-
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
var PresetAspect = class {
|
|
34
|
-
static __is_atscript_annotated_type = true;
|
|
35
|
-
static type = {};
|
|
36
|
-
static metadata = /* @__PURE__ */ new Map();
|
|
37
|
-
static id = "PresetAspect";
|
|
38
|
-
static toJsonSchema() {
|
|
39
|
-
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
var AsPresetEntry = class {
|
|
43
|
-
static __is_atscript_annotated_type = true;
|
|
44
|
-
static type = {};
|
|
45
|
-
static metadata = /* @__PURE__ */ new Map();
|
|
46
|
-
static id = "AsPresetEntry";
|
|
47
|
-
static toJsonSchema() {
|
|
48
|
-
throwFeatureDisabled("JSON Schema", "jsonSchema", "emit.jsonSchema");
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
defineAnnotatedType("", PresetId).designType("string").tags("string").annotate("expect.maxLength", { length: 64 }).annotate("expect.minLength", { length: 3 });
|
|
52
|
-
defineAnnotatedType("", FieldPath).designType("string").tags("string").annotate("expect.maxLength", { length: 256 }).annotate("expect.minLength", { length: 1 });
|
|
53
|
-
defineAnnotatedType("union", PresetAspect).item(defineAnnotatedType().designType("string").value("columns").$type).item(defineAnnotatedType().designType("string").value("filters").$type).item(defineAnnotatedType().designType("string").value("filterOps").$type).item(defineAnnotatedType().designType("string").value("sorters").$type).item(defineAnnotatedType().designType("string").value("itemsPerPage").$type);
|
|
54
|
-
defineAnnotatedType("object", AsPresetEntry).prop("id", defineAnnotatedType().designType("string").tags("string").annotate("meta.id", true).annotate("db.default.uuid", true).annotate("expect.maxLength", { length: 256 }).annotate("expect.minLength", { length: 3 }).$type).prop("type", defineAnnotatedType("union").item(defineAnnotatedType().designType("string").value("preset").$type).item(defineAnnotatedType().designType("string").value("userConf").$type).item(defineAnnotatedType().designType("string").value("appConf").$type).annotate("db.index.plain", { name: "preset_scope_idx" }, true).$type).prop("app", defineAnnotatedType().designType("string").tags("string").annotate("db.index.plain", { name: "preset_scope_idx" }, true).annotate("db.index.unique", "preset_public_label_idx", true).annotate("expect.maxLength", { length: 128 }).annotate("expect.minLength", { length: 1 }).$type).prop("tableKey", defineAnnotatedType().designType("string").tags("string").annotate("db.index.plain", { name: "preset_scope_idx" }, true).annotate("db.index.unique", "preset_public_label_idx", true).annotate("expect.maxLength", { length: 64 }).annotate("expect.minLength", { length: 1 }).optional().$type).prop("user", defineAnnotatedType().designType("string").tags("string").annotate("db.index.plain", { name: "preset_scope_idx" }, true).annotate("db.index.plain", { name: "preset_user_idx" }, true).annotate("expect.maxLength", { length: 128 }).annotate("expect.minLength", { length: 1 }).annotate("db.default", "").$type).prop("userLabel", defineAnnotatedType().designType("string").tags("string").annotate("expect.maxLength", { length: 128 }).annotate("expect.minLength", { length: 1 }).optional().$type).prop("public", defineAnnotatedType().designType("boolean").tags("boolean").annotate("db.index.plain", { name: "preset_public_idx" }, true).optional().$type).prop("label", defineAnnotatedType().designType("string").tags("string").annotate("db.index.plain", { name: "preset_label_idx" }, true).annotate("expect.maxLength", { length: 128 }).annotate("expect.minLength", { length: 1 }).optional().$type).prop("publicLabel", defineAnnotatedType().designType("string").tags("string").annotate("db.index.unique", "preset_public_label_idx", true).annotate("expect.maxLength", { length: 128 }).annotate("expect.minLength", { length: 1 }).optional().$type).prop("aspects", defineAnnotatedType("array").of(defineAnnotatedType().refTo(PresetAspect).$type).annotate("expect.array.uniqueItems", {}).optional().$type).prop("data", defineAnnotatedType("union").item(defineAnnotatedType("object").prop("label", defineAnnotatedType().designType("string").tags("string").annotate("expect.maxLength", { length: 128 }).annotate("expect.minLength", { length: 1 }).$type).prop("content", defineAnnotatedType("object").prop("columns", defineAnnotatedType("object").prop("columnNames", defineAnnotatedType("array").of(defineAnnotatedType().refTo(FieldPath).annotate("expect.maxLength", { length: 256 }).annotate("expect.minLength", { length: 1 }).$type).$type).prop("columnWidths", defineAnnotatedType("array").of(defineAnnotatedType("object").prop("field", defineAnnotatedType().refTo(FieldPath).annotate("expect.maxLength", { length: 256 }).annotate("expect.minLength", { length: 1 }).$type).prop("width", defineAnnotatedType().designType("string").tags("string").annotate("expect.maxLength", { length: 32 }).annotate("expect.minLength", { length: 1 }).$type).$type).optional().$type).optional().$type).prop("filters", defineAnnotatedType("array").of(defineAnnotatedType().refTo(FieldPath).annotate("expect.maxLength", { length: 256 }).annotate("expect.minLength", { length: 1 }).$type).optional().$type).prop("filterOps", defineAnnotatedType("array").of(defineAnnotatedType("object").prop("field", defineAnnotatedType().refTo(FieldPath).annotate("expect.maxLength", { length: 256 }).annotate("expect.minLength", { length: 1 }).$type).prop("conditions", defineAnnotatedType("array").of(defineAnnotatedType("object").prop("type", defineAnnotatedType("union").item(defineAnnotatedType().designType("string").value("eq").$type).item(defineAnnotatedType().designType("string").value("ne").$type).item(defineAnnotatedType().designType("string").value("gt").$type).item(defineAnnotatedType().designType("string").value("gte").$type).item(defineAnnotatedType().designType("string").value("lt").$type).item(defineAnnotatedType().designType("string").value("lte").$type).item(defineAnnotatedType().designType("string").value("contains").$type).item(defineAnnotatedType().designType("string").value("starts").$type).item(defineAnnotatedType().designType("string").value("ends").$type).item(defineAnnotatedType().designType("string").value("bw").$type).item(defineAnnotatedType().designType("string").value("null").$type).item(defineAnnotatedType().designType("string").value("notNull").$type).item(defineAnnotatedType().designType("string").value("regex").$type).$type).prop("value", defineAnnotatedType("array").of(defineAnnotatedType("union").item(defineAnnotatedType().designType("string").tags("string").$type).item(defineAnnotatedType().designType("number").tags("number").$type).item(defineAnnotatedType().designType("boolean").tags("boolean").$type).$type).$type).$type).$type).$type).optional().$type).prop("sorters", defineAnnotatedType("array").of(defineAnnotatedType("object").prop("field", defineAnnotatedType().refTo(FieldPath).annotate("expect.maxLength", { length: 256 }).annotate("expect.minLength", { length: 1 }).$type).prop("direction", defineAnnotatedType("union").item(defineAnnotatedType().designType("string").value("asc").$type).item(defineAnnotatedType().designType("string").value("desc").$type).$type).$type).optional().$type).prop("itemsPerPage", defineAnnotatedType().designType("number").tags("number").optional().$type).optional().$type).$type).item(defineAnnotatedType("object").prop("defaultPresetId", defineAnnotatedType().refTo(PresetId).annotate("expect.maxLength", { length: 64 }).annotate("expect.minLength", { length: 3 }).optional().$type).prop("favPresetIds", defineAnnotatedType("array").of(defineAnnotatedType().refTo(PresetId).annotate("expect.maxLength", { length: 64 }).annotate("expect.minLength", { length: 3 }).$type).optional().$type).$type).item(defineAnnotatedType("object").prop("appearance", defineAnnotatedType("union").item(defineAnnotatedType().designType("string").value("system").$type).item(defineAnnotatedType().designType("string").value("light").$type).item(defineAnnotatedType().designType("string").value("dark").$type).optional().$type).prop("language", defineAnnotatedType().designType("string").tags("string").annotate("expect.maxLength", { length: 5 }).annotate("expect.minLength", { length: 2 }).optional().$type).prop("timezone", defineAnnotatedType().designType("string").tags("string").annotate("expect.maxLength", { length: 64 }).annotate("expect.minLength", { length: 3 }).optional().$type).prop("density", defineAnnotatedType("union").item(defineAnnotatedType().designType("string").value("compact").$type).item(defineAnnotatedType().designType("string").value("cozy").$type).item(defineAnnotatedType().designType("string").value("comfortable").$type).optional().$type).prop("dateFormat", defineAnnotatedType("union").item(defineAnnotatedType().designType("string").value("iso").$type).item(defineAnnotatedType().designType("string").value("us").$type).item(defineAnnotatedType().designType("string").value("eu").$type).optional().$type).prop("firstDayOfWeek", defineAnnotatedType("union").item(defineAnnotatedType().designType("number").value(0).$type).item(defineAnnotatedType().designType("number").value(1).$type).item(defineAnnotatedType().designType("number").value(6).$type).optional().$type).prop("customJson", defineAnnotatedType().designType("string").tags("string").annotate("expect.maxLength", { length: 1024 }).optional().$type).$type).annotate("db.json", true).$type).prop("createdAt", defineAnnotatedType().designType("number").tags("number").annotate("db.default.now", true).$type).prop("updatedAt", defineAnnotatedType().designType("number").tags("number").annotate("db.default.now", true).$type).annotate("db.table", "as_presets");
|
|
55
|
-
//#endregion
|
|
56
|
-
export { AsCapabilitiesQuery as n, AsPresetEntry as t };
|