@antelopejs/dms 0.10.0 → 0.11.1
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 +113 -0
- package/dist/config.d.ts +0 -2
- package/dist/config.js +0 -4
- package/dist/config.js.map +1 -1
- package/dist/implementations/dms/frontend-modules.js +17 -6
- package/dist/implementations/dms/frontend-modules.js.map +1 -1
- package/dist/implementations/dms/manifest.d.ts +6 -0
- package/dist/implementations/dms/manifest.js +10 -7
- package/dist/implementations/dms/manifest.js.map +1 -1
- package/dist/implementations/dms/page.js +45 -16
- package/dist/implementations/dms/page.js.map +1 -1
- package/dist/index.js +4 -7
- package/dist/index.js.map +1 -1
- package/dist/store/listing.js +1 -2
- package/dist/store/listing.js.map +1 -1
- package/dist/store/operations.js +1 -2
- package/dist/store/operations.js.map +1 -1
- package/dist/utils/ensure-default-tenant.d.ts +2 -1
- package/dist/utils/ensure-default-tenant.js +13 -1
- package/dist/utils/ensure-default-tenant.js.map +1 -1
- package/dist/utils/export-jobs.js +2 -1
- package/dist/utils/export-jobs.js.map +1 -1
- package/frontend-vue/layers/dms-core/app/build/composables/renderNow.ts +1 -2
- package/frontend-vue/layers/dms-core/app/composables/translation/useTranslation.ts +3 -0
- package/frontend-vue/layers/dms-core/app/composables/useApiError.ts +3 -5
- package/frontend-vue/layers/dms-core/app/composables/useFieldErrors.ts +61 -26
- package/frontend-vue/layers/dms-core/app/utils/formatter.ts +5 -37
- package/frontend-vue/layers/dms-core/app/utils/menu.ts +66 -70
- package/frontend-vue/layers/dms-core/i18n/locales/core-en-GB.json +2 -0
- package/frontend-vue/layers/dms-core/i18n/locales/core-fr-FR.json +2 -0
- package/frontend-vue/layers/dms-core/shared/types/app-config.ts +0 -2
- package/frontend-vue/layers/dms-layout/app/app.config.ts +0 -1
- package/frontend-vue/layers/dms-layout/app/assets/css/main.css +11 -1
- package/frontend-vue/layers/dms-layout/app/assets/fonts/Geist-Italic-Variable.woff2 +0 -0
- package/frontend-vue/layers/dms-layout/app/assets/fonts/Geist-Variable.woff2 +0 -0
- package/frontend-vue/layers/dms-layout/app/assets/fonts/GeistMono-Italic-Variable.woff2 +0 -0
- package/frontend-vue/layers/dms-layout/app/assets/fonts/GeistMono-Variable.woff2 +0 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardPageBody.vue +2 -7
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +3 -11
- package/frontend-vue/layers/dms-layout/app/build/components/layout/Footer.vue +2 -106
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PageHeaderActionBar.vue +0 -8
- package/frontend-vue/layers/dms-layout/app/build/components/layout/PageHeaderActionsOutlet.vue +0 -10
- package/frontend-vue/layers/dms-layout/app/build/utils/github-repository.ts +2 -2
- package/frontend-vue/layers/dms-layout/app/components/navigation/NavigationMenu.vue +18 -3
- package/frontend-vue/layers/dms-layout/app/composables/layout/useServedHeaderActions.ts +24 -4
- package/frontend-vue/layers/dms-layout/app/composables/page/useModuleStore.ts +10 -2
- package/frontend-vue/layers/dms-layout/app/composables/page/usePageRecordDeletion.ts +162 -0
- package/frontend-vue/layers/dms-layout/app/custom-layouts/DefaultLayout.vue +2 -7
- package/frontend-vue/layers/dms-layout/app/custom-layouts/SettingsLayout.vue +2 -7
- package/frontend-vue/layers/dms-layout/app/pages/[...slug].vue +7 -0
- package/frontend-vue/layers/dms-layout/app/plugins/command-palette-navigation.client.ts +9 -9
- package/frontend-vue/layers/dms-layout/app/plugins/command-palette-personal-pages.client.ts +9 -9
- package/frontend-vue/layers/dms-layout/app/plugins/command-palette-quick-actions.client.ts +7 -7
- package/frontend-vue/layers/dms-layout/app/plugins/command-palette-session.client.ts +11 -10
- package/frontend-vue/layers/dms-layout/app/theme/actions.ts +5 -4
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-en-GB.json +6 -4
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-fr-FR.json +6 -4
- package/frontend-vue/layers/dms-ui/app/build/components/form/FormLoadError.vue +5 -1
- package/frontend-vue/layers/dms-ui/app/build/components/table/FiltersRow.vue +11 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/confirm/actionError.ts +6 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/numberSuffix.ts +2 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/registerDefaults.ts +26 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/relationRows.ts +22 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formRecordLoad.ts +11 -5
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formValidation.ts +36 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/form/repeaterTable.ts +17 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/table/useRelationFilterLabels.ts +30 -6
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableViewRowActions.ts +13 -3
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/utils/writeError.ts +21 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/codeHighlight.ts +67 -29
- package/frontend-vue/layers/dms-ui/app/build/utils/htmlGrammar.ts +79 -0
- package/frontend-vue/layers/dms-ui/app/build/utils/shellParser.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/build/utils/streamHighlight.ts +90 -0
- package/frontend-vue/layers/dms-ui/app/components/code-snippet/CodeSnippet.vue +23 -12
- package/frontend-vue/layers/dms-ui/app/components/form/Form.vue +1 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/Cascader.vue +53 -22
- package/frontend-vue/layers/dms-ui/app/components/form/components/Relation.vue +27 -6
- package/frontend-vue/layers/dms-ui/app/components/form/components/RepeaterTable.vue +14 -7
- package/frontend-vue/layers/dms-ui/app/components/table-view/CascaderPath.vue +74 -25
- package/frontend-vue/layers/dms-ui/app/components/table-view/KanbanBoard.vue +3 -9
- package/frontend-vue/layers/dms-ui/app/components/table-view/TableView.vue +16 -1
- package/frontend-vue/layers/dms-ui/app/composables/form/types/field.ts +12 -0
- package/frontend-vue/layers/dms-ui/app/composables/form/useForm.ts +47 -7
- package/frontend-vue/layers/dms-ui/app/composables/live/usePageLive.ts +19 -9
- package/frontend-vue/layers/dms-ui/app/utils/cascader.ts +94 -3
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-en-GB.json +4 -1
- package/frontend-vue/layers/dms-ui/i18n/locales/ui-fr-FR.json +4 -1
- package/frontend-vue/package.json +6 -2
- package/package.json +8 -11
- package/skills/dms-module/SKILL.md +1 -1
- package/skills/dms-pages/REFERENCE.md +7 -3
- package/dist/hooks/tenant-instances.d.ts +0 -1
- package/dist/hooks/tenant-instances.js +0 -13
- package/dist/hooks/tenant-instances.js.map +0 -1
- package/frontend-vue/layers/dms-core/app/composables/hydration/isHydratingComponent.ts +0 -29
- package/frontend-vue/layers/dms-layout/app/composables/layout/usePageRecord.ts +0 -50
- package/frontend-vue/layers/dms-layout/app/utils/pageRecord.ts +0 -71
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,122 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.11.1
|
|
4
|
+
|
|
5
|
+
[compare changes](https://github.com/AntelopeJS/dms/compare/v0.11.0...v0.11.1)
|
|
6
|
+
|
|
7
|
+
### 🚀 Enhancements
|
|
8
|
+
|
|
9
|
+
- **menu:** Support nested dynamic menu entries ([#446](https://github.com/AntelopeJS/dms/pull/446))
|
|
10
|
+
|
|
11
|
+
### 🩹 Fixes
|
|
12
|
+
|
|
13
|
+
- **release:** Build the interface before the release lint ([#454](https://github.com/AntelopeJS/dms/pull/454))
|
|
14
|
+
|
|
15
|
+
### 📖 Documentation
|
|
16
|
+
|
|
17
|
+
- **changelog:** Upgrade notes of dms 0.11.0 ([#440](https://github.com/AntelopeJS/dms/pull/440))
|
|
18
|
+
|
|
19
|
+
### 📦 Build
|
|
20
|
+
|
|
21
|
+
- Adopt the AntelopeJS guardrail pack ([#444](https://github.com/AntelopeJS/dms/pull/444))
|
|
22
|
+
|
|
23
|
+
### 🏡 Chore
|
|
24
|
+
|
|
25
|
+
- Configure Renovate with the shared preset ([#445](https://github.com/AntelopeJS/dms/pull/445))
|
|
26
|
+
- **release:** @antelopejs/interface-dms v0.9.1 ([d94a1de7](https://github.com/AntelopeJS/dms/commit/d94a1de7))
|
|
27
|
+
|
|
28
|
+
### 🤖 CI
|
|
29
|
+
|
|
30
|
+
- Run docs-playground on main pushes only ([#443](https://github.com/AntelopeJS/dms/pull/443))
|
|
31
|
+
|
|
32
|
+
### ❤️ Contributors
|
|
33
|
+
|
|
34
|
+
- Antony Rizzitelli ([@Upd4ting](http://github.com/Upd4ting))
|
|
35
|
+
|
|
36
|
+
## v0.11.0
|
|
37
|
+
|
|
38
|
+
[compare changes](https://github.com/AntelopeJS/dms/compare/v0.10.0...v0.11.0)
|
|
39
|
+
|
|
40
|
+
### Upgrade notes
|
|
41
|
+
|
|
42
|
+
- Implements `@antelopejs/interface-dms` `>=0.9.0 <0.10.0` (see its 0.9.0 notes: `DefaultLayoutOptions.record` as a loader, tenant provisioning through `TENANT_BEING_PROVISIONED`).
|
|
43
|
+
- **Breaking:** changing modules from the store is reserved to development ([#418](https://github.com/AntelopeJS/dms/pull/418)). A configuration that sets `store.enabled: true` in production no longer opens the store.
|
|
44
|
+
- **Breaking:** the GitHub star button is removed from the footer ([#428](https://github.com/AntelopeJS/dms/pull/428)). `branding.footer.githubStar` no longer exists: a layer that sets it gets a TypeScript error on `DmsFooterConfig` and should delete the line.
|
|
45
|
+
- **Breaking (layer API):** `isHydratingComponent` is removed, without an alias ([#424](https://github.com/AntelopeJS/dms/pull/424)). Use `isDmsHydrating()` from `@antelopejs/dms-frontend` ≥ 0.9: `ref(!import.meta.env.SSR && !isHydratingComponent())` becomes `ref(!import.meta.env.SSR && !isDmsHydrating())`.
|
|
46
|
+
- **Behavior change:** forms read the data API's structured field errors, `400 { code, fields }` from `@antelopejs/interface-data-api` 0.4, and name each refused field by its column label ([#433](https://github.com/AntelopeJS/dms/pull/433)). Requires interface-data-api `>=0.4.0`.
|
|
47
|
+
- **Behavior change:** the fallback language of a `@Localized` field is required in generated forms, client and server ([#427](https://github.com/AntelopeJS/dms/pull/427)).
|
|
48
|
+
- Table view columns support `visibleWhen` and `disabledWhen`; the write routes ignore hidden or locked values, and an edit that hides a `visibleWhen` field clears it ([#431](https://github.com/AntelopeJS/dms/pull/431)).
|
|
49
|
+
- Requires `@antelopejs/dms-frontend` `>=0.9.0 <0.10.0` (with `@antelopejs/api` ≥ 1.5.0), `@antelopejs/interface-database-decorators` `>=0.1.10` and `@antelopejs/interface-database` `>=0.1.11`. Modules move to `@antelopejs/dms` 0.11 and `@antelopejs/interface-dms` `>=0.9.0`.
|
|
50
|
+
|
|
51
|
+
### 🚀 Enhancements
|
|
52
|
+
|
|
53
|
+
- **frontend:** List the origins the dev manifest rewrites ([#434](https://github.com/AntelopeJS/dms/pull/434))
|
|
54
|
+
- **store:** ⚠️ Changing modules from the store is reserved to development ([#418](https://github.com/AntelopeJS/dms/pull/418))
|
|
55
|
+
- **relation:** "Not found" for unanswered ids, cascader read by ?ids=, lists need the Foreign join ([#421](https://github.com/AntelopeJS/dms/pull/421))
|
|
56
|
+
- **tenants:** Provision the default tenant through TENANT_BEING_PROVISIONED ([#420](https://github.com/AntelopeJS/dms/pull/420))
|
|
57
|
+
- **page:** Read the page's record with its layout, in PageLayoutRequest's context ([#426](https://github.com/AntelopeJS/dms/pull/426))
|
|
58
|
+
- **page:** Leave a detail page whose record was deleted; 404 shown as not found ([#432](https://github.com/AntelopeJS/dms/pull/432))
|
|
59
|
+
- **dms-layout:** ⚠️ Remove the GitHub star button from the footer ([#428](https://github.com/AntelopeJS/dms/pull/428))
|
|
60
|
+
- **forms:** Require the fallback language of a localized field ([#427](https://github.com/AntelopeJS/dms/pull/427))
|
|
61
|
+
- **table-view:** VisibleWhen and disabledWhen column conditions ([#431](https://github.com/AntelopeJS/dms/pull/431))
|
|
62
|
+
- **errors:** Read the data API's { code, fields } field errors ([#433](https://github.com/AntelopeJS/dms/pull/433))
|
|
63
|
+
|
|
64
|
+
### 🔥 Performance
|
|
65
|
+
|
|
66
|
+
- **dms-ui:** Load each code snippet's grammar alone, without the editor ([#403](https://github.com/AntelopeJS/dms/pull/403))
|
|
67
|
+
|
|
68
|
+
### 🩹 Fixes
|
|
69
|
+
|
|
70
|
+
- **export:** Quote the CSV header line ([#419](https://github.com/AntelopeJS/dms/pull/419))
|
|
71
|
+
- **format:** Draw the narrow no-break space in Geist, and keep the locale's ([#422](https://github.com/AntelopeJS/dms/pull/422))
|
|
72
|
+
- **playground:** Hydration and invite-extension warnings of the playground pages ([#429](https://github.com/AntelopeJS/dms/pull/429))
|
|
73
|
+
- **tabs:** Take the pill tabs' corners from the theme radius ([#359](https://github.com/AntelopeJS/dms/pull/359))
|
|
74
|
+
- **modules:** Wait for the listing's background read on a return to the page ([#436](https://github.com/AntelopeJS/dms/pull/436))
|
|
75
|
+
|
|
76
|
+
### 💅 Refactors
|
|
77
|
+
|
|
78
|
+
- **i18n:** Translate outside setup through getAppTranslation only ([#423](https://github.com/AntelopeJS/dms/pull/423))
|
|
79
|
+
- **hydration:** Read the runtime's isDmsHydrating, drop isHydratingComponent ([#424](https://github.com/AntelopeJS/dms/pull/424))
|
|
80
|
+
|
|
81
|
+
### 📖 Documentation
|
|
82
|
+
|
|
83
|
+
- **changelog:** Upgrade notes of dms 0.10.0 ([#417](https://github.com/AntelopeJS/dms/pull/417))
|
|
84
|
+
- **deployment:** Require affinity on the realtime routes across instances ([#430](https://github.com/AntelopeJS/dms/pull/430))
|
|
85
|
+
|
|
86
|
+
### 📦 Build
|
|
87
|
+
|
|
88
|
+
- **deps:** Dms-frontend 0.9, interface-data-api 0.4, decorators 0.1.10 ([#437](https://github.com/AntelopeJS/dms/pull/437))
|
|
89
|
+
|
|
90
|
+
### 🏡 Chore
|
|
91
|
+
|
|
92
|
+
- **release:** @antelopejs/interface-dms v0.9.0 ([555267de](https://github.com/AntelopeJS/dms/commit/555267de))
|
|
93
|
+
|
|
94
|
+
### ✅ Tests
|
|
95
|
+
|
|
96
|
+
- Run the backend tests without Ethereal ([#435](https://github.com/AntelopeJS/dms/pull/435))
|
|
97
|
+
- **hydration:** Give the live tests isDmsHydrating ([#438](https://github.com/AntelopeJS/dms/pull/438))
|
|
98
|
+
|
|
99
|
+
#### ⚠️ Breaking Changes
|
|
100
|
+
|
|
101
|
+
- **store:** ⚠️ Changing modules from the store is reserved to development ([#418](https://github.com/AntelopeJS/dms/pull/418))
|
|
102
|
+
- **dms-layout:** ⚠️ Remove the GitHub star button from the footer ([#428](https://github.com/AntelopeJS/dms/pull/428))
|
|
103
|
+
|
|
104
|
+
### ❤️ Contributors
|
|
105
|
+
|
|
106
|
+
- Antony Rizzitelli <rizzitelli.antony@pm.me>
|
|
107
|
+
- Glastis ([@Glastis](http://github.com/Glastis))
|
|
108
|
+
- Alessandro Aloisio ([@alessaloisio](http://github.com/alessaloisio))
|
|
109
|
+
|
|
3
110
|
## v0.10.0
|
|
4
111
|
|
|
5
112
|
[compare changes](https://github.com/AntelopeJS/dms/compare/v0.9.8...v0.10.0)
|
|
6
113
|
|
|
114
|
+
### Upgrade notes
|
|
115
|
+
|
|
116
|
+
- Implements `@antelopejs/interface-dms` 0.8 (`>=0.8.0 <0.9.0`); modules raise their floor to `@antelopejs/interface-dms >=0.8.0` and `@antelopejs/dms >=0.10.0`. See [Migrate from 0.7 to 0.8](https://github.com/AntelopeJS/dms/blob/main/packages/dms/docs/02.building/16.migration-0-7-to-0-8.md).
|
|
117
|
+
- `KpiCard`: `showPreviousValue` defaults to `true`, so a card whose data carries `previousValue` prints it beside the change; set `false` to keep a card compact ([#352](https://github.com/AntelopeJS/dms/pull/352)).
|
|
118
|
+
- A `RelationType` / `CascaderRelationType` with `multiple: true` filters with `include` / `exclude` instead of `is` / `is_not`: a saved view or a link filtering it with `is:` lists nothing until saved again or rewritten as `include:` ([#363](https://github.com/AntelopeJS/dms/pull/363)).
|
|
119
|
+
|
|
7
120
|
### 🚀 Enhancements
|
|
8
121
|
|
|
9
122
|
- **config:** Refuse a production start on public secrets or without the dashboard origin ([#401](https://github.com/AntelopeJS/dms/pull/401))
|
package/dist/config.d.ts
CHANGED
|
@@ -42,7 +42,6 @@ export interface FrontendConfig {
|
|
|
42
42
|
requireBootstrap?: BootstrapEnforcement;
|
|
43
43
|
}
|
|
44
44
|
export interface StoreConfig {
|
|
45
|
-
enabled?: boolean;
|
|
46
45
|
catalogUrl?: string;
|
|
47
46
|
}
|
|
48
47
|
export interface Config {
|
|
@@ -73,5 +72,4 @@ export declare function getHtmlRenderConfig(): HtmlRenderConfig;
|
|
|
73
72
|
export declare function getUploadsConfig(): UploadsConfig;
|
|
74
73
|
export declare function getFrontendConfig(): FrontendConfig;
|
|
75
74
|
export declare function getStoreConfig(): StoreConfig;
|
|
76
|
-
export declare function isStoreEditable(dev: boolean): boolean;
|
|
77
75
|
export declare function applyConfig(config: Config): void;
|
package/dist/config.js
CHANGED
|
@@ -12,7 +12,6 @@ exports.getHtmlRenderConfig = getHtmlRenderConfig;
|
|
|
12
12
|
exports.getUploadsConfig = getUploadsConfig;
|
|
13
13
|
exports.getFrontendConfig = getFrontendConfig;
|
|
14
14
|
exports.getStoreConfig = getStoreConfig;
|
|
15
|
-
exports.isStoreEditable = isStoreEditable;
|
|
16
15
|
exports.applyConfig = applyConfig;
|
|
17
16
|
const defu_1 = require("defu");
|
|
18
17
|
const time_1 = require("@antelopejs/interface-dms/utils/internal/time");
|
|
@@ -89,9 +88,6 @@ function getFrontendConfig() {
|
|
|
89
88
|
function getStoreConfig() {
|
|
90
89
|
return globalConfig.store ?? {};
|
|
91
90
|
}
|
|
92
|
-
function isStoreEditable(dev) {
|
|
93
|
-
return getStoreConfig().enabled ?? dev;
|
|
94
|
-
}
|
|
95
91
|
function applyConfig(config) {
|
|
96
92
|
globalConfig = (0, defu_1.defu)(config, globalConfig);
|
|
97
93
|
if (config.auth) {
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;AA2PA,8BAEC;AAED,kDAEC;AAED,4CAEC;AAGD,4CAEC;AAED,sCAEC;AAMD,oDAMC;AAED,sCAEC;AAED,kDAEC;AAED,4CAEC;AAED,8CAEC;AAED,wCAEC;AAMD,kCAkBC;AArUD,+BAA4B;AAE5B,wEAIuD;AAoMvD,MAAM,2BAA2B,GAAG,EAAE,CAAC;AAC1B,QAAA,6BAA6B,GAAG,4BAAqB,CAAC;AAEnE,IAAI,gBAAgB,GAAe;IACjC,SAAS,EAAE,EAAE;IACb,4BAA4B,EAAE,2BAAoB;IAClD,4BAA4B,EAAE,2BAAoB;IAClD,mBAAmB,EAAE,qCAA6B;IAClD,oBAAoB,EAAE,2BAA2B,GAAG,2BAAoB;IACxE,iBAAiB,EAAE,EAAE;IACrB,iBAAiB,EAAE,KAAK;CACzB,CAAC;AAEF,MAAM,8BAA8B,GAAG,CAAC,CAAC;AAEzC,IAAI,sBAAsB,GAAqB;IAC7C,aAAa,EAAE,KAAK;IACpB,oBAAoB,EAClB,8BAA8B,GAAG,8BAAuB;IAC1D,cAAc,EAAE,uCAAuC;CACxD,CAAC;AAEF,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAC/B,MAAM,qBAAqB,GAAG,IAAI,CAAC;AACnC,MAAM,4BAA4B,GAAG,GAAG,CAAC;AAC5B,QAAA,uBAAuB,GAClC,4BAA4B,GAAG,qBAAqB,GAAG,iBAAiB,CAAC;AAE3E,IAAI,mBAAmB,GAAkB;IACvC,OAAO,EAAE,+BAAuB;IAChC,gBAAgB,EAAE,EAAE;CACrB,CAAC;AAEF,IAAI,oBAAoB,GAAmB;IACzC,gBAAgB,EAAE,MAAM;CACzB,CAAC;AAEW,QAAA,uBAAuB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AAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAE1C,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QAChB,gBAAgB,GAAG,IAAA,WAAI,EAAC,MAAM,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAC;IACzD,CAAC;IAED,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;QACtB,sBAAsB,GAAG,IAAA,WAAI,EAAC,MAAM,CAAC,UAAU,EAAE,sBAAsB,CAAC,CAAC;IAC3E,CAAC;IAED,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,mBAAmB,GAAG,IAAA,WAAI,EAAC,MAAM,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;IAClE,CAAC;IAED,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;QACpB,oBAAoB,GAAG,IAAA,WAAI,EAAC,MAAM,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAC;IACrE,CAAC;AACH,CAAC"}
|
|
@@ -181,21 +181,32 @@ function applyDevManifestOverrides(manifest, requestContext, clientUrl, outcome)
|
|
|
181
181
|
if (apiOrigin)
|
|
182
182
|
(0, config_1.setDevApiBaseUrl)(apiOrigin);
|
|
183
183
|
}
|
|
184
|
-
|
|
184
|
+
const configured = {
|
|
185
|
+
apiBaseUrl: config.apiBaseUrl,
|
|
186
|
+
clientBaseUrl: config.clientBaseUrl,
|
|
187
|
+
};
|
|
188
|
+
const overrides = { apiBaseUrl: apiOrigin, clientBaseUrl: clientOrigin };
|
|
189
|
+
return {
|
|
190
|
+
...(0, manifest_1.applyDevManifestUrls)(manifest, configured, overrides),
|
|
191
|
+
originRewrites: (0, manifest_1.devOriginRewrites)(configured, overrides),
|
|
192
|
+
};
|
|
185
193
|
}
|
|
186
194
|
async function buildFrontendManifest(requestContext, clientUrl, renderer, rendererVersion, bootstrapHeader) {
|
|
187
195
|
const outcome = (0, frontend_bootstrap_1.resolveBootstrapOutcome)(bootstrapHeader);
|
|
188
196
|
enforceLayerAccess(outcome, "GET /dms/frontend", () => (0, manifest_1.listDroppedBackendProxies)(selectedModules(resolveFrontendSelection(renderer, rendererVersion)), resolveManifestFieldPolicy(outcome, false)));
|
|
189
197
|
const selection = resolveFrontendSelection(renderer, rendererVersion);
|
|
190
198
|
const { dev } = await (0, runtime_1.GetRuntimeInfo)();
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
shaped = applyDevManifestOverrides(shaped, requestContext, clientUrl, outcome);
|
|
194
|
-
}
|
|
195
|
-
return {
|
|
199
|
+
const shaped = (0, manifest_1.stripPrivateManifestFields)({ modules: selectedModules(selection) }, resolveManifestFieldPolicy(outcome, dev));
|
|
200
|
+
const manifest = {
|
|
196
201
|
version: manifest_1.FRONTEND_MANIFEST_VERSION,
|
|
197
202
|
modules: shaped.modules,
|
|
198
203
|
settling: (0, activity_1.isStoreOperationRunning)(),
|
|
199
204
|
};
|
|
205
|
+
if (!dev)
|
|
206
|
+
return manifest;
|
|
207
|
+
return {
|
|
208
|
+
...manifest,
|
|
209
|
+
...applyDevManifestOverrides(shaped, requestContext, clientUrl, outcome),
|
|
210
|
+
};
|
|
200
211
|
}
|
|
201
212
|
//# sourceMappingURL=frontend-modules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frontend-modules.js","sourceRoot":"","sources":["../../../src/implementations/dms/frontend-modules.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"frontend-modules.js","sourceRoot":"","sources":["../../../src/implementations/dms/frontend-modules.ts"],"names":[],"mappings":";;AA8LA,8CAwBC;AAmBD,wDAOC;AAQD,4DAIC;AAUD,gEAYC;AAoBD,gDAWC;AAuDD,sDAgCC;AAxYD,qCAAuC;AACvC,yCAAgE;AAEhE,uEAAwD;AACxD,gEAAoE;AASpE,yDAAwE;AACxE,mCAAuC;AACvC,yCAAgF;AAChF,6CAAiD;AACjD,6DAM8B;AAC9B,yCAaoB;AACpB,mDAA+D;AAC/D,2CAA0C;AAC1C,2EAGqC;AACr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M,GAAsC,IAAA,qCAA0B,EAC1E,EAAE,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,EAAE,EACvC,0BAA0B,CAAC,OAAO,EAAE,GAAG,CAAC,CACzC,CAAC;IACF,MAAM,QAAQ,GAAmC;QAC/C,OAAO,EAAE,oCAAyB;QAClC,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,QAAQ,EAAE,IAAA,kCAAuB,GAAE;KACpC,CAAC;IACF,IAAI,CAAC,GAAG;QAAE,OAAO,QAAQ,CAAC;IAC1B,OAAO;QACL,GAAG,QAAQ;QACX,GAAG,yBAAyB,CAAC,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,CAAC;KACzE,CAAC;AACJ,CAAC"}
|
|
@@ -15,11 +15,17 @@ export interface FrontendManifest<T extends ManifestModuleEntry> {
|
|
|
15
15
|
version: number;
|
|
16
16
|
modules: T[];
|
|
17
17
|
settling?: boolean;
|
|
18
|
+
originRewrites?: OriginRewrite[];
|
|
18
19
|
}
|
|
19
20
|
export interface ManifestUrls {
|
|
20
21
|
apiBaseUrl?: string;
|
|
21
22
|
clientBaseUrl?: string;
|
|
22
23
|
}
|
|
24
|
+
export interface OriginRewrite {
|
|
25
|
+
from: string;
|
|
26
|
+
to: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function devOriginRewrites(configured: ManifestUrls, overrides: ManifestUrls): OriginRewrite[];
|
|
23
29
|
export declare function resolveRequestOrigin(request: IncomingMessage): string | undefined;
|
|
24
30
|
export declare function resolveClientOrigin(clientUrl: string | undefined): string | undefined;
|
|
25
31
|
export declare function applyDevManifestUrls<T extends ManifestModuleEntry>(manifest: ModuleManifestShape<T>, configured: ManifestUrls, overrides: ManifestUrls): ModuleManifestShape<T>;
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FRONTEND_MANIFEST_VERSION = void 0;
|
|
4
|
+
exports.devOriginRewrites = devOriginRewrites;
|
|
4
5
|
exports.resolveRequestOrigin = resolveRequestOrigin;
|
|
5
6
|
exports.resolveClientOrigin = resolveClientOrigin;
|
|
6
7
|
exports.applyDevManifestUrls = applyDevManifestUrls;
|
|
7
8
|
exports.stripPrivateManifestFields = stripPrivateManifestFields;
|
|
8
9
|
exports.listDroppedBackendProxies = listDroppedBackendProxies;
|
|
9
10
|
exports.FRONTEND_MANIFEST_VERSION = 2;
|
|
11
|
+
function devOriginRewrites(configured, overrides) {
|
|
12
|
+
const keys = ["apiBaseUrl", "clientBaseUrl"];
|
|
13
|
+
return keys.flatMap((key) => {
|
|
14
|
+
const from = configured[key];
|
|
15
|
+
const to = overrides[key];
|
|
16
|
+
return from && to ? [{ from, to }] : [];
|
|
17
|
+
});
|
|
18
|
+
}
|
|
10
19
|
const HTTP_PROTOCOLS = new Set(["http:", "https:"]);
|
|
11
20
|
function resolveRequestOrigin(request) {
|
|
12
21
|
const host = request.headers.host;
|
|
@@ -34,13 +43,7 @@ function escapeRegExp(value) {
|
|
|
34
43
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
35
44
|
}
|
|
36
45
|
function buildOriginRewriter(configured, overrides) {
|
|
37
|
-
const replacements = new Map();
|
|
38
|
-
if (configured.apiBaseUrl && overrides.apiBaseUrl) {
|
|
39
|
-
replacements.set(configured.apiBaseUrl, overrides.apiBaseUrl);
|
|
40
|
-
}
|
|
41
|
-
if (configured.clientBaseUrl && overrides.clientBaseUrl) {
|
|
42
|
-
replacements.set(configured.clientBaseUrl, overrides.clientBaseUrl);
|
|
43
|
-
}
|
|
46
|
+
const replacements = new Map(devOriginRewrites(configured, overrides).map(({ from, to }) => [from, to]));
|
|
44
47
|
if (replacements.size === 0)
|
|
45
48
|
return undefined;
|
|
46
49
|
const alternation = [...replacements.keys()]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../../../src/implementations/dms/manifest.ts"],"names":[],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AAC,GAAG,CAC/B,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,IAAI,IAAI,SAAS,CAAC,KAAK,CAAC,IAAI,WAAW,EAAE,CAC/D,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -705,12 +705,18 @@ async function findRegisteredEntriesHiddenByPreview(real, preview) {
|
|
|
705
705
|
return hidden;
|
|
706
706
|
}
|
|
707
707
|
function findDynamicEntriesHiddenByPreview(served, previewed) {
|
|
708
|
-
const kept = new Set(
|
|
709
|
-
return
|
|
710
|
-
.flat()
|
|
708
|
+
const kept = new Set(flattenDynamicNodes(previewed).map((node) => node.fullId));
|
|
709
|
+
return flattenDynamicNodes(served)
|
|
711
710
|
.map((node) => node.fullId)
|
|
712
711
|
.filter((fullId) => !kept.has(fullId));
|
|
713
712
|
}
|
|
713
|
+
function flattenDynamicNodes(served) {
|
|
714
|
+
const flatten = (node) => [
|
|
715
|
+
node,
|
|
716
|
+
...Object.values(node.children).flatMap(flatten),
|
|
717
|
+
];
|
|
718
|
+
return [...served.values()].flatMap((nodes) => nodes.flatMap(flatten));
|
|
719
|
+
}
|
|
714
720
|
function previewMemberModels(previewPermissions) {
|
|
715
721
|
const roleIds = [PREVIEW_ROLE_ID];
|
|
716
722
|
const roles = [
|
|
@@ -910,7 +916,7 @@ function listPreviewLossTargets(nodes, reading, pagesByFullId) {
|
|
|
910
916
|
if (page && !denied.has(page.fullId))
|
|
911
917
|
pages.set(page.fullId, page);
|
|
912
918
|
}
|
|
913
|
-
for (const node of
|
|
919
|
+
for (const node of flattenDynamicNodes(served)) {
|
|
914
920
|
const target = nodeTargets.get(node);
|
|
915
921
|
if (!target || denied.has(node.fullId) || denied.has(target.fullId)) {
|
|
916
922
|
continue;
|
|
@@ -1323,15 +1329,18 @@ function resolveEntryTarget(provider, item) {
|
|
|
1323
1329
|
}
|
|
1324
1330
|
return { target, link };
|
|
1325
1331
|
}
|
|
1326
|
-
|
|
1327
|
-
|
|
1332
|
+
const MAX_DYNAMIC_MENU_DEPTH = 3;
|
|
1333
|
+
function buildDynamicNodes(provider, items, context) {
|
|
1334
|
+
return buildDynamicLevel({ provider, context, targetAccess: new Map() }, { parentFullId: provider.categoryFullId, depth: 1 }, items);
|
|
1335
|
+
}
|
|
1336
|
+
async function buildDynamicLevel(walk, level, items) {
|
|
1337
|
+
const { provider, context, targetAccess } = walk;
|
|
1328
1338
|
const nodes = [];
|
|
1329
|
-
const targetAccess = new Map();
|
|
1330
1339
|
for (const item of items) {
|
|
1331
1340
|
const resolved = resolveEntryTarget(provider, item);
|
|
1332
1341
|
if (!resolved)
|
|
1333
1342
|
continue;
|
|
1334
|
-
const { target
|
|
1343
|
+
const { target } = resolved;
|
|
1335
1344
|
if (!(await isTargetPageReachable(target, context, targetAccess))) {
|
|
1336
1345
|
continue;
|
|
1337
1346
|
}
|
|
@@ -1339,7 +1348,7 @@ async function buildDynamicNodes(provider, items, context) {
|
|
|
1339
1348
|
!clientHoldsPermission(context, item.permissionId)) {
|
|
1340
1349
|
continue;
|
|
1341
1350
|
}
|
|
1342
|
-
const node = buildDynamicNode(
|
|
1351
|
+
const node = await buildDynamicNode(walk, level, item, resolved);
|
|
1343
1352
|
nodeProviders.set(node, provider);
|
|
1344
1353
|
nodeTargets.set(node, target);
|
|
1345
1354
|
nodes.push(node);
|
|
@@ -1358,21 +1367,41 @@ async function isTargetPageReachable(target, context, cache) {
|
|
|
1358
1367
|
cache.set(target.fullSlug, reachable);
|
|
1359
1368
|
return reachable;
|
|
1360
1369
|
}
|
|
1361
|
-
function buildDynamicNode(
|
|
1362
|
-
const { id, permissionId: _permissionId, params: _params, ...menuFields } = item;
|
|
1370
|
+
async function buildDynamicNode(walk, level, item, resolved) {
|
|
1371
|
+
const { id, permissionId: _permissionId, params: _params, children: _children, ...menuFields } = item;
|
|
1372
|
+
const fullId = `${level.parentFullId}.${id}`;
|
|
1373
|
+
const children = await buildDynamicChildRecord(walk, level, item, fullId);
|
|
1363
1374
|
return {
|
|
1364
1375
|
...menuFields,
|
|
1365
|
-
fullSlug: link,
|
|
1376
|
+
fullSlug: resolved.link,
|
|
1366
1377
|
id,
|
|
1367
|
-
fullId
|
|
1368
|
-
layoutUrl: target.layoutUrl,
|
|
1378
|
+
fullId,
|
|
1379
|
+
layoutUrl: resolved.target.layoutUrl,
|
|
1369
1380
|
type: "link",
|
|
1370
1381
|
category: undefined,
|
|
1371
|
-
children
|
|
1372
|
-
childrenOrders:
|
|
1382
|
+
children,
|
|
1383
|
+
childrenOrders: sortChildIdsByOrder(children),
|
|
1373
1384
|
hasAccess: true,
|
|
1374
1385
|
};
|
|
1375
1386
|
}
|
|
1387
|
+
async function buildDynamicChildRecord(walk, level, item, fullId) {
|
|
1388
|
+
if (!item.children?.length)
|
|
1389
|
+
return {};
|
|
1390
|
+
if (level.depth >= MAX_DYNAMIC_MENU_DEPTH) {
|
|
1391
|
+
(0, warn_once_1.warnOnceFor)(walk.provider, "too-deep", `[dms] dynamic menu entry "${fullId}" exceeds the maximum depth of ${MAX_DYNAMIC_MENU_DEPTH}: its children were skipped.`);
|
|
1392
|
+
return {};
|
|
1393
|
+
}
|
|
1394
|
+
const nodes = await buildDynamicLevel(walk, { parentFullId: fullId, depth: level.depth + 1 }, item.children);
|
|
1395
|
+
const children = new Map();
|
|
1396
|
+
for (const node of nodes) {
|
|
1397
|
+
if (children.has(node.id)) {
|
|
1398
|
+
(0, warn_once_1.warnOnceFor)(walk.provider, "duplicate-child-id", `[dms] dynamic menu entry "${node.id}" under "${fullId}" duplicates a sibling and was skipped.`);
|
|
1399
|
+
continue;
|
|
1400
|
+
}
|
|
1401
|
+
children.set(node.id, node);
|
|
1402
|
+
}
|
|
1403
|
+
return Object.fromEntries(children);
|
|
1404
|
+
}
|
|
1376
1405
|
const quickActionTargetHandlers = {
|
|
1377
1406
|
event: async (target) => ({
|
|
1378
1407
|
type: "event",
|