autosolutions-os 0.3.10 → 0.3.12
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/CHANGELOG.md +66 -0
- package/README.md +18 -1
- package/dist/nav.d.ts +58 -0
- package/dist/nav.js +100 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,71 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.12 - 2026-11-04
|
|
4
|
+
|
|
5
|
+
A review of every tab after 0.3.11 found two rows that opened sample pages in
|
|
6
|
+
the Hub, marked " (*)", while Ops Hub already had real pages for them:
|
|
7
|
+
Commercial > Customers and Operations > Customer OTIF. The owner said yes to
|
|
8
|
+
linking both.
|
|
9
|
+
|
|
10
|
+
### autosolutions-os/nav
|
|
11
|
+
|
|
12
|
+
- `OS_TOOL_LINKS["customers"]` is Ops Hub's `/customers` (its New view; At
|
|
13
|
+
risk and Lapsed are views of the same page), and
|
|
14
|
+
`OS_TOOL_LINKS["order-otif"]` is Ops Hub's `/customer-otif` (Order OTIF).
|
|
15
|
+
Like Ops Hub's other rows: linked for someone who holds Ops Hub, locked for
|
|
16
|
+
someone who does not, and the fixed address in `staticLinks()`.
|
|
17
|
+
- Both rows lose the sample mark and get no other: both pages show real
|
|
18
|
+
NetSuite data, and Ops Hub has a page for every view the map gives them
|
|
19
|
+
(Customers: New, At risk, Lapsed; Customer OTIF: Order OTIF). So
|
|
20
|
+
`OS_TOOL_DATA` is unchanged: Retailer sell out (POS) is still the one
|
|
21
|
+
incomplete row.
|
|
22
|
+
- Someone who does not hold Ops Hub sees both rows locked, where they opened
|
|
23
|
+
the Hub's sample pages before, as Ops Hub's other rows are.
|
|
24
|
+
- Unchanged: every id, tab, route and other link.
|
|
25
|
+
- Apps take this release with a lockfile bump. An app whose tests list the
|
|
26
|
+
sample rows, or the rows that open Ops Hub, adds these two. Ops Hub lists
|
|
27
|
+
both as its own tools today (`ADOPTED_TOOLS` in its `ops-nav.ts`): when it
|
|
28
|
+
takes this release it empties that list, since its test asks for exactly
|
|
29
|
+
the rows that open Ops Hub, and the two would count twice.
|
|
30
|
+
|
|
31
|
+
## 0.3.11 - 2026-11-04
|
|
32
|
+
|
|
33
|
+
The owner's three marks, so people can tell which tabs to trust: " (*)" for
|
|
34
|
+
sample data, " (Incomplete)" for real data with parts still missing, and no
|
|
35
|
+
mark for real, complete data.
|
|
36
|
+
|
|
37
|
+
### autosolutions-os/nav
|
|
38
|
+
|
|
39
|
+
- `OsDataStatus` (`"mock" | "incomplete" | "working"`) and `osDataStatus(toolId,
|
|
40
|
+
where, tabId?)`: the status of a tool's page, or of one of its views. By
|
|
41
|
+
default an app's page (`where: "app"`) is `working` and a page in the Hub
|
|
42
|
+
(`where: "hub"`) is `mock`; a tool with an app is always `mock` in the Hub,
|
|
43
|
+
where its page shows no data of its own.
|
|
44
|
+
- `OS_TOOL_DATA`: the one record of the tools whose status is not their
|
|
45
|
+
default, each with what is missing (`missing`) and any view whose status
|
|
46
|
+
differs (`tabs`). Today it has one: Retailer sell out (POS) is
|
|
47
|
+
`incomplete`, since Ops Hub's POS dashboard reads retailers' sales only
|
|
48
|
+
(no retailer stock or ranging data, so Retailer stock cover and Ranging are
|
|
49
|
+
not built).
|
|
50
|
+
- osFrame marks every row that opens a page from it, after the name: a
|
|
51
|
+
`mock` row keeps " (*)" and now has a tooltip (`title`) that says what it
|
|
52
|
+
means; an `incomplete` row gets " (Incomplete)" (`OS_INCOMPLETE_MARK`,
|
|
53
|
+
`osIncompleteLabel()`) and a tooltip that says what is missing; a `working`
|
|
54
|
+
row is as before. A word in the label, not a row badge: in the menu's width
|
|
55
|
+
a badge squeezed "Retailer sell out (POS)" onto four lines. The same in the
|
|
56
|
+
Hub, in an app on the core and in an app off it, for this app's own tools
|
|
57
|
+
too. A locked row and the Hub panel have no mark.
|
|
58
|
+
- `osMarkedLabel(label, status)`: a label with its status's mark, for an
|
|
59
|
+
app's own tabs (the Hub's pages). `OS_MARK_HINTS`: the words for each mark,
|
|
60
|
+
for the tooltips and an app's legend.
|
|
61
|
+
- The menu search matches a row by its name without either mark, as it did
|
|
62
|
+
without " (*)".
|
|
63
|
+
- Unchanged: every id, link, lock, tab and route; `OS_SAMPLE_MARK` and
|
|
64
|
+
`osSampleLabel()`; which rows are samples.
|
|
65
|
+
- Apps take this release with a lockfile bump. An app whose tests compare a
|
|
66
|
+
sample row whole (`toEqual`) adds its new `title`; one that names Retailer
|
|
67
|
+
sell out (POS)'s row by its label sees " (Incomplete)" after it.
|
|
68
|
+
|
|
3
69
|
## 0.3.10 - 2026-10-21
|
|
4
70
|
|
|
5
71
|
The owner removed two menu rows that are not on their sheet.
|
package/README.md
CHANGED
|
@@ -245,10 +245,25 @@ why).
|
|
|
245
245
|
after its name, in every app (0.3.2, `OS_SAMPLE_MARK`): the owner's mark
|
|
246
246
|
for work in progress. A row that opens an app has none, so a tool loses it
|
|
247
247
|
the day it gets one.
|
|
248
|
+
- Every row that opens a page carries the mark of that page's data (0.3.11,
|
|
249
|
+
`osDataStatus()`), so people can tell which numbers to trust: " (*)" after
|
|
250
|
+
the name for sample data (`mock`), " (Incomplete)" in its place for real
|
|
251
|
+
data with parts still missing (`incomplete`, `OS_INCOMPLETE_MARK`), and no
|
|
252
|
+
mark for real, complete data (`working`). The row's tooltip says what its
|
|
253
|
+
mark means (`OS_MARK_HINTS`), and for an incomplete one what is missing. By
|
|
254
|
+
default an app's page is `working` and a page in the Hub `mock`;
|
|
255
|
+
`OS_TOOL_DATA` is the one record of the tools (and views) whose status is
|
|
256
|
+
not their default (today: Retailer sell out (POS), whose dashboard reads
|
|
257
|
+
retailers' sales only). A locked row and the Hub panel have no mark. The Hub
|
|
258
|
+
marks its pages' tabs from the same record (`osMarkedLabel()`).
|
|
248
259
|
- Operations' Overview is Ops Hub's home dashboard (0.3.3): it opens Ops Hub
|
|
249
260
|
for someone who holds it, and is locked for someone who does not, like
|
|
250
261
|
Ops Hub's tools. In the Hub a locked row's page files under its function,
|
|
251
262
|
with no row picked.
|
|
263
|
+
- Three rows the map marks In progress open Ops Hub's real pages the same
|
|
264
|
+
way: Commercial > Retailer sell out (POS) its POS dashboard (0.3.6), and
|
|
265
|
+
Commercial > Customers and Operations > Customer OTIF its Customers and
|
|
266
|
+
Order OTIF pages (0.3.12).
|
|
252
267
|
- Admin appears when `my_admin_scope()` says the person manages something; pass
|
|
253
268
|
`admin` to decide it yourself.
|
|
254
269
|
- Every app shows the Hub panel (0.3.0, `OS_HUB_MENU`, the design's): Smart
|
|
@@ -292,7 +307,9 @@ const grouped = [...groups, { title: "Setup", items: [osSettingsTab("/b2b-frank/
|
|
|
292
307
|
Supabase: the rail (`OS_FUNCTIONS`), the menu map (`OS_MENU`), the Hub panel
|
|
293
308
|
(`OS_HUB_MENU`), `OS_TOOL_LINKS`, `OS_TOOL_ALIASES` and `osToolId()`,
|
|
294
309
|
`osHubPath()`, `HUB_URL`, `HUB_PATHS`, `HINTS`, `osFooter()`, `staticLinks()`,
|
|
295
|
-
`osSettingsTab()`, `OS_SAMPLE_MARK` and `osSampleLabel()`,
|
|
310
|
+
`osSettingsTab()`, `OS_SAMPLE_MARK` and `osSampleLabel()`, the data marks
|
|
311
|
+
(`OS_TOOL_DATA`, `osDataStatus()`, `OS_INCOMPLETE_MARK`, `osIncompleteLabel()`,
|
|
312
|
+
`osMarkedLabel()`, `OS_MARK_HINTS`), `osMenuEntries()`
|
|
296
313
|
and `searchOsMenu()` (the menu search's data and matching), and `osFrame()`,
|
|
297
314
|
the routing rules the frame runs on. An app on its own
|
|
298
315
|
project (Ops Hub: see "Linked, not federated" in `docs/CONTRACT.md`) pairs it
|
package/dist/nav.d.ts
CHANGED
|
@@ -186,6 +186,14 @@ export type OsToolLink = {
|
|
|
186
186
|
* reaches a menu (catalogueLinks and staticLinks read nothing else), so its
|
|
187
187
|
* catalogue row, which the app switcher still lists for the people who hold
|
|
188
188
|
* it, puts no row in any app's menu.
|
|
189
|
+
*
|
|
190
|
+
* Since 0.3.12 (the owner's yes of 4 November 2026): Commercial > Customers
|
|
191
|
+
* opens Ops Hub's Customers page (/customers: New, At risk and Lapsed, from
|
|
192
|
+
* NetSuite sales) and Operations > Customer OTIF its Order OTIF page
|
|
193
|
+
* (/customer-otif, against NetSuite's ship-by dates), real data, not their
|
|
194
|
+
* sample pages in the Hub. Ops Hub has a page for every view the map gives
|
|
195
|
+
* them, so neither is in OS_TOOL_DATA: no mark. Ops Hub's own menu had them
|
|
196
|
+
* already (its ADOPTED_TOOLS).
|
|
189
197
|
*/
|
|
190
198
|
export declare const OS_TOOL_LINKS: Record<string, OsToolLink>;
|
|
191
199
|
/** The Hub's own pages, for the rail's Hub, Admin and Settings rows in other apps. */
|
|
@@ -218,10 +226,60 @@ export declare const HINTS: {
|
|
|
218
226
|
* an app. A row that opens an app, this app's own tools, a locked row and
|
|
219
227
|
* the Hub panel (the Hub's real pages) have none. The Hub's sample pages put
|
|
220
228
|
* it on their tabs too (`osSampleLabel`), since all their data is mock.
|
|
229
|
+
* Since 0.3.11 the mark follows the row's data status (`osDataStatus`): it
|
|
230
|
+
* is the mark of `mock`, and a marked row's tooltip says what it means.
|
|
221
231
|
*/
|
|
222
232
|
export declare const OS_SAMPLE_MARK = " (*)";
|
|
223
233
|
/** `label` with the sample mark after it, once. */
|
|
224
234
|
export declare function osSampleLabel(label: string): string;
|
|
235
|
+
/**
|
|
236
|
+
* What a row's page shows (0.3.11), so people can tell which numbers to
|
|
237
|
+
* trust: `mock`, sample numbers (" (*)" after the name, `OS_SAMPLE_MARK`);
|
|
238
|
+
* `incomplete`, real data with parts still missing (" (Incomplete)" in the
|
|
239
|
+
* asterisk's place, `OS_INCOMPLETE_MARK`); `working`, real and complete data
|
|
240
|
+
* (no mark).
|
|
241
|
+
*/
|
|
242
|
+
export type OsDataStatus = "mock" | "incomplete" | "working";
|
|
243
|
+
/** A tool whose data status is not its default (0.3.11). */
|
|
244
|
+
export type OsToolData = {
|
|
245
|
+
/** Its page's status: its app's page when the tool has an app, else its page in the Hub. */
|
|
246
|
+
data: OsDataStatus;
|
|
247
|
+
/** For `incomplete`: what is still missing, in plain words. The row's tooltip says it. */
|
|
248
|
+
missing?: string;
|
|
249
|
+
/** A view (tab, by id) whose status is not the tool's. */
|
|
250
|
+
tabs?: Readonly<Record<string, OsDataStatus>>;
|
|
251
|
+
};
|
|
252
|
+
/**
|
|
253
|
+
* The one record of data statuses (0.3.11, the owner's three marks of
|
|
254
|
+
* 4 November 2026). By default a tool with an app shows that app's real data
|
|
255
|
+
* (`working`), and every other tool's page in the Hub is one of the design's
|
|
256
|
+
* sample dashboards (`mock`). A tool is listed only where its default is
|
|
257
|
+
* wrong, and when its data changes, this is the one place to change:
|
|
258
|
+
* osFrame marks every app's menu from it, and the Hub marks its pages and
|
|
259
|
+
* their tabs from it (`osDataStatus`).
|
|
260
|
+
*/
|
|
261
|
+
export declare const OS_TOOL_DATA: Readonly<Record<string, OsToolData>>;
|
|
262
|
+
/**
|
|
263
|
+
* The mark after the name of a row, or a tab, whose real data is not complete
|
|
264
|
+
* yet (0.3.11): the asterisk's place, in words. A word in the row's label
|
|
265
|
+
* rather than a badge at its end, which in the menu's width would squeeze a
|
|
266
|
+
* long name onto four lines.
|
|
267
|
+
*/
|
|
268
|
+
export declare const OS_INCOMPLETE_MARK = " (Incomplete)";
|
|
269
|
+
/** `label` with the incomplete mark after it, once (0.3.11). */
|
|
270
|
+
export declare function osIncompleteLabel(label: string): string;
|
|
271
|
+
/** `label` with the mark its data status calls for (0.3.11): " (*)", " (Incomplete)", or none. */
|
|
272
|
+
export declare function osMarkedLabel(label: string, status: OsDataStatus): string;
|
|
273
|
+
/** What each mark means (0.3.11): a marked row's tooltip, and the words of an app's legend. */
|
|
274
|
+
export declare const OS_MARK_HINTS: Readonly<Record<OsDataStatus, string>>;
|
|
275
|
+
/**
|
|
276
|
+
* The data status of a tool's page, or of one of its views (0.3.11), from
|
|
277
|
+
* `OS_TOOL_DATA`. `where` is the page the person is shown: "app", the tool's
|
|
278
|
+
* app (or this app's own page for it); "hub", its page in the Hub. A tool
|
|
279
|
+
* with an app shows no data of its own in the Hub (its page there only sends
|
|
280
|
+
* people to the app, or says why it cannot), so its Hub page is `mock`.
|
|
281
|
+
*/
|
|
282
|
+
export declare function osDataStatus(toolId: string, where: "app" | "hub", tabId?: string): OsDataStatus;
|
|
225
283
|
/** The Settings tab's id, label and glyph (the rail's own settings glyph), 0.3.2. */
|
|
226
284
|
export declare const OS_SETTINGS_TAB: Readonly<OsNavItem>;
|
|
227
285
|
/**
|
package/dist/nav.js
CHANGED
|
@@ -253,6 +253,14 @@ const opsHub = (path) => ({ app: "ops_hub", url: OPS_HUB, path });
|
|
|
253
253
|
* reaches a menu (catalogueLinks and staticLinks read nothing else), so its
|
|
254
254
|
* catalogue row, which the app switcher still lists for the people who hold
|
|
255
255
|
* it, puts no row in any app's menu.
|
|
256
|
+
*
|
|
257
|
+
* Since 0.3.12 (the owner's yes of 4 November 2026): Commercial > Customers
|
|
258
|
+
* opens Ops Hub's Customers page (/customers: New, At risk and Lapsed, from
|
|
259
|
+
* NetSuite sales) and Operations > Customer OTIF its Order OTIF page
|
|
260
|
+
* (/customer-otif, against NetSuite's ship-by dates), real data, not their
|
|
261
|
+
* sample pages in the Hub. Ops Hub has a page for every view the map gives
|
|
262
|
+
* them, so neither is in OS_TOOL_DATA: no mark. Ops Hub's own menu had them
|
|
263
|
+
* already (its ADOPTED_TOOLS).
|
|
256
264
|
*/
|
|
257
265
|
export const OS_TOOL_LINKS = {
|
|
258
266
|
"live-ecomm-sales": { app: "alive_reporting", url: "https://e-sales.autosolutions.app" },
|
|
@@ -269,6 +277,8 @@ export const OS_TOOL_LINKS = {
|
|
|
269
277
|
"open-orders": opsHub("/customer-orders"),
|
|
270
278
|
/* Ops Hub's POS dashboard (0.3.6). */
|
|
271
279
|
"retailer-sell-out": opsHub("/pos-dashboard"),
|
|
280
|
+
/* Ops Hub's Customers page, on its New view (0.3.12). */
|
|
281
|
+
"customers": opsHub("/customers"),
|
|
272
282
|
"crm": { app: "enxgy_crm", url: "https://e-crm.autosolutions.app" },
|
|
273
283
|
"key-accounts": { app: "key_accounts", url: "https://key-accounts.autosolutions.app" },
|
|
274
284
|
/* Operations' Overview is Ops Hub's home dashboard (owner, 0.3.3). */
|
|
@@ -278,6 +288,8 @@ export const OS_TOOL_LINKS = {
|
|
|
278
288
|
"open-purchase-orders": opsHub("/po-pipeline"),
|
|
279
289
|
"shipment-tracker": opsHub("/shipment-tracker"),
|
|
280
290
|
"inventory-value": opsHub("/inventory-health?view=valuation"),
|
|
291
|
+
/* Ops Hub's Order OTIF page (0.3.12). */
|
|
292
|
+
"order-otif": opsHub("/customer-otif"),
|
|
281
293
|
"action-queue": opsHub("/action-queue"),
|
|
282
294
|
"ordering-tool": opsHub("/ordering"),
|
|
283
295
|
"carton-label-generator": { app: "label_maker", url: "https://label-maker.autosolutions.app" },
|
|
@@ -313,12 +325,89 @@ export const HINTS = {
|
|
|
313
325
|
* an app. A row that opens an app, this app's own tools, a locked row and
|
|
314
326
|
* the Hub panel (the Hub's real pages) have none. The Hub's sample pages put
|
|
315
327
|
* it on their tabs too (`osSampleLabel`), since all their data is mock.
|
|
328
|
+
* Since 0.3.11 the mark follows the row's data status (`osDataStatus`): it
|
|
329
|
+
* is the mark of `mock`, and a marked row's tooltip says what it means.
|
|
316
330
|
*/
|
|
317
331
|
export const OS_SAMPLE_MARK = " (*)";
|
|
318
332
|
/** `label` with the sample mark after it, once. */
|
|
319
333
|
export function osSampleLabel(label) {
|
|
320
334
|
return label.endsWith(OS_SAMPLE_MARK) ? label : `${label}${OS_SAMPLE_MARK}`;
|
|
321
335
|
}
|
|
336
|
+
/**
|
|
337
|
+
* The one record of data statuses (0.3.11, the owner's three marks of
|
|
338
|
+
* 4 November 2026). By default a tool with an app shows that app's real data
|
|
339
|
+
* (`working`), and every other tool's page in the Hub is one of the design's
|
|
340
|
+
* sample dashboards (`mock`). A tool is listed only where its default is
|
|
341
|
+
* wrong, and when its data changes, this is the one place to change:
|
|
342
|
+
* osFrame marks every app's menu from it, and the Hub marks its pages and
|
|
343
|
+
* their tabs from it (`osDataStatus`).
|
|
344
|
+
*/
|
|
345
|
+
export const OS_TOOL_DATA = {
|
|
346
|
+
/* Ops Hub's POS dashboard (0.3.6) reads retailers' sales only: Ops Hub's
|
|
347
|
+
menu shows its other two views locked, not built. */
|
|
348
|
+
"retailer-sell-out": {
|
|
349
|
+
data: "incomplete",
|
|
350
|
+
missing: "Sell in vs sell out only. Retailer stock and ranging data are not in yet, so Retailer stock cover and Ranging are not built.",
|
|
351
|
+
},
|
|
352
|
+
};
|
|
353
|
+
/**
|
|
354
|
+
* The mark after the name of a row, or a tab, whose real data is not complete
|
|
355
|
+
* yet (0.3.11): the asterisk's place, in words. A word in the row's label
|
|
356
|
+
* rather than a badge at its end, which in the menu's width would squeeze a
|
|
357
|
+
* long name onto four lines.
|
|
358
|
+
*/
|
|
359
|
+
export const OS_INCOMPLETE_MARK = " (Incomplete)";
|
|
360
|
+
/** `label` with the incomplete mark after it, once (0.3.11). */
|
|
361
|
+
export function osIncompleteLabel(label) {
|
|
362
|
+
return label.endsWith(OS_INCOMPLETE_MARK) ? label : `${label}${OS_INCOMPLETE_MARK}`;
|
|
363
|
+
}
|
|
364
|
+
/** `label` with the mark its data status calls for (0.3.11): " (*)", " (Incomplete)", or none. */
|
|
365
|
+
export function osMarkedLabel(label, status) {
|
|
366
|
+
if (status === "mock")
|
|
367
|
+
return osSampleLabel(label);
|
|
368
|
+
return status === "incomplete" ? osIncompleteLabel(label) : label;
|
|
369
|
+
}
|
|
370
|
+
/** What each mark means (0.3.11): a marked row's tooltip, and the words of an app's legend. */
|
|
371
|
+
export const OS_MARK_HINTS = {
|
|
372
|
+
mock: "(*) Sample data: not real numbers yet.",
|
|
373
|
+
incomplete: "(Incomplete) Real data, but some parts are still missing.",
|
|
374
|
+
working: "No mark: real data.",
|
|
375
|
+
};
|
|
376
|
+
const hasOwn = (object, key) => Object.prototype.hasOwnProperty.call(object, key);
|
|
377
|
+
/** Whether the tool has an app to open (an `OS_TOOL_LINKS` entry with an app or an address). */
|
|
378
|
+
function hasApp(id) {
|
|
379
|
+
const link = hasOwn(OS_TOOL_LINKS, id) ? OS_TOOL_LINKS[id] : undefined;
|
|
380
|
+
return Boolean(link?.app || link?.url);
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* The data status of a tool's page, or of one of its views (0.3.11), from
|
|
384
|
+
* `OS_TOOL_DATA`. `where` is the page the person is shown: "app", the tool's
|
|
385
|
+
* app (or this app's own page for it); "hub", its page in the Hub. A tool
|
|
386
|
+
* with an app shows no data of its own in the Hub (its page there only sends
|
|
387
|
+
* people to the app, or says why it cannot), so its Hub page is `mock`.
|
|
388
|
+
*/
|
|
389
|
+
export function osDataStatus(toolId, where, tabId) {
|
|
390
|
+
const id = osToolId(toolId);
|
|
391
|
+
if (where === "hub" && hasApp(id))
|
|
392
|
+
return "mock";
|
|
393
|
+
const note = hasOwn(OS_TOOL_DATA, id) ? OS_TOOL_DATA[id] : undefined;
|
|
394
|
+
const status = note?.data ?? (where === "app" ? "working" : "mock");
|
|
395
|
+
const tabs = note?.tabs;
|
|
396
|
+
return tabId !== undefined && tabs && hasOwn(tabs, tabId) ? tabs[tabId] : status;
|
|
397
|
+
}
|
|
398
|
+
/* A row with the mark its page's data status calls for (0.3.11), after its
|
|
399
|
+
name, and a tooltip that says what the mark means: for an incomplete row
|
|
400
|
+
also what is missing. A working row is as it was. */
|
|
401
|
+
function marked(row, id, status) {
|
|
402
|
+
if (status === "working")
|
|
403
|
+
return row;
|
|
404
|
+
const missing = status === "incomplete" && hasOwn(OS_TOOL_DATA, id) ? OS_TOOL_DATA[id].missing : undefined;
|
|
405
|
+
return {
|
|
406
|
+
...row,
|
|
407
|
+
label: osMarkedLabel(row.label, status),
|
|
408
|
+
title: missing ? `${OS_MARK_HINTS[status]} ${missing}` : OS_MARK_HINTS[status],
|
|
409
|
+
};
|
|
410
|
+
}
|
|
322
411
|
/** The Settings tab's id, label and glyph (the rail's own settings glyph), 0.3.2. */
|
|
323
412
|
export const OS_SETTINGS_TAB = { id: "settings", label: "Settings", icon: "settings" };
|
|
324
413
|
/**
|
|
@@ -519,9 +608,12 @@ export function osFrame(options) {
|
|
|
519
608
|
...(group.title ? { title: group.title } : {}),
|
|
520
609
|
items: group.items.map((entry) => {
|
|
521
610
|
const base = { id: entry.id, label: entry.label, icon: entry.icon };
|
|
611
|
+
/* Every row that opens a page carries the mark of that page's data
|
|
612
|
+
(0.3.11): this app's own page or the tool's app, or its page in
|
|
613
|
+
the Hub. A locked row opens nothing, and carries none. */
|
|
522
614
|
const mine = own.get(entry.id);
|
|
523
615
|
if (mine)
|
|
524
|
-
return rowFor(base, mine);
|
|
616
|
+
return marked(rowFor(base, mine), entry.id, osDataStatus(entry.id, "app"));
|
|
525
617
|
/* Its page in the Hub, which in the Hub also places a location there
|
|
526
618
|
on this row when the row itself opens an app. */
|
|
527
619
|
const page = osHubPath(fn, entry.overview ? null : entry.id);
|
|
@@ -529,7 +621,7 @@ export function osFrame(options) {
|
|
|
529
621
|
knows what this person holds. */
|
|
530
622
|
const href = links[entry.id];
|
|
531
623
|
if (href)
|
|
532
|
-
return { ...base, ...(isHub ? { match: [page] } : {}), href };
|
|
624
|
+
return marked({ ...base, ...(isHub ? { match: [page] } : {}), href }, entry.id, osDataStatus(entry.id, "app"));
|
|
533
625
|
const reason = locked[entry.id];
|
|
534
626
|
if (reason) {
|
|
535
627
|
if (isHub)
|
|
@@ -538,8 +630,9 @@ export function osFrame(options) {
|
|
|
538
630
|
}
|
|
539
631
|
/* No app of its own (or one this frame cannot reach: off the core
|
|
540
632
|
with no fixed address, or held and not deployed yet): its page in
|
|
541
|
-
the Hub, a sample, marked so
|
|
542
|
-
|
|
633
|
+
the Hub, a sample unless OS_TOOL_DATA says otherwise, marked so
|
|
634
|
+
(0.3.2, from its data status since 0.3.11). */
|
|
635
|
+
return marked(inHub(base, page), entry.id, osDataStatus(entry.id, "hub"));
|
|
543
636
|
}),
|
|
544
637
|
}));
|
|
545
638
|
}
|
|
@@ -734,8 +827,9 @@ export function searchOsMenu(entries, query, limit = 8) {
|
|
|
734
827
|
const typed = words.join(" ");
|
|
735
828
|
const ranked = [];
|
|
736
829
|
entries.forEach((entry, at) => {
|
|
737
|
-
/*
|
|
738
|
-
const
|
|
830
|
+
/* A data mark, the sample mark or (0.3.11) the incomplete one, is no part of the name. */
|
|
831
|
+
const mark = [OS_SAMPLE_MARK, OS_INCOMPLETE_MARK].find((m) => entry.label.endsWith(m));
|
|
832
|
+
const label = fold(mark ? entry.label.slice(0, -mark.length) : entry.label);
|
|
739
833
|
const all = `${label} ${fold(entry.context)}`;
|
|
740
834
|
if (!words.every((word) => all.includes(word)))
|
|
741
835
|
return;
|
package/package.json
CHANGED