@appsemble/lang-sdk 0.35.17 → 0.35.19

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appsemble/lang-sdk",
3
- "version": "0.35.17",
3
+ "version": "0.35.19",
4
4
  "description": "Language SDK for Appsemble",
5
5
  "keywords": [
6
6
  "app",
@@ -147,12 +147,13 @@ The result of this is a flow page where each page shows the question’s title.
147
147
  `,
148
148
  },
149
149
  page: {
150
- enum: ['data', 'url'],
150
+ enum: ['data', 'name', 'url'],
151
151
  description: `Gives actual information about the current page. This remapper gives access to the following
152
152
  information:
153
153
 
154
154
  - \`data\`: Current page data (FlowPage)
155
155
  - \`url\`: Full URL of the current page
156
+ - \`name\`: Translated name of the current page.
156
157
 
157
158
  Example:
158
159
 
package/remap.d.ts CHANGED
@@ -46,6 +46,10 @@ export interface RemapperContext {
46
46
  * Custom data that is available in the page.
47
47
  */
48
48
  pageData?: unknown;
49
+ /**
50
+ * Translated name of the current page.
51
+ */
52
+ pageName?: string;
49
53
  /**
50
54
  * The OpenID compatible userinfo object for the current app member.
51
55
  */
package/remap.js CHANGED
@@ -93,6 +93,9 @@ const mapperImplementations = {
93
93
  if (prop === 'url') {
94
94
  return context.url;
95
95
  }
96
+ if (prop === 'name') {
97
+ return context.pageName;
98
+ }
96
99
  throw new Error(`Unknown page property: ${prop}`);
97
100
  },
98
101
  context(prop, input, context) {
@@ -84,6 +84,11 @@ If this is omitted, a collapsable side navigation menu will be rendered on the l
84
84
  },
85
85
  },
86
86
  },
87
+ titleBarText: {
88
+ description: 'Whether to display app name or the page name in the title bar, displays pageName by default',
89
+ type: 'string',
90
+ enum: ['appName', 'pageName'],
91
+ },
87
92
  },
88
93
  };
89
94
  //# sourceMappingURL=AppLayoutDefinition.js.map
package/types/core.d.ts CHANGED
@@ -99,6 +99,11 @@ export interface AppDefinition {
99
99
  * The settings for displaying a tag in the header.
100
100
  */
101
101
  headerTag?: HeaderTag;
102
+ /**
103
+ * Whether to display app name or the page name in the title bar, displays pageName by default
104
+ *
105
+ */
106
+ titleBarText?: 'appName' | 'pageName';
102
107
  };
103
108
  /**
104
109
  * The strategy to use for apps to subscribe to push notifications.
@@ -97,8 +97,9 @@ export interface Remappers {
97
97
  *
98
98
  * - `data`: Get the current page data.
99
99
  * - `url`: Get the URL of the current page.
100
+ * - `name`: Get the translated name of the current page.
100
101
  */
101
- page: 'data' | 'url';
102
+ page: 'data' | 'name' | 'url';
102
103
  /**
103
104
  * Get a property from the context.
104
105
  */