You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/pluggable-widgets/pluggable-widgets-client-apis/_index.md
+161Lines changed: 161 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -489,6 +489,167 @@ if (selection.type === "Single") {
489
489
490
490
## Exposed Modules
491
491
492
+
### Session {#session}
493
+
494
+
The Mendix Platform exposes a `mendix/session` module for inspecting the current user session. It is available in both web and native.
Returns `true` if the current session is anonymous, `false` otherwise.
527
+
528
+
```ts
529
+
function isGuest():boolean;
530
+
```
531
+
532
+
#### getCSRFToken {#getcsrftoken}
533
+
534
+
Returns the CSRF token for the current session.
535
+
536
+
```ts
537
+
function getCSRFToken():string;
538
+
```
539
+
540
+
---
541
+
542
+
### Parser {#parser}
543
+
544
+
The Mendix Platform exposes a `mendix/parser` module that provides locale-aware formatting and parsing of attribute values. These functions use the same locale and formatting settings of the built-in Mendix widgets. It is available in both web and native.
|`MM`| Month in year, digit with leading zero | 01 |
627
+
|`MMM`| Month in year, abbreviated (context sensitive) | Nov |
628
+
|`MMMM`| Month in year (context sensitive) | November |
629
+
|`L`| Month in year, digit (standalone) | 1 |
630
+
|`LL`| Month in year, digit with leading zero (standalone) | 01 |
631
+
|`LLL`| Month in year, abbreviated (standalone) | Nov |
632
+
|`LLLL`| Month in year (standalone) | November |
633
+
|`yy`| Year, two digits | 01 |
634
+
|`yyyy`| Year, four digits | 2001 |
635
+
|`G`| Era designator | AD |
636
+
|`E`| Day name in week, abbreviated | Tue |
637
+
|`EEEE`| Day name in week | Tuesday |
638
+
|`u`| Day of week (1 = Monday, …, 7 = Sunday) | 5 |
639
+
|`w`| Week in year | 11 |
640
+
|`W`| Week in month | 2 |
641
+
|`D`| Day in year | 133 |
642
+
|`d`| Day in month | 7 |
643
+
|`F`| Day of week in month | 1 |
644
+
|`a`| AM/PM marker | PM |
645
+
|`H`| Hour in day (0–23) | 0 |
646
+
|`k`| Hour in day (1–24) | 24 |
647
+
|`K`| Hour in AM/PM (0–11) | 0 |
648
+
|`h`| Hour in AM/PM (1–12) | 12 |
649
+
|`m`| Minute in hour | 24 |
650
+
|`s`| Second in minute | 50 |
651
+
|`S`| Millisecond | 201 |
652
+
492
653
### Icon {#icon}
493
654
494
655
Mendix Platform exposes two versions of an `Icon` react component: `mendix/components/web/Icon` and `mendix/components/native/Icon`. Both components are useful helpers to render `WebIcon` and `NativeIcon` values respectively. They should be passed through an `icon` prop. The native `Icon` component additionally accepts `color` (`string`) and `size` (`number`) props.
0 commit comments