@tekki-forge/core 0.1.0 → 0.2.0
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/app.d.ts +3 -2
- package/dist/app.js.map +1 -1
- package/dist/dashboard.d.ts +5 -0
- package/dist/dashboard.js.map +1 -1
- package/dist/icons.d.ts +3 -0
- package/dist/icons.js +3 -0
- package/dist/icons.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/app.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AnyField } from "./fields.js";
|
|
2
2
|
import type { DashboardWidget } from "./dashboard.js";
|
|
3
|
+
import type { EntityIcon } from "./icons.js";
|
|
3
4
|
import type { PluginDefinition } from "./plugin.js";
|
|
4
5
|
/**
|
|
5
6
|
* A permission rule lists who may perform an operation. Tokens:
|
|
@@ -113,8 +114,8 @@ export interface EntityDefinition {
|
|
|
113
114
|
storageName?: string;
|
|
114
115
|
/** Field used as the human-readable label of a record. */
|
|
115
116
|
display?: string;
|
|
116
|
-
/**
|
|
117
|
-
icon?:
|
|
117
|
+
/** Icon in navigation: one of ENTITY_ICONS, e.g. "receipt", "users", "truck", "ticket", "building". */
|
|
118
|
+
icon?: EntityIcon;
|
|
118
119
|
/** Show in the sidebar. Default true. */
|
|
119
120
|
nav?: boolean;
|
|
120
121
|
description?: string;
|
package/dist/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AA4DA,MAAM,UAAU,MAAM,CAAC,aAAgD,EAAE;IACvE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,CAAC;AAC9C,CAAC;AAqED,MAAM,UAAU,MAAM,CAAC,UAA6C;IAClE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,CAAC;AAC9C,CAAC;AAiMD,MAAM,UAAU,SAAS,CAAC,UAAyB;IACjD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,UAAU,EAAE,CAAC;AAC3C,CAAC"}
|
package/dist/dashboard.d.ts
CHANGED
|
@@ -10,6 +10,11 @@ interface WidgetBase {
|
|
|
10
10
|
where?: WidgetFilter;
|
|
11
11
|
/** Columns in a 3-column grid. Default 1 (charts: 2, lists: 2). */
|
|
12
12
|
span?: 1 | 2 | 3;
|
|
13
|
+
/**
|
|
14
|
+
* Roles that see this widget, e.g. ["admin"] for revenue only the owner should see. Default: everyone who
|
|
15
|
+
* can read the entity. (The numbers always respect the viewer's permissions on top of this.)
|
|
16
|
+
*/
|
|
17
|
+
visibleTo?: readonly string[];
|
|
13
18
|
}
|
|
14
19
|
export interface MetricWidget extends WidgetBase {
|
|
15
20
|
readonly type: "metric";
|
package/dist/dashboard.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../src/dashboard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../src/dashboard.ts"],"names":[],"mappings":"AA0DA,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAA6B,EAAgB,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;AAClG,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAA4B,EAAe,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;AAC9F,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAA2B,EAAc,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC"}
|
package/dist/icons.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Icons an entity can use in navigation (`icon: "receipt"`); the admin renders them with lucide. */
|
|
2
|
+
export declare const ENTITY_ICONS: readonly ["folder", "users", "user", "briefcase", "building", "file-text", "box", "tag", "layers", "star", "calendar", "credit-card", "mail", "map-pin", "package", "shopping-cart", "ticket", "check-square", "receipt", "wallet", "banknote", "dollar-sign", "chart", "trending-up", "target", "phone", "message-square", "headphones", "life-buoy", "clipboard", "list-todo", "kanban", "flag", "bug", "wrench", "hammer", "truck", "warehouse", "store", "factory", "home", "bed", "car", "plane", "map", "globe", "graduation-cap", "book", "library", "stethoscope", "heart-pulse", "pill", "utensils", "coffee", "shirt", "gift", "camera", "image", "video", "music", "newspaper", "megaphone", "award", "trophy", "shield", "key", "lock", "server", "database", "cpu", "code", "git-branch", "rocket", "zap", "leaf", "sprout", "paw", "dumbbell", "clock", "timer", "bell", "inbox", "archive", "file", "paperclip", "contact", "id-card", "handshake", "scale", "landmark", "calculator", "percent", "boxes", "barcode", "scan", "settings", "sliders", "puzzle", "lightbulb"];
|
|
3
|
+
export type EntityIcon = (typeof ENTITY_ICONS)[number];
|
package/dist/icons.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Icons an entity can use in navigation (`icon: "receipt"`); the admin renders them with lucide. */
|
|
2
|
+
export const ENTITY_ICONS = ["folder", "users", "user", "briefcase", "building", "file-text", "box", "tag", "layers", "star", "calendar", "credit-card", "mail", "map-pin", "package", "shopping-cart", "ticket", "check-square", "receipt", "wallet", "banknote", "dollar-sign", "chart", "trending-up", "target", "phone", "message-square", "headphones", "life-buoy", "clipboard", "list-todo", "kanban", "flag", "bug", "wrench", "hammer", "truck", "warehouse", "store", "factory", "home", "bed", "car", "plane", "map", "globe", "graduation-cap", "book", "library", "stethoscope", "heart-pulse", "pill", "utensils", "coffee", "shirt", "gift", "camera", "image", "video", "music", "newspaper", "megaphone", "award", "trophy", "shield", "key", "lock", "server", "database", "cpu", "code", "git-branch", "rocket", "zap", "leaf", "sprout", "paw", "dumbbell", "clock", "timer", "bell", "inbox", "archive", "file", "paperclip", "contact", "id-card", "handshake", "scale", "landmark", "calculator", "percent", "boxes", "barcode", "scan", "settings", "sliders", "puzzle", "lightbulb"];
|
|
3
|
+
//# sourceMappingURL=icons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../src/icons.ts"],"names":[],"mappings":"AAAA,qGAAqG;AACrG,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,CAAU,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC"}
|