@aglyn/aglyn 1.0.0-beta.268 → 1.0.0-beta.270
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/package.json +11 -11
- package/src/lib/app-utils/account-preferences.d.ts +248 -0
- package/src/lib/app-utils/account-preferences.js +434 -0
- package/src/lib/app-utils/account-preferences.js.map +1 -0
- package/src/lib/app-utils/country-options.d.ts +27 -0
- package/src/lib/app-utils/country-options.js +96 -0
- package/src/lib/app-utils/country-options.js.map +1 -0
- package/src/lib/app-utils/docs-help.generated.d.ts +6 -0
- package/src/lib/app-utils/docs-help.generated.js +13 -0
- package/src/lib/app-utils/docs-help.generated.js.map +1 -1
- package/src/lib/app-utils/docs-index.generated.js +17 -10
- package/src/lib/app-utils/docs-index.generated.js.map +1 -1
- package/src/lib/app-utils/element-motion.d.ts +14 -2
- package/src/lib/app-utils/element-motion.js +33 -13
- package/src/lib/app-utils/element-motion.js.map +1 -1
- package/src/lib/app-utils/mobile-push.d.ts +8 -0
- package/src/lib/app-utils/mobile-push.js +4 -1
- package/src/lib/app-utils/mobile-push.js.map +1 -1
- package/src/lib/app-utils/native-app-association.d.ts +3 -2
- package/src/lib/app-utils/native-app-association.js +4 -2
- package/src/lib/app-utils/native-app-association.js.map +1 -1
- package/src/lib/app-utils/native-nav.d.ts +265 -0
- package/src/lib/app-utils/native-nav.js +741 -0
- package/src/lib/app-utils/native-nav.js.map +1 -0
- package/src/lib/app-utils/native-themes.d.ts +249 -0
- package/src/lib/app-utils/native-themes.js +732 -0
- package/src/lib/app-utils/native-themes.js.map +1 -0
- package/src/lib/app-utils/notifications.d.ts +1 -1
- package/src/lib/app-utils/notifications.js +10 -0
- package/src/lib/app-utils/notifications.js.map +1 -1
- package/src/lib/app-utils/one-box-search.d.ts +108 -0
- package/src/lib/app-utils/one-box-search.js +167 -0
- package/src/lib/app-utils/one-box-search.js.map +1 -0
- package/src/lib/app-utils/org-permissions.js +10 -61
- package/src/lib/app-utils/org-permissions.js.map +1 -1
- package/src/lib/app-utils/org-role-grants.d.ts +95 -0
- package/src/lib/app-utils/org-role-grants.js +193 -0
- package/src/lib/app-utils/org-role-grants.js.map +1 -0
- package/src/lib/app-utils/plan-entitlements.d.ts +41 -1
- package/src/lib/app-utils/plan-entitlements.js +65 -3
- package/src/lib/app-utils/plan-entitlements.js.map +1 -1
- package/src/lib/app-utils/tenant-dns-targets.d.ts +62 -0
- package/src/lib/app-utils/tenant-dns-targets.js +80 -0
- package/src/lib/app-utils/tenant-dns-targets.js.map +1 -0
- package/src/lib/foundation/definitions/org-billing.types.d.ts +14 -0
- package/src/lib/foundation/definitions/org-billing.types.js.map +1 -1
- package/src/lib/foundation/definitions/platform.types.d.ts +9 -0
- package/src/lib/foundation/definitions/platform.types.js.map +1 -1
- package/src/lib/plugin-manager/feature-plugins.d.ts +38 -0
- package/src/lib/plugin-manager/feature-plugins.js +20 -0
- package/src/lib/plugin-manager/feature-plugins.js.map +1 -1
- package/src/lib/plugin-manager/first-party-plugins.generated.js +22 -1
- package/src/lib/plugin-manager/first-party-plugins.generated.js.map +1 -1
- package/src/lib/plugin-manager/operator-alerts.js +10 -1
- package/src/lib/plugin-manager/operator-alerts.js.map +1 -1
- package/src/lib/plugin-manager/plugin-config.js +10 -1
- package/src/lib/plugin-manager/plugin-config.js.map +1 -1
- package/src/lib/plugin-manager/plugin-consent-group-change.js +11 -2
- package/src/lib/plugin-manager/plugin-consent-group-change.js.map +1 -1
- package/src/lib/plugin-manager/plugin-console-crons.js +10 -1
- package/src/lib/plugin-manager/plugin-console-crons.js.map +1 -1
- package/src/lib/plugin-manager/plugin-domain-events.d.ts +4 -3
- package/src/lib/plugin-manager/plugin-domain-events.js.map +1 -1
- package/src/lib/plugin-manager/plugin-events.js +11 -2
- package/src/lib/plugin-manager/plugin-events.js.map +1 -1
- package/src/lib/plugin-manager/plugin-lead-conversion.js +10 -1
- package/src/lib/plugin-manager/plugin-lead-conversion.js.map +1 -1
- package/src/lib/plugin-manager/plugin-media-ingest.d.ts +25 -0
- package/src/lib/plugin-manager/plugin-media-ingest.js.map +1 -1
- package/src/lib/plugin-manager/plugin-membership-detach.js +10 -1
- package/src/lib/plugin-manager/plugin-membership-detach.js.map +1 -1
- package/src/lib/plugin-manager/plugin-person-matches.js +10 -1
- package/src/lib/plugin-manager/plugin-person-matches.js.map +1 -1
- package/src/lib/plugin-manager/plugin-search-sources.d.ts +85 -0
- package/src/lib/plugin-manager/plugin-search-sources.js +91 -0
- package/src/lib/plugin-manager/plugin-search-sources.js.map +1 -0
- package/src/lib/plugin-manager/plugin-services.js +6 -0
- package/src/lib/plugin-manager/plugin-services.js.map +1 -1
- package/src/lib/plugin-manager/plugin-usage-meters.js +10 -1
- package/src/lib/plugin-manager/plugin-usage-meters.js.map +1 -1
- package/src/lib/plugin-manager/usage-alert-contributors.js +10 -1
- package/src/lib/plugin-manager/usage-alert-contributors.js.map +1 -1
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Aglyn LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* THE NATIVE APPS' NAVIGATION, AS DATA (AGL-3943).
|
|
19
|
+
*
|
|
20
|
+
* One manifest both shells draw (docs/mobile/native-navigation.md): the
|
|
21
|
+
* sidebar for the whole workspace, the sidebar inside one site, and the two
|
|
22
|
+
* settings modes (the workspace's, and the site's, which merges the
|
|
23
|
+
* console's Setup and Admin). Zach chose the site's groups on 2026-10-18:
|
|
24
|
+
* an Overview row, Starred, Website, Sell, Customers, More, Site settings.
|
|
25
|
+
*
|
|
26
|
+
* Every row names:
|
|
27
|
+
* - the console's word for it (`label`), held to the console by
|
|
28
|
+
* `apps/console/specs/native-nav-manifest.spec.ts`, which reads the
|
|
29
|
+
* console's own tabs, sections and plugin declarations;
|
|
30
|
+
* - one icon per idea, an SF Symbol and a Material Symbol;
|
|
31
|
+
* - the native screen it opens (a plugin's declared screen, a core screen
|
|
32
|
+
* spec, a site platform screen or a `shell.*` destination);
|
|
33
|
+
* - the plugin it belongs to, so it hides when that plugin is off for the
|
|
34
|
+
* workspace or the site.
|
|
35
|
+
*
|
|
36
|
+
* The core's own rows (Home, Overview, Sites, Pages, Media, the settings
|
|
37
|
+
* modes) are here; a plugin's rows are its own, in
|
|
38
|
+
* `libs/plugins/<plugin>/src/lib/native-nav.ts` (`NATIVE_NAV_ROWS`), placed
|
|
39
|
+
* into a list's group by `order` (docs/PACKAGES.md rule 3: the core never
|
|
40
|
+
* names a plugin). `generate:native-contracts` assembles the two
|
|
41
|
+
* (`assembleNativeNav`) into the manifest the apps read,
|
|
42
|
+
* `ContractValues.nativeNavManifest`.
|
|
43
|
+
*
|
|
44
|
+
* NO IMPORTS, on purpose: the native apps read this through the generated
|
|
45
|
+
* contracts, so it must stay a plain module.
|
|
46
|
+
*/
|
|
47
|
+
/** A list the shells draw. */
|
|
48
|
+
export type NativeNavListId = 'workspace' | 'site' | 'workspaceSettings' | 'siteSettings';
|
|
49
|
+
/** One icon per idea: the same row draws the same picture in both scopes. */
|
|
50
|
+
export interface NativeNavIcon {
|
|
51
|
+
/** An SF Symbol name. */
|
|
52
|
+
apple: string;
|
|
53
|
+
/** A Material Symbol name, as `AglynIcons.named` takes it. */
|
|
54
|
+
android: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Where a row's console twin lives:
|
|
58
|
+
* - `orgTab` / `hostTab`: a console tab, by its id (`org-nav-tabs.ts`,
|
|
59
|
+
* `host-nav-tabs.ts`);
|
|
60
|
+
* - `orgPluginTab` / `hostPluginTab`: a plugin's `orgNavItems` / `navItems`
|
|
61
|
+
* entry, by its href;
|
|
62
|
+
* - `orgPluginSection` / `hostPluginSection`: a section of a plugin's hub, as
|
|
63
|
+
* `{href}/{sectionId}`;
|
|
64
|
+
* - `setupSection`: a site's Setup section, by its id (`setup-sections.ts`);
|
|
65
|
+
* - `hostAdminSection`, `orgSettingsSection`, `teamSection`,
|
|
66
|
+
* `billingSection`: a section of those hubs, by its `Route` name;
|
|
67
|
+
* - `consoleWidget`: a plugin's card, as `{slot}/{widgetId}`;
|
|
68
|
+
* - `shell`: a place the app's shell owns (Home, Overview's page, the
|
|
69
|
+
* settings modes), whose console twin is the page named in `id`;
|
|
70
|
+
* - `nativeOnly`: a native screen the console has no page for.
|
|
71
|
+
*/
|
|
72
|
+
export type NativeNavConsoleSurface = 'orgTab' | 'hostTab' | 'orgPluginTab' | 'hostPluginTab' | 'orgPluginSection' | 'hostPluginSection' | 'setupSection' | 'hostAdminSection' | 'orgSettingsSection' | 'teamSection' | 'billingSection' | 'consoleWidget' | 'shell' | 'nativeOnly';
|
|
73
|
+
export interface NativeNavConsoleRef {
|
|
74
|
+
surface: NativeNavConsoleSurface;
|
|
75
|
+
id: string;
|
|
76
|
+
}
|
|
77
|
+
/** A section inside a row's area, as the console's section rail lists it. */
|
|
78
|
+
export interface NativeNavSection {
|
|
79
|
+
id: string;
|
|
80
|
+
label: string;
|
|
81
|
+
screen: string;
|
|
82
|
+
params?: Record<string, string>;
|
|
83
|
+
/** Set only when the section belongs to another plugin than its row's. */
|
|
84
|
+
pluginId?: string;
|
|
85
|
+
/** The help docs page for it; its row's, unless the console names its own. */
|
|
86
|
+
docs?: string;
|
|
87
|
+
console: NativeNavConsoleRef;
|
|
88
|
+
}
|
|
89
|
+
/** An action the area offers from its title bar (Scan stock, New product). */
|
|
90
|
+
export interface NativeNavAction {
|
|
91
|
+
id: string;
|
|
92
|
+
label: string;
|
|
93
|
+
icon: NativeNavIcon;
|
|
94
|
+
screen: string;
|
|
95
|
+
params?: Record<string, string>;
|
|
96
|
+
}
|
|
97
|
+
export interface NativeNavRow {
|
|
98
|
+
/** The idea's id: the same in every list that shows it (`media`). */
|
|
99
|
+
id: string;
|
|
100
|
+
/** The console's word. */
|
|
101
|
+
label: string;
|
|
102
|
+
/**
|
|
103
|
+
* The console's word when the native label is a decision of its own
|
|
104
|
+
* (Overview for the site's analytics, Zach 2026-10-18).
|
|
105
|
+
*/
|
|
106
|
+
consoleLabel?: string;
|
|
107
|
+
icon: NativeNavIcon;
|
|
108
|
+
/** The native screen the row opens. */
|
|
109
|
+
screen: string;
|
|
110
|
+
params?: Record<string, string>;
|
|
111
|
+
/** The plugin the row belongs to: off for the workspace or site, the row hides. */
|
|
112
|
+
pluginId?: string;
|
|
113
|
+
/** Only a site admin sees the row, as only they see the console's Admin tab. */
|
|
114
|
+
requiresHostAdmin?: boolean;
|
|
115
|
+
/** A settings row's one line, in the words the screens already use. */
|
|
116
|
+
description?: string;
|
|
117
|
+
/** Search words besides the label, so typing "billing" finds Plan. */
|
|
118
|
+
keywords?: string[];
|
|
119
|
+
/** Where the row sits in its group, ascending; a plugin's row is placed by it. */
|
|
120
|
+
order?: number;
|
|
121
|
+
/**
|
|
122
|
+
* The help docs page for the place, as the console's own help names it
|
|
123
|
+
* (its `docsTopic` and `docsAnchor`, or the page's `help` prop): a docs-site
|
|
124
|
+
* path with its anchor, e.g. `/content-and-data/crm/overview#at-the-organization-level`.
|
|
125
|
+
* The apps open it in the in-app browser, on the docs origin.
|
|
126
|
+
*/
|
|
127
|
+
docs?: string;
|
|
128
|
+
sections?: NativeNavSection[];
|
|
129
|
+
actions?: NativeNavAction[];
|
|
130
|
+
console: NativeNavConsoleRef;
|
|
131
|
+
}
|
|
132
|
+
export interface NativeNavGroup {
|
|
133
|
+
id: string;
|
|
134
|
+
/** The heading; absent for a group drawn without one. */
|
|
135
|
+
label?: string;
|
|
136
|
+
/** Folded at rest unless it holds the screen in use, remembered per device. */
|
|
137
|
+
foldable: boolean;
|
|
138
|
+
/** `starred`: the person's starred items for this scope, drawn by the shell. */
|
|
139
|
+
dynamic?: 'starred';
|
|
140
|
+
rows: NativeNavRow[];
|
|
141
|
+
}
|
|
142
|
+
export interface NativeNavList {
|
|
143
|
+
id: NativeNavListId;
|
|
144
|
+
/** The settings mode's title, after its owner's name ("Juniper Street Co. settings"). */
|
|
145
|
+
title?: string;
|
|
146
|
+
groups: NativeNavGroup[];
|
|
147
|
+
}
|
|
148
|
+
/** A console place no row holds, and where the apps put it instead. */
|
|
149
|
+
export interface NativeNavElsewhere {
|
|
150
|
+
console: NativeNavConsoleRef;
|
|
151
|
+
where: string;
|
|
152
|
+
}
|
|
153
|
+
/** A plugin's row, and the list and group it goes in. */
|
|
154
|
+
export interface NativeNavContribution {
|
|
155
|
+
list: NativeNavListId;
|
|
156
|
+
/** A group of that list, by id. */
|
|
157
|
+
group: string;
|
|
158
|
+
row: NativeNavRow;
|
|
159
|
+
}
|
|
160
|
+
/** Where the Create new menu is offered: the whole workspace, or one site. */
|
|
161
|
+
export type NativeNavCreateScope = 'workspace' | 'site';
|
|
162
|
+
/**
|
|
163
|
+
* One item of the Create new menu ("+" on the rail, the center tab on
|
|
164
|
+
* phones): what the console offers to create from that scope, opening the
|
|
165
|
+
* area's own create form.
|
|
166
|
+
*/
|
|
167
|
+
export interface NativeNavCreateItem {
|
|
168
|
+
id: string;
|
|
169
|
+
/** The thing made, in the console's words ("Draft order", "Service"). */
|
|
170
|
+
label: string;
|
|
171
|
+
icon: NativeNavIcon;
|
|
172
|
+
/** The native screen the item opens, with `params` that open its create form. */
|
|
173
|
+
screen: string;
|
|
174
|
+
params?: Record<string, string>;
|
|
175
|
+
/** The plugin it belongs to: off for the workspace or site, the item is not offered. */
|
|
176
|
+
pluginId?: string;
|
|
177
|
+
/** Only a site admin is offered it. */
|
|
178
|
+
requiresHostAdmin?: boolean;
|
|
179
|
+
/** The workspace permission the console's create action asks for (`hosts.create`, `data.manage`). */
|
|
180
|
+
permission?: string;
|
|
181
|
+
/** The site roles that may make it, as the rules hold them (`canWriteHostContent`). */
|
|
182
|
+
hostRoles?: string[];
|
|
183
|
+
/** The plan feature it needs; without it the item is shown blocked, with `blockedReason`. */
|
|
184
|
+
planFeature?: string;
|
|
185
|
+
/** Why it is blocked when the plan lacks `planFeature`; the default reason otherwise. */
|
|
186
|
+
blockedReason?: string;
|
|
187
|
+
/** Where it sits in the menu, ascending. */
|
|
188
|
+
order?: number;
|
|
189
|
+
/** Where the console offers the same create action. */
|
|
190
|
+
console: NativeNavConsoleRef;
|
|
191
|
+
}
|
|
192
|
+
/** One scope's Create new menu. */
|
|
193
|
+
export interface NativeNavCreateList {
|
|
194
|
+
scope: NativeNavCreateScope;
|
|
195
|
+
items: NativeNavCreateItem[];
|
|
196
|
+
}
|
|
197
|
+
/** A plugin's Create new item, and the scope that offers it. */
|
|
198
|
+
export interface NativeNavCreateContribution {
|
|
199
|
+
scope: NativeNavCreateScope;
|
|
200
|
+
item: NativeNavCreateItem;
|
|
201
|
+
}
|
|
202
|
+
export interface NativeNavManifest {
|
|
203
|
+
lists: NativeNavList[];
|
|
204
|
+
/** The Create new menu per scope (AGL-3943). */
|
|
205
|
+
create?: NativeNavCreateList[];
|
|
206
|
+
/** Destinations the shells own, which no plugin registers. */
|
|
207
|
+
shellScreens: string[];
|
|
208
|
+
elsewhere: NativeNavElsewhere[];
|
|
209
|
+
}
|
|
210
|
+
/** The shells' own destinations. */
|
|
211
|
+
export declare const NATIVE_NAV_SHELL_SCREENS: readonly string[];
|
|
212
|
+
/** An icon pair, for the rows here and in the plugins. */
|
|
213
|
+
export declare const nativeNavIcon: (apple: string, android: string) => NativeNavIcon;
|
|
214
|
+
/** A console reference, for the rows here and in the plugins. */
|
|
215
|
+
export declare const nativeNavRef: (surface: NativeNavConsoleSurface, id: string) => NativeNavConsoleRef;
|
|
216
|
+
/** A section of a plugin hub, at the scope its row stands in. */
|
|
217
|
+
export declare function nativeNavHubSection(scope: 'org' | 'host', href: string, id: string, label: string, screen: string, extra?: Partial<Pick<NativeNavSection, 'params' | 'pluginId'>>): NativeNavSection;
|
|
218
|
+
/**
|
|
219
|
+
* The core's half of the manifest: every list and group, and the core's own
|
|
220
|
+
* rows. The manifest the apps read (`ContractValues.nativeNavManifest`) is
|
|
221
|
+
* this with each plugin's `NATIVE_NAV_ROWS` placed by `assembleNativeNav`.
|
|
222
|
+
*/
|
|
223
|
+
export declare const NATIVE_NAV_MANIFEST: NativeNavManifest;
|
|
224
|
+
/**
|
|
225
|
+
* The manifest with the plugins' rows placed: each into its list's group by
|
|
226
|
+
* `order` (a tie keeps the core's row first, then registration order). A row
|
|
227
|
+
* naming a list or group the core does not have is refused by name, so a
|
|
228
|
+
* plugin cannot quietly invent a group.
|
|
229
|
+
*/
|
|
230
|
+
export declare function assembleNativeNav(core: NativeNavManifest, contributions: readonly NativeNavContribution[], elsewhere?: readonly NativeNavElsewhere[], creates?: readonly NativeNavCreateContribution[]): NativeNavManifest;
|
|
231
|
+
/** What a Create new item that cannot be used says, when its own reason does not apply. */
|
|
232
|
+
export declare const NATIVE_CREATE_PERMISSION_REASON = "Your role can't create this here. Ask an owner or admin of the workspace.";
|
|
233
|
+
export declare const NATIVE_CREATE_SITE_ROLE_REASON = "Your role on this site can't create this. Ask a site admin.";
|
|
234
|
+
export declare const NATIVE_CREATE_PLAN_REASON = "Your plan doesn't include this. See the plans in Billing.";
|
|
235
|
+
/** A Create new item as one scope offers it. */
|
|
236
|
+
export interface ResolvedCreateItem extends NativeNavCreateItem {
|
|
237
|
+
/** Shown, but disabled with `reason`: a prerequisite stands between the person and it. */
|
|
238
|
+
blocked: boolean;
|
|
239
|
+
reason?: string;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* The Create new menu for the workspace or site in hand. An item of a plugin
|
|
243
|
+
* that is off is not offered, nor an admin-only item to a non-admin. One the
|
|
244
|
+
* person may not use is SHOWN, disabled with its reason (prerequisites are
|
|
245
|
+
* shown, never hidden): a permission or site role they lack, then a plan
|
|
246
|
+
* feature the workspace lacks. `permissions` and `features` are the
|
|
247
|
+
* workspace's resolved answers (an absent key is not held); `hostRole` is
|
|
248
|
+
* the person's role on the site, null at the workspace.
|
|
249
|
+
*/
|
|
250
|
+
export declare function resolveCreateList(manifest: NativeNavManifest, scope: NativeNavCreateScope, enabledPluginIds: readonly string[], permissions: Readonly<Record<string, boolean>>, features: Readonly<Record<string, boolean>>, hostRole: string | null): ResolvedCreateItem[];
|
|
251
|
+
/** A list as one scope shows it: rows for plugins that are off, or admin rows for a non-admin, left out. */
|
|
252
|
+
export interface ResolvedNavList {
|
|
253
|
+
id: NativeNavListId;
|
|
254
|
+
title?: string;
|
|
255
|
+
groups: NativeNavGroup[];
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* One list for the workspace or site in hand, from the assembled manifest
|
|
259
|
+
* (`ContractValues.nativeNavManifest`). `enabledPluginIds` is the site's
|
|
260
|
+
* effective set (`resolveHostEnabledPlugins`) in site scope and the
|
|
261
|
+
* workspace's (`resolveEnabledPlugins`) otherwise. A section of another
|
|
262
|
+
* plugin than its row's hides with that plugin. A group left with no rows is
|
|
263
|
+
* dropped, except the starred group, which the shell fills.
|
|
264
|
+
*/
|
|
265
|
+
export declare function resolveNavList(manifest: NativeNavManifest, listId: NativeNavListId, enabledPluginIds: readonly string[], hostAdmin: boolean): ResolvedNavList;
|