@masterteam/client-components 0.0.114 → 0.0.115
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/README.md +45 -1
- package/fesm2022/masterteam-client-components-client-list.mjs +1 -1
- package/fesm2022/masterteam-client-components-client-list.mjs.map +1 -1
- package/fesm2022/masterteam-client-components-studio.mjs +147 -22
- package/fesm2022/masterteam-client-components-studio.mjs.map +1 -1
- package/package.json +5 -5
- package/types/masterteam-client-components-studio.d.ts +69 -3
package/README.md
CHANGED
|
@@ -52,10 +52,54 @@ export default class LevelStudioPage { … }
|
|
|
52
52
|
| Member | Type | Notes |
|
|
53
53
|
| --- | --- | --- |
|
|
54
54
|
| `context` (required) | `ClientStudioContext \| string` | A string is shorthand for `{ contextKey }`. |
|
|
55
|
-
| `options` | `ClientStudioOptions` | `showConnections` (default `false`), `title` (grid label, chart context and export name; defaults to the schema name), `chartStore` (`'server'`, the default, or `'local'`; see *Charts*). |
|
|
55
|
+
| `options` | `ClientStudioOptions` | `showConnections` (default `false`), `title` (grid label, chart context and export name; defaults to the schema name), `chartStore` (`'server'`, the default, or `'local'`; see *Charts*), `recordOpen` (default `false`; see *Host events*). |
|
|
56
56
|
| `height` | `number \| 'fill'` | `'fill'` (default) fills the window below the Studio's top, minus 24px, at least 400px, and follows resizes. |
|
|
57
57
|
| `loaded` | `void` | The first records load of a context finished. A new context (key, filters, schema or `key`) announces again. |
|
|
58
58
|
| `errored` | `{ message }` | The catalog or the records failed; `message` is the text the section shows ("Unable to load this section."). |
|
|
59
|
+
| `recordOpen` | `ClientStudioRecordOpen` | The user chose **Open record** on a row. Only offered while `options.recordOpen` is `true`; see *Host events*. |
|
|
60
|
+
| `dataLoaded` | `ClientStudioDataLoaded` | The root records load finished; see *Host events*. |
|
|
61
|
+
|
|
62
|
+
### Host events
|
|
63
|
+
|
|
64
|
+
Both outputs are opt-in and additive: a host that ignores them sees no change.
|
|
65
|
+
|
|
66
|
+
**`recordOpen`.** With `options: { recordOpen: true }` every grid (root,
|
|
67
|
+
module and connected-level rows) gets an **Open record** item in its row
|
|
68
|
+
context menu. It leads the menu, above the clipboard, export and chart items
|
|
69
|
+
(through `mt-standard-grid`'s `rowMenuLeadItems`); Compare stays at the end.
|
|
70
|
+
Choosing it emits `{ recordId, schemaId, name, owner }`. `name` is the title the
|
|
71
|
+
grid shows: the record's name, or for a module row (whose record usually has
|
|
72
|
+
no name) the value of the module's `Name` property; empty only when neither
|
|
73
|
+
exists. A plain click still only expands the
|
|
74
|
+
detail row; opening is the host's decision (navigate, drawer, …). The host
|
|
75
|
+
tells the rows apart like this:
|
|
76
|
+
|
|
77
|
+
| Row | `schemaId` | `owner` |
|
|
78
|
+
| --- | --- | --- |
|
|
79
|
+
| Root record | the Studio's schema | `null` |
|
|
80
|
+
| Connected-level record | the connected schema | `null` |
|
|
81
|
+
| Module row | the owning record's schema | the owning record (`recordId`, `levelId`, `moduleId`, `contextKey`); `recordId` is the module row's own id |
|
|
82
|
+
|
|
83
|
+
**`dataLoaded`.** Emitted for each completed **root** records load (the first
|
|
84
|
+
load, a reload, a context or `key` change, a changed locale or column set;
|
|
85
|
+
cache hits do not repeat it). Module, connected-level and cross-record reads
|
|
86
|
+
never emit. The payload is a pass-through of what the root `fetch/query`
|
|
87
|
+
returned, so Studio stays free of any one schema's semantics:
|
|
88
|
+
|
|
89
|
+
- `schemas`: the first page's `schemas`, as received. A KPI schema carries
|
|
90
|
+
`statuses` and `updateStatuses` with their counts; a schema without status
|
|
91
|
+
tracking has neither key. Absent keys mean "not tracked", not zero.
|
|
92
|
+
- `records`: every page's records in query order, **without `values`**. Other
|
|
93
|
+
top-level fields the backend sends (`updateStatus`, `paceStatus`, …) pass
|
|
94
|
+
through; a field the backend omitted for a record is absent on it.
|
|
95
|
+
- `totalCount`, plus `contextKey`, `key` and `schemaId`: the context the load
|
|
96
|
+
was requested for. Studio drops a load a later context change replaced; a
|
|
97
|
+
host that keeps its own copy should still compare these tags.
|
|
98
|
+
- An empty root emits too (`records: []`, `totalCount: 0`).
|
|
99
|
+
|
|
100
|
+
Studio loads the whole root dataset and filters and sorts it in the browser,
|
|
101
|
+
so the `statuses` counts are server totals for the context's `filters`, not
|
|
102
|
+
for filters the user applies inside the grid.
|
|
59
103
|
|
|
60
104
|
### Context grammar
|
|
61
105
|
|
|
@@ -1841,7 +1841,7 @@ class ClientListTableView {
|
|
|
1841
1841
|
};
|
|
1842
1842
|
}
|
|
1843
1843
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ClientListTableView, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1844
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ClientListTableView, isStandalone: true, selector: "mt-client-list-table-view", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: true, transformFunction: null }, rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null }, actionShape: { classPropertyName: "actionShape", publicName: "actionShape", isSignal: true, isRequired: false, transformFunction: null }, rowActionsLoadingFn: { classPropertyName: "rowActionsLoadingFn", publicName: "rowActionsLoadingFn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nativeGridReady: "nativeGridReady", lazyLoad: "lazyLoad", rowClick: "rowClick", rowActionsRequested: "rowActionsRequested" }, ngImport: i0, template: "<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\n @if (table().config.contentStart) {\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.startSpan)\">\n <ng-container\n [ngTemplateOutlet]=\"table().config.contentStart\"\n [ngTemplateOutletContext]=\"templateContext(table())\"\n />\n </div>\n }\n\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.tableSpan)\">\n @if (table().error) {\n <div\n class=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\n >\n {{ table().error }}\n </div>\n } @else {\n @if (table().config.toolbarStart || table().config.toolbarEnd) {\n <div class=\"mb-3 flex flex-wrap items-center justify-between gap-3\">\n <ng-container\n [ngTemplateOutlet]=\"table().config.toolbarStart ?? null\"\n [ngTemplateOutletContext]=\"templateContext(table())\"\n />\n <ng-container\n [ngTemplateOutlet]=\"table().config.toolbarEnd ?? null\"\n [ngTemplateOutletContext]=\"templateContext(table())\"\n />\n </div>\n }\n <mt-standard-grid\n [rows]=\"table().rows\"\n [columns]=\"columns()\"\n [rowId]=\"rowId\"\n [label]=\"table().title\"\n [loading]=\"table().loading\"\n [height]=\"520\"\n [search]=\"bucket().filterTerm()\"\n [pageSize]=\"pageSize()\"\n [exportButtons]=\"true\"\n [exportFormats]=\"exportFormats()\"\n [exportName]=\"table().title\"\n [clickableRows]=\"true\"\n [cellClickFilter]=\"true\"\n [chartPersistence]=\"chartPersistence()\"\n (gridReady)=\"onReady($event)\"\n (viewChanged)=\"changed()\"\n (rowClicked)=\"rowClick.emit($event)\"\n />\n }\n </div>\n\n @if (table().config.contentEnd) {\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.endSpan)\">\n <ng-container\n [ngTemplateOutlet]=\"table().config.contentEnd\"\n [ngTemplateOutletContext]=\"templateContext(table())\"\n />\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MtStandardGridComponent, selector: "mt-standard-grid", inputs: ["rows", "columns", "rowId", "label", "loading", "height", "rowHeight", "selection", "exportable", "exportButtons", "exportName", "exportFormats", "exporter", "rowMenuItems", "server", "paged", "pageSize", "clickableRows", "cellClickFilter", "rowClass", "detail", "chartContext", "search", "emptyTitle", "emptyDescription", "view", "chartPersistence"], outputs: ["gridReady", "rowClicked", "selectionChanged", "sortChanged", "filterChanged", "paginationChanged", "rowGroupOpened", "viewChanged", "chartsChanged"] }] });
|
|
1844
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: ClientListTableView, isStandalone: true, selector: "mt-client-list-table-view", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: true, transformFunction: null }, rowActions: { classPropertyName: "rowActions", publicName: "rowActions", isSignal: true, isRequired: false, transformFunction: null }, actionShape: { classPropertyName: "actionShape", publicName: "actionShape", isSignal: true, isRequired: false, transformFunction: null }, rowActionsLoadingFn: { classPropertyName: "rowActionsLoadingFn", publicName: "rowActionsLoadingFn", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nativeGridReady: "nativeGridReady", lazyLoad: "lazyLoad", rowClick: "rowClick", rowActionsRequested: "rowActionsRequested" }, ngImport: i0, template: "<div class=\"grid gap-4\" [style.gridTemplateColumns]=\"gridTemplateColumns\">\n @if (table().config.contentStart) {\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.startSpan)\">\n <ng-container\n [ngTemplateOutlet]=\"table().config.contentStart\"\n [ngTemplateOutletContext]=\"templateContext(table())\"\n />\n </div>\n }\n\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.tableSpan)\">\n @if (table().error) {\n <div\n class=\"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-700\"\n >\n {{ table().error }}\n </div>\n } @else {\n @if (table().config.toolbarStart || table().config.toolbarEnd) {\n <div class=\"mb-3 flex flex-wrap items-center justify-between gap-3\">\n <ng-container\n [ngTemplateOutlet]=\"table().config.toolbarStart ?? null\"\n [ngTemplateOutletContext]=\"templateContext(table())\"\n />\n <ng-container\n [ngTemplateOutlet]=\"table().config.toolbarEnd ?? null\"\n [ngTemplateOutletContext]=\"templateContext(table())\"\n />\n </div>\n }\n <mt-standard-grid\n [rows]=\"table().rows\"\n [columns]=\"columns()\"\n [rowId]=\"rowId\"\n [label]=\"table().title\"\n [loading]=\"table().loading\"\n [height]=\"520\"\n [search]=\"bucket().filterTerm()\"\n [pageSize]=\"pageSize()\"\n [exportButtons]=\"true\"\n [exportFormats]=\"exportFormats()\"\n [exportName]=\"table().title\"\n [clickableRows]=\"true\"\n [cellClickFilter]=\"true\"\n [chartPersistence]=\"chartPersistence()\"\n (gridReady)=\"onReady($event)\"\n (viewChanged)=\"changed()\"\n (rowClicked)=\"rowClick.emit($event)\"\n />\n }\n </div>\n\n @if (table().config.contentEnd) {\n <div [style.gridColumn]=\"slotGridSpan(table().config.layout.endSpan)\">\n <ng-container\n [ngTemplateOutlet]=\"table().config.contentEnd\"\n [ngTemplateOutletContext]=\"templateContext(table())\"\n />\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: MtStandardGridComponent, selector: "mt-standard-grid", inputs: ["rows", "columns", "rowId", "label", "loading", "height", "rowHeight", "selection", "exportable", "exportButtons", "exportName", "exportFormats", "exporter", "rowMenuItems", "rowMenuLeadItems", "server", "paged", "pageSize", "clickableRows", "cellClickFilter", "rowClass", "detail", "chartContext", "search", "emptyTitle", "emptyDescription", "view", "chartPersistence"], outputs: ["gridReady", "rowClicked", "selectionChanged", "sortChanged", "filterChanged", "paginationChanged", "rowGroupOpened", "viewChanged", "chartsChanged"] }] });
|
|
1845
1845
|
}
|
|
1846
1846
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ClientListTableView, decorators: [{
|
|
1847
1847
|
type: Component,
|