@dotcms/client 0.0.1-alpha.32 → 0.0.1-alpha.34

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 ADDED
@@ -0,0 +1,48 @@
1
+ # DotCMS Frontend
2
+
3
+ This folder contains the frontend infrastructure for the DotCMS admin system, includes the main app and all the internal libraries.
4
+
5
+ ## Content
6
+
7
+ | Name | Type | Location | Build with | Description |
8
+ | -------------------------------------------------------------------------------------------------- | ---- | ---------------------------- | ---------- | ----------------------------------------------------------- |
9
+ | [dotcms-ui](https://github.com/dotCMS/core-web/tree/master/apps/dotcms-ui) | app | `apps/dotcms-ui` | Angular | Main UI application |
10
+ | [dotcdn](https://github.com/dotCMS/core-web/tree/master/apps/dotcdn) | app | `apps/dotcdn` | Angular | App for the dotCDN plugin |
11
+ | [dotcms-block-editor](https://github.com/dotCMS/core-web/tree/master/apps/dotcms-block-editor) | app | `apps/dotcms-block-editor` | Angular | App to build de block-editor as a Web Component |
12
+ | [dotcms](https://github.com/dotCMS/core-web/tree/master/libs/dotcms) | lib | `libs/dotcms` | Typescript | JavaScript SDK for DotCMS API's |
13
+ | [dot-layout-grid](https://github.com/dotCMS/core-web/tree/master/libs/dot-layout-grid) | lib | `libs/dot-layout-grid` | Angular | Components for layout editor |
14
+ | [block-editor](https://github.com/dotCMS/core-web/tree/master/libs/block-editor) | lib | `libs/block-editor` | TitTap | Block editor components |
15
+ | [dot-rules](https://github.com/dotCMS/core-web/tree/master/libs/dot-rules) | lib | `libs/dot-rules` | Angular | Components and services for rules |
16
+ | [dotcms-field-elements](https://github.com/dotCMS/core-web/tree/master/libs/dotcms-field-elements) | lib | `libs/dotcms-field-elements` | Stenciljs | Web components for form builder (deprecated) |
17
+ | [dotcms-js](https://github.com/dotCMS/core-web/tree/master/libs/dotcms-js) | lib | `libs/dotcms-js` | Angular | Angular @injectables for DotCMS API |
18
+ | [dotcms-models](https://github.com/dotCMS/core-web/tree/master/libs/dotcms-models) | lib | `libs/dotcms-models` | Typescript | DotCMS interfaces and types |
19
+ | [dotcms-scss](https://github.com/dotCMS/core-web/tree/master/libs/dotcms-scss) | lib | `libs/dotcms-scss` | SCSS | SCSS shared files for theme Angular PrimeNG and Dijit Theme |
20
+
21
+ ## dotCMS core-web Monorepo
22
+
23
+ This monorepo, powered by [Nx](https://nx.dev), contains everything related to the frontend development for dotCMS.
24
+
25
+ ### Installing Dependencies
26
+
27
+ Run `yarn install` to install all project dependencies.
28
+
29
+ ### Development Server
30
+
31
+ To start the development server, run `nx serve dotcms-ui`. Visit [http://localhost:4200/](http://localhost:4200/). The app will automatically reload if you make any changes to the source files. We have set up a proxy to the backend server (on port 8080), allowing you to run both the backend server (by building the master branch or using Docker) and the frontend server simultaneously.
32
+
33
+ ### Building the Project
34
+
35
+ We have three main applications to build:
36
+ - **dotcms-ui**: Run `nx build dotcms-ui`.
37
+ - **dotcms-block-editor**: Run `nx build dotcms-block-editor`.
38
+ - **dotcms-binary-field-builder**: Run `nx build dotcms-binary-field-builder`.
39
+
40
+ ### Running Unit Tests
41
+
42
+ To run all unit tests for projects currently testable, use `yarn run test:dotcms`. To test a specific app or library, run `nx test {name-of-the-app-or-lib}`.
43
+
44
+ Use `nx affected:test` to execute the unit tests affected by recent changes.
45
+
46
+ ### Understanding Your Workspace
47
+
48
+ Run `nx dep-graph` to see a diagram of your projects' dependencies. This will help you better understand the structure and relationships in your monorepo.
package/index.cjs.js CHANGED
@@ -1459,14 +1459,23 @@ const parseContentletsToUuidMap = (containerContentlets) => {
1459
1459
  };
1460
1460
 
1461
1461
  const getPageRequestParams = ({ path = '', params = {} }) => {
1462
- const dotMarketingPersonaId = params?.['com.dotmarketing.persona.id'] || '';
1463
- const { language_id = 1, mode = '', variantName = '', personaId } = params;
1462
+ const finalParams = {};
1463
+ const dotMarketingPersonaId = params['com.dotmarketing.persona.id'] || '';
1464
+ if (params['mode']) {
1465
+ finalParams['mode'] = params['mode'];
1466
+ }
1467
+ if (params['language_id']) {
1468
+ finalParams['language_id'] = params['language_id'];
1469
+ }
1470
+ if (params['variantName']) {
1471
+ finalParams['variantName'] = params['variantName'];
1472
+ }
1473
+ if (params['personaId'] || dotMarketingPersonaId) {
1474
+ finalParams['personaId'] = params['personaId'] || dotMarketingPersonaId;
1475
+ }
1464
1476
  return {
1465
1477
  path,
1466
- mode,
1467
- language_id,
1468
- variantName,
1469
- personaId: personaId || dotMarketingPersonaId
1478
+ ...finalParams
1470
1479
  };
1471
1480
  };
1472
1481
 
package/index.esm.js CHANGED
@@ -1457,14 +1457,23 @@ const parseContentletsToUuidMap = (containerContentlets) => {
1457
1457
  };
1458
1458
 
1459
1459
  const getPageRequestParams = ({ path = '', params = {} }) => {
1460
- const dotMarketingPersonaId = params?.['com.dotmarketing.persona.id'] || '';
1461
- const { language_id = 1, mode = '', variantName = '', personaId } = params;
1460
+ const finalParams = {};
1461
+ const dotMarketingPersonaId = params['com.dotmarketing.persona.id'] || '';
1462
+ if (params['mode']) {
1463
+ finalParams['mode'] = params['mode'];
1464
+ }
1465
+ if (params['language_id']) {
1466
+ finalParams['language_id'] = params['language_id'];
1467
+ }
1468
+ if (params['variantName']) {
1469
+ finalParams['variantName'] = params['variantName'];
1470
+ }
1471
+ if (params['personaId'] || dotMarketingPersonaId) {
1472
+ finalParams['personaId'] = params['personaId'] || dotMarketingPersonaId;
1473
+ }
1462
1474
  return {
1463
1475
  path,
1464
- mode,
1465
- language_id,
1466
- variantName,
1467
- personaId: personaId || dotMarketingPersonaId
1476
+ ...finalParams
1468
1477
  };
1469
1478
  };
1470
1479
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotcms/client",
3
- "version": "0.0.1-alpha.32",
3
+ "version": "0.0.1-alpha.34",
4
4
  "description": "Official JavaScript library for interacting with DotCMS REST APIs.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -6,9 +6,5 @@ interface PageRequestParamsProps {
6
6
  }
7
7
  export declare const getPageRequestParams: ({ path, params }: PageRequestParamsProps) => {
8
8
  path: string;
9
- mode: any;
10
- language_id: any;
11
- variantName: any;
12
- personaId: any;
13
9
  };
14
10
  export {};