diff --git a/packages/builder/rollup.config.js b/packages/builder/rollup.config.js
index 9af67db34a..183dba265c 100644
--- a/packages/builder/rollup.config.js
+++ b/packages/builder/rollup.config.js
@@ -16,17 +16,20 @@ const _builderProxy = proxy("/_builder", {
pathRewrite: { "^/_builder": "" },
})
-const apiProxy = proxy(["/_builder/assets/**", "/_builder/api/**", "/_builder/**/componentlibrary"], {
- target,
- logLevel: "debug",
- changeOrigin: true,
- cookieDomainRewrite: true,
- onProxyReq(proxyReq) {
- if (proxyReq.getHeader("origin")) {
- proxyReq.setHeader("origin", target)
- }
- },
-})
+const apiProxy = proxy(
+ ["/_builder/assets/**", "/_builder/api/**", "/_builder/**/componentlibrary"],
+ {
+ target,
+ logLevel: "debug",
+ changeOrigin: true,
+ cookieDomainRewrite: true,
+ onProxyReq(proxyReq) {
+ if (proxyReq.getHeader("origin")) {
+ proxyReq.setHeader("origin", target)
+ }
+ },
+ }
+)
const production = !process.env.ROLLUP_WATCH
diff --git a/packages/builder/src/accessLevels/AccessLevelView.svelte b/packages/builder/src/accessLevels/AccessLevelView.svelte
index a21f768d7f..e5423db018 100644
--- a/packages/builder/src/accessLevels/AccessLevelView.svelte
+++ b/packages/builder/src/accessLevels/AccessLevelView.svelte
@@ -24,12 +24,18 @@
((!p2.nodeKey && !p1.nodeKey) || p2.nodeKey === p1.nodeKey)
const hasPermission = hasPerm =>
- some(p => matchPermissions(p, hasPerm))(clonedLevel.permissions)
+ clonedLevel.permissions.some(permission =>
+ matchPermissions(permission, hasPerm)
+ )
- $: permissionMatrix = map(p => ({
- permission: p,
- hasPermission: hasPermission(p),
- }))(allPermissions)
+ $: permissionMatrix = allPermissions.map(permission => ({
+ permission,
+ hasPermission: hasPermission(permission),
+ }))
+
+ $: allPermissionsSelected = permissionMatrix.every(
+ permission => permission.hasPermission
+ )
const getPermissionName = perm =>
perm.nodeKey ? `${perm.type} - ${perm.nodeKey}` : perm.type
@@ -37,7 +43,7 @@
const save = () => {
const newLevels = isNew
? [...allLevels, clonedLevel]
- : [...filter(l => l.name !== level.name)(allLevels), clonedLevel]
+ : [...allLevels.filter(l => l.name !== level.name), clonedLevel]
errors = validateAccessLevels(hierarchy, actions, newLevels)
@@ -56,6 +62,7 @@
clonedLevel.permissions
)
}
+ allPermissions = allPermissions
}
@@ -68,6 +75,15 @@
Permissions
+
+ {
+ permissionMatrix.forEach(permission =>
+ permissionChanged(permission.permission)(ev)
+ )
+ }} />
{#each permissionMatrix as permission}
.permission-container {
+ margin-top: 10px;
margin-bottom: 10px;
}
diff --git a/packages/builder/src/common/Select.svelte b/packages/builder/src/common/Select.svelte
index 0e09bc7d2b..e360c1c4d6 100644
--- a/packages/builder/src/common/Select.svelte
+++ b/packages/builder/src/common/Select.svelte
@@ -4,7 +4,7 @@
-
-
-
+ Create Screen
+ Cancel
diff --git a/packages/materialdesign-components/src/Templates/indexDatatable.js b/packages/materialdesign-components/src/Templates/indexDatatable.js
index 798a9061ba..4042ec18c0 100644
--- a/packages/materialdesign-components/src/Templates/indexDatatable.js
+++ b/packages/materialdesign-components/src/Templates/indexDatatable.js
@@ -38,10 +38,10 @@ const tableProps = (index, indexSchema) => ({
"##eventHandlerType": "List Records",
parameters: {
indexKey: "/all_contacts",
- statePath: "all_contacts"
- }
- }
- ]
+ statePath: "all_contacts",
+ },
+ },
+ ],
})
const columnHeaders = indexSchema =>
diff --git a/packages/server/middleware/routers.js b/packages/server/middleware/routers.js
index 08169463ab..3d07ac29d9 100644
--- a/packages/server/middleware/routers.js
+++ b/packages/server/middleware/routers.js
@@ -309,26 +309,20 @@ module.exports = (config, app) => {
})
.post("/:appname/api/listRecords/*", async ctx => {
const indexkey = getRecordKey(ctx.params.appname, ctx.request.path)
- ctx.body = await ctx.instance.indexApi.listItems(
- indexkey,
- {
- rangeStartParams: ctx.request.body.rangeStartParams,
- rangeEndParams: ctx.request.body.rangeEndParams,
- searchPhrase: ctx.request.body.searchPhrase,
- }
- )
+ ctx.body = await ctx.instance.indexApi.listItems(indexkey, {
+ rangeStartParams: ctx.request.body.rangeStartParams,
+ rangeEndParams: ctx.request.body.rangeEndParams,
+ searchPhrase: ctx.request.body.searchPhrase,
+ })
ctx.response.status = StatusCodes.OK
})
.post("/:appname/api/aggregates/*", async ctx => {
const indexkey = getRecordKey(ctx.params.appname, ctx.request.path)
- ctx.body = await ctx.instance.indexApi.aggregates(
- indexkey,
- {
- rangeStartParams: ctx.request.body.rangeStartParams,
- rangeEndParams: ctx.request.body.rangeEndParams,
- searchPhrase: ctx.request.body.searchPhrase,
- }
- )
+ ctx.body = await ctx.instance.indexApi.aggregates(indexkey, {
+ rangeStartParams: ctx.request.body.rangeStartParams,
+ rangeEndParams: ctx.request.body.rangeEndParams,
+ searchPhrase: ctx.request.body.searchPhrase,
+ })
ctx.response.status = StatusCodes.OK
})
.post("/:appname/api/files/*", async ctx => {
diff --git a/packages/server/utilities/createAppPackage.js b/packages/server/utilities/createAppPackage.js
index 60a2d9d8a1..3aaa6ce09f 100644
--- a/packages/server/utilities/createAppPackage.js
+++ b/packages/server/utilities/createAppPackage.js
@@ -30,7 +30,10 @@ module.exports.appsFolder = config => appPackageFolder(config, "")
module.exports.masterAppPackage = context => {
const { config } = context
- const standardPackage = createAppPackage(context, `${__dirname}/../appPackages/_master`)
+ const standardPackage = createAppPackage(
+ context,
+ `${__dirname}/../appPackages/_master`
+ )
const customizeMaster =
config && config.customizeMaster ? config.customizeMaster : a => a