Skip to content

Commit 0265bc2

Browse files
authored
Merge branch 'mendix:development' into deployedKnowledgeBase
2 parents e4341e3 + cf0b8d4 commit 0265bc2

File tree

447 files changed

+4428
-2166
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

447 files changed

+4428
-2166
lines changed

content/en/docs/apidocs-mxsdk/apidocs/apps/epics-api.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,8 @@ To authenticate calls when using the Open API specification below, click **Autho
4343

4444
## API Reference
4545

46-
{{< swaggerui src="/openapi-spec/epics.yaml" >}}
46+
{{% alert color="warning" %}}
47+
You cannot call endpoints from the Epics API Swagger UI.
48+
{{% /alert %}}
49+
50+
{{< swaggerui-disable-try-it-out src="/openapi-spec/epics.yaml" >}}

content/en/docs/apidocs-mxsdk/apidocs/frontend/client-api.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,15 @@ The Client API is compatible with both the React and the Dojo client.
1515

1616
* [Mendix 10 Client API](https://apidocs.rnd.mendix.com/10/client-mx-api/index.html)
1717

18+
{{% alert color="info" %}}
19+
The Mendix 10 Client API is available in Studio Pro 10.20.0 and above. For earlier versions of Studio Pro, please use the APIs listed in [Legacy Client APIs](#legacy).
20+
{{% /alert %}}
21+
1822
{{% alert color="warning" %}}
1923
The Client API is not supported in widgets. For widget development, please use our [Pluggable Widgets API](/apidocs-mxsdk/apidocs/pluggable-widgets/)
2024
{{% /alert %}}
2125

22-
## Legacy Client APIs
26+
## Legacy Client APIs {#legacy}
2327

2428
* [Mendix 10 React Client API](https://apidocs.rnd.mendix.com/10/client-react/index.html)
2529
* [Mendix 10 Dojo Client API](https://apidocs.rnd.mendix.com/10/client/index.html)

content/en/docs/apidocs-mxsdk/apidocs/frontend/design-properties/_index.md

Lines changed: 771 additions & 0 deletions
Large diffs are not rendered by default.

content/en/docs/apidocs-mxsdk/apidocs/frontend/design-properties.md renamed to content/en/docs/apidocs-mxsdk/apidocs/frontend/design-properties/design-properties-10.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: "Design Properties API"
3-
url: /apidocs-mxsdk/apidocs/design-properties/
2+
title: "Mendix 10"
3+
url: /apidocs-mxsdk/apidocs/design-properties-10/
44
description: "This API guide outlines how design properties work in Atlas UI and can help you create custom design properties."
5-
weight: 50
5+
weight: 60
66
---
77

88
## Introduction
@@ -116,7 +116,9 @@ The examples above show that the fields `name` and `description` define the UI,
116116
Field `type` defines the type of a property and must be one of the design property types: `Toggle`, `Dropdown`, `Colorpicker`, `ToggleButtonGroup` or `Spacing`.
117117

118118
{{% alert color="warning" %}}
119-
Name your design property and its options carefully. Those names cannot be changed easily when there are apps already using them. If you want to rename a design property which is already being used in an app, see the [Renaming Design Properties](#old-names) section below.
119+
Name your design property and its options carefully. Those names cannot be changed easily when there are apps already using them.
120+
121+
If you want to rename a design property which is already being used in an app, see the [Renaming Design Properties](#old-names) section below.
120122
{{% /alert %}}
121123

122124
#### Toggle-Specific Fields
@@ -140,7 +142,7 @@ Here is a full example of a **Toggle** design property:
140142

141143
This is how the **Toggle** design property appears:
142144

143-
{{< figure src="/attachments/apidocs-mxsdk/apidocs/design-properties/toggle.png" alt="Toggle property in Studio Pro" class="no-border" >}}
145+
{{< figure src="/attachments/apidocs-mxsdk/apidocs/design-properties/toggle.png" alt="Toggle property in Studio Pro" >}}
144146

145147
#### Dropdown-Specific Fields
146148

Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
---
2+
title: "Mendix 9"
3+
url: /apidocs-mxsdk/apidocs/design-properties-9/
4+
description: "This API guide outlines how design properties work in Atlas UI and can help you create custom design properties."
5+
weight: 70
6+
---
7+
8+
## 1 Introduction
9+
10+
The Mendix Design Properties API allows you to create or extend design properties for your Mendix apps.
11+
12+
To use the API, you need to alter the *design-properties.json* file of a specific module in your application's **themesource** folder. This process is described in the [Design Properties Definitions](#design-properties-definitions) section below.
13+
14+
This guide outlines how design properties work and can help you create custom design properties. Many apps can simply use the Atlas UI theme and its included set of design properties to satisfy their styling needs. Atlas UI provides design properties that are built on top of the functionality described in this guide. So while design properties from Atlas UI are used as examples below, design properties themselves are not only for the Atlas UI theme. In fact, if you want to customize your styling more deeply, you will have to create your own custom design properties.
15+
16+
Design properties are a special set of settings shipped together with a Mendix theme module. Design properties are shared among all the Mendix apps which use a specific theme module.
17+
18+
In Studio Pro, you can see which design properties are available for a widget either in the **Properties** pane or in the widget's settings dialog box under the **Appearance** tab.
19+
20+
## 2 Using Design Properties
21+
22+
While styling Mendix apps, users must often apply the same set of CSS or native styling classes to widgets on different pages again and again. This work is time consuming and vulnerable to human error as you edit text fields in order to apply classes to a widget.
23+
24+
Design properties can make this work easier and safer. By configuring your own custom design properties, a certain styling can be applied to a widget in a few clicks.
25+
26+
## 3 Design Property Types
27+
28+
There are two types of design properties: **Toggle** and **Dropdown**. By default design properties have no effect on widgets. Styling is only applied when a **Toggle** property is turned on for a widget, or when one of the options is selected for a **Dropdown** property.
29+
30+
A **Toggle** design property is a simple property which may be turned on for a widget. When this property is set, configured classes are applied to a widget automatically. For example, a **Toggle** property may be a **Full width** property for Atlas UI button widgets. When this property is set for a button, then the `btn-block` CSS class is applied. No additional classes are applied if property is not set.
31+
32+
A design property of type **Dropdown** defines a set of options with separate classes per option. When one of the options is selected, the respective classes are applied to a widget. For example, a **Dropdown** property may be an Atlas UI **Align self** property. It contains two options: **Left** and **Right**. When one of these options is selected, then either the `pull-left` or `pull-right` CSS class is applied.
33+
34+
## 4 Design Properties Definitions {#design-properties-definitions}
35+
36+
Design properties are defined on a module level in **JSON** format. They are located in the module specific *themesource* folders (for more information, see the [File and Folder Structure](/howto/front-end/customize-styling-new/#file-and-folder) section of *How to Customize Styling*). Since styling works differently for web and native platforms, each platform's design properties are different and defined in two separate folders. Web styling is defined in *web/design-properties.json* file. Native styling is defined in the *native/design-properties.json* file.
37+
38+
Here is a simplified example of a design properties file:
39+
40+
```js
41+
{
42+
"DivContainer": [
43+
{
44+
"name": "My Toggle Property",
45+
"type": "Toggle",
46+
"description": "Description of My Toggle Design Property",
47+
"class": "hereMyClass"
48+
},
49+
{
50+
"name": "My Dropdown Property",
51+
"type": "Dropdown",
52+
"description": "Description of My Dropdown Design Property",
53+
"options": [
54+
{
55+
"name": "Styling option 1",
56+
"class": "stylingClassOne"
57+
},
58+
{
59+
"name": "Styling option 2",
60+
"class": "stylingClassTwo"
61+
}
62+
]
63+
}
64+
],
65+
"Button": [
66+
...
67+
]
68+
}
69+
```
70+
71+
### 4.1 Design Property Structure
72+
73+
Use this code to further simplify the above example:
74+
75+
```js
76+
{
77+
"DivContainer": [
78+
{
79+
... property one
80+
},
81+
{
82+
... property two
83+
}
84+
],
85+
"Button": [
86+
...
87+
]
88+
}
89+
```
90+
91+
As you can see from the structure above, design properties are defined as a *JSON* object where keys (`DivContainer` and `Button` for example) are widget types and values are *JSON* arrays containing sets of design properties applicable for that widget type. To learn more about this subject, see the [Widget Types](#widget-types) section below. Note that you can add multiple class names in a property.
92+
93+
Every design property from the array is also represented as a *JSON* object. As described earlier there are two types of design properties: **Toggle** and **Dropdown**. Both types share common fields such as `name`, `type`, and `description`. Those names determine how a design property appears to a user in Mendix Studio Pro. Below you can look at examples of design properties of both types.
94+
95+
Here is an example of a **Toggle** design property:
96+
97+
```js
98+
{
99+
"name": "My Toggle Property",
100+
"type": "Toggle",
101+
"description": "Description of My Toggle Design Property",
102+
"class": "hereMyClass"
103+
}
104+
```
105+
106+
This is how the **Toggle** design property appears:
107+
108+
{{< figure src="/attachments/apidocs-mxsdk/apidocs/design-properties/toggle.png" alt="Toggle property in Studio Pro" >}}
109+
110+
Here is an example of a **Dropdown** design property:
111+
112+
```js
113+
{
114+
"name": "My Dropdown Property",
115+
"type": "Dropdown",
116+
"description": "Description of My Dropdown Design Property",
117+
"options": [
118+
{
119+
"name": "Styling option 1",
120+
"class": "stylingClassOne"
121+
},
122+
{
123+
"name": "Styling option 2",
124+
"class": "stylingClassTwo"
125+
}
126+
]
127+
}
128+
```
129+
130+
This is how the **Dropdown** design property appears:
131+
132+
{{< figure src="/attachments/apidocs-mxsdk/apidocs/design-properties/dropdown.png" alt="Dropdown property in Studio Pro" max-width=80% >}}
133+
134+
#### 4.1.1 Common Fields
135+
136+
The examples above show that the fields `name` and `description` define the UI, the name of a form control in Studio Pro, and the description under it. They are arbitrary string values naming and describing a design property.
137+
138+
Field `type` defines the type of a property and can only take one of the two string values: `Toggle` or `Dropdown`.
139+
140+
{{% alert color="warning" %}}
141+
Name your design property and its options carefully. Those names cannot be changed easily when there are apps already using them.
142+
143+
If you want to rename a design property which is already being used in an app, see the [Renaming Design Properties](#old-names) section below.
144+
{{% /alert %}}
145+
146+
#### 4.1.2 Toggle-Specific Fields
147+
148+
When a type of design property is **Toggle** it should contain a `class` field on the top level of its property definition. This field defines an arbitrary class name to be applied if the option is toggled on for a widget. In the example above, the class to be applied is `hereMyClass`.
149+
150+
#### 4.1.3 Dropdown-Specific Fields
151+
152+
When a type of design property is **Dropdown** it should contain an `options` field which is an array of possible options for the design property. Every option must be an object with `name` and `class` fields. In the example above there are two options named **Styling option 1** and **Styling option 2**. They have the `stylingClassOne` and `stylingClassTwo` classes respectively.
153+
154+
### 4.2 Extending or Overriding Design Properties of Other Modules {#extend-existing-design-properties}
155+
156+
Design properties can be extended or overridden in other modules. For example, you can add a custom drop-down option to an Atlas design property or override the applied CSS class of a toggle property.
157+
158+
Overriding a design property can be useful when creating a theme module that builds on top of Atlas styling. To do this, simply add a design property for the same widget type in *themesource/{YOURTHEMEMODULE}/{WEB|NATIVE}/design-properties.json* using the same name and property type.
159+
160+
The precedence of design properties is determined by this compilation order of modules:
161+
162+
1. Non-UI Marketplace modules, in alphabetical order.
163+
1. UI resources modules, ordered as in **App Settings** > **Theme**.
164+
1. Non-UI user modules, ordered as in the Studio Pro App Explorer.
165+
166+
If multiple modules have a definition of a **Dropdown** property with the same name, the options will be ordered from high to low precedence (highest on top). If multiple modules have definitions of a **Toggle** property with the same name, the CSS class name from the module with the highest precedence will be applied when using the property.
167+
168+
{{% alert color="warning" %}}
169+
Note that having multiple definitions with different types (for example **Toggle** and **Dropdown**) is an invalid configuration and will result in a failure to load any design properties.
170+
{{% /alert %}}
171+
172+
## 5 Widget Types{#widget-types}
173+
174+
When defining design properties in your *JSON* file, you must specify which widget your properties apply to, as some design properties may only work with certain widgets.
175+
176+
{{% alert color="info" %}}
177+
Having a property that applies a table appearance style like **Stripped**, **Bordered**, or **Lined** only makes sense for widgets that contain tables, for example a data grid widget.
178+
{{% /alert %}}
179+
180+
Widget types are types defined in the [Model SDK](https://apidocs.rnd.mendix.com/modelsdk/latest/modules/pages.html) documentation. Every type which is a direct or an indirect subtype of type [`Widget`](https://apidocs.rnd.mendix.com/modelsdk/latest/classes/pages.widget.html) can have design properties attached to it. If a property is defined on a widget, then every subtype of this widget will have that property. For example if a property is defined on a `Widget` type, which is it the highest type in the hierarchy, then every widget will have this design property available.
181+
182+
### 5.1 Widget Types for Pluggable Widgets
183+
184+
When creating design properties for [Pluggable Widgets](/apidocs-mxsdk/apidocs/pluggable-widgets/), their widget type is determined by [widget id](/apidocs-mxsdk/apidocs/pluggable-widgets/#widget-id).
185+
186+
## 6 Renaming Design Properties{#old-names}
187+
188+
Sometimes you must rename design properties or their options which are already in use. As design properties are identified by names internally, renaming one may be a breaking change for apps that are already using those design properties.
189+
190+
To prevent errors and offer users simple upgrade paths, use an `oldNames` field. This field must be of type array and contain old names, a particular property, or an option that was known and used before. The order of old names in an `oldNames` list does not matter. For instance, if a property was renamed twice, the `oldNames` field should contain both previous names.
191+
192+
Example of a property and options that were renamed:
193+
194+
```js
195+
{
196+
"name": "My Dropdown Property",
197+
"oldNames": ["my Dropdown Propery"],
198+
"type": "Dropdown",
199+
"description": "Description of My Dropdown Design Property",
200+
"options": [
201+
{
202+
"name": "Styling option one",
203+
"class": "stylingClassOne"
204+
},
205+
{
206+
"name": "Styling option two",
207+
"oldNames": ["Stling option 2", "Styling option 2"],
208+
"class": "stylingClassTwo"
209+
}
210+
]
211+
}
212+
```
213+
214+
The design property above was renamed from **my Dropdown Propery** to **My Dropdown Property**. Also **Styling option two** was renamed twice from the old names **Stling option 2** and **Styling option 2**.
215+
216+
### 6.1 Renaming a Dropdown Option to a Toggle Property
217+
218+
{{% alert color="info" %}}
219+
This feature was introduced in Mendix 9.
220+
{{% /alert %}}
221+
222+
It is also possible to rename an option of a **Dropdown** property to a separate **Toggle** property. In this case, the old name of the **Toggle** property consists of the **Dropdown** property's name and the option's name separated by two colons. It is not required for the **Dropdown** property to still exist — it may have been removed entirely.
223+
224+
Here is an example of a **Toggle** property that was renamed from a **Dropdown** option:
225+
226+
```js
227+
{
228+
"name": "Styling 3",
229+
"oldNames": ["My Dropdown Property::Styling option 3"],
230+
"type: "Toggle",
231+
"description": "Description of Styling 3 toggle property",
232+
"class": "stylingClassThree"
233+
}
234+
```
235+
236+
The design property above is a replacement for the removed option **Styling option 3** of **My Dropdown Property** and will be set to **Yes** if that option was selected. The value of **My Dropdown Property** will then be set to empty if that design property still exists.
237+
238+
## 7 Read More
239+
240+
* [Native Styling](/refguide/mobile/designing-mobile-user-interfaces/native-styling/)
241+
* [Native Mobile Styling Reference Guide](/refguide/native-styling-refguide/)
242+
* [How to Extend Design Properties](/howto/front-end/extend-design-properties/)
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
title: "User Deactivation API"
3+
linktitle: "User Deactivation API"
4+
url: /apidocs-mxsdk/apidocs/user-deactivation-api/
5+
type: swagger
6+
description: "The User Deactivation API allows Mendix Admins to deactivate users within their company on the Mendix Platform."
7+
restapi: true
8+
weight: 112
9+
---
10+
11+
{{% alert color="warning" %}}
12+
The User Deactivation API is available for Mendix Admins.
13+
{{% /alert %}}
14+
15+
## Introduction
16+
17+
The User Deactivation API allows Mendix admins to deactivate users within their company on the Mendix Platform. You can use this API as part of your implementation of Joiner, Mover, and Leaver (JML) processes, for example, deactivation of users can be used to revoke access to the Mendix platform for certain 'movers' and for 'leavers'. In this way the API may help your company to comply with its access policies.
18+
19+
Note that this API only manages access to Mendix as a development platform. If you need to implement JML processes for end-users in your Mendix apps, it is recommended to add the [SCIM](/appstore/modules/scim/) module to your applications.
20+
21+
Once you have deactivated users, they will no longer be able to log in to the Mendix platform or use the Mendix platform API with a Personal Access Token (PAT).
22+
23+
As an alternative, you can use this API to deactivate platform users, instead of the deprecated User Management API.
24+
25+
This API enforces request rate limits to ensure optimal usage. Exceeding these limits results in a `429 Too Many Requests` error.
26+
27+
## Authentication
28+
29+
Authentication for the User Deactivation API uses a personal access token (PAT).
30+
31+
### Generating a PAT
32+
33+
To generate a PAT, see the [Personal Access Tokens](/community-tools/mendix-profile/user-settings/#pat) section of *User Settings*.
34+
35+
Select the following as **User Deactivation API** scopes:
36+
37+
* `mx:user-deactivation:write` – to deactivate users
38+
39+
Store the generated value `{GENERATED_PAT}` somewhere safe so you can use it to authorize your User Deactivation API.
40+
41+
### Using the PAT
42+
43+
Each request must contain an `Authorization` header with the value `MxToken {GENERATED_PAT}`. Here is an example:
44+
45+
```http
46+
PATCH /v1/platform-users/{uuid} HTTP/1.1
47+
Authorization: MxToken EKNJ…vk
48+
```
49+
50+
To authenticate calls when using the Open API specification below, click **Authorize** and use the value `MxToken {GENERATED_PAT}`.
51+
52+
## Prerequisites
53+
54+
You must have the UserID of the user you want to deactivate. Follow the steps below to retrieve the UUID of the user:
55+
56+
1. The Mendix Administrator creates a Personal Access Token (PAT) via the Developer Portal, with the following scope:
57+
`mx:mxid3:user-identifiers:uuid:read`
58+
2. Invoke the User Identifier API to fetch the UUID based on the user's email address, using the PAT generated in the above step.
59+
60+
## Examples
61+
62+
### Using the API to Deactivate User
63+
64+
{{% alert color="info" %}}Only Mendix Admins from the company have the authority to deactivate users.{{% /alert %}}
65+
66+
The following steps lead to deactivating the user based on the UUID provided as in {UUID}:
67+
68+
1. Set up your authentication PAT. You must be a Mendix Admin.
69+
1. Create a request body containing the active status, and provide a body like this:
70+
71+
```json
72+
{
73+
"active" : false
74+
}
75+
```
76+
77+
1. Call `PATCH /v1/platform-users/{UUID}` to deactivate the User with the provided {UUID}.
78+
79+
## API Reference
80+
81+
{{< swaggerui src="/openapi-spec/user-deactivation-api.yaml" >}}

0 commit comments

Comments
 (0)