@dnncommunity/dnn-elements 0.15.1 → 0.15.2
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/dist/cjs/dnn-button_17.cjs.entry.js +3 -3
- package/dist/cjs/dnn-button_17.cjs.entry.js.map +1 -1
- package/dist/cjs/dnn.cjs.js +2 -2
- package/dist/cjs/dnn.cjs.js.map +1 -1
- package/dist/cjs/{index-514ef6dd.js → index-81382452.js} +404 -239
- package/dist/cjs/index-81382452.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/dnn-button/dnn-button.js +195 -192
- package/dist/collection/components/dnn-button/dnn-button.stories.js +1 -1
- package/dist/collection/components/dnn-checkbox/dnn-checkbox.js +85 -99
- package/dist/collection/components/dnn-checkbox/dnn-checkbox.stories.js +1 -1
- package/dist/collection/components/dnn-chevron/dnn-chevron.js +92 -87
- package/dist/collection/components/dnn-chevron/dnn-chevron.stories.js +1 -1
- package/dist/collection/components/dnn-collapsible/dnn-collapsible.js +102 -90
- package/dist/collection/components/dnn-collapsible/dnn-collapsible.stories.js +1 -1
- package/dist/collection/components/dnn-color-picker/dnn-color-picker.js +105 -141
- package/dist/collection/components/dnn-color-picker/dnn-color-picker.stories.js +1 -1
- package/dist/collection/components/dnn-dropzone/dnn-dropzone.js +122 -137
- package/dist/collection/components/dnn-dropzone/dnn-dropzone.stories.js +1 -1
- package/dist/collection/components/dnn-image-cropper/CornerType.js +1 -1
- package/dist/collection/components/dnn-image-cropper/dnn-image-cropper.js +129 -133
- package/dist/collection/components/dnn-image-cropper/dnn-image-cropper.stories.js +1 -1
- package/dist/collection/components/dnn-modal/dnn-modal.css +5 -0
- package/dist/collection/components/dnn-modal/dnn-modal.js +136 -133
- package/dist/collection/components/dnn-modal/dnn-modal.js.map +1 -1
- package/dist/collection/components/dnn-modal/dnn-modal.stories.js +1 -1
- package/dist/collection/components/dnn-permissions-grid/dnn-permissions-grid.js +164 -223
- package/dist/collection/components/dnn-permissions-grid/dnn-permissions-grid.stories.js +1 -1
- package/dist/collection/components/dnn-permissions-grid/localization-interface.js +1 -1
- package/dist/collection/components/dnn-permissions-grid/permissions-interface.js +1 -1
- package/dist/collection/components/dnn-permissions-grid/role-group-interface.js +1 -1
- package/dist/collection/components/dnn-permissions-grid/role-interface.js +1 -1
- package/dist/collection/components/dnn-permissions-grid/searched-user-interface.js +1 -1
- package/dist/collection/components/dnn-searchbox/dnn-searchbox.js +101 -94
- package/dist/collection/components/dnn-searchbox/dnn-searchbox.stories.js +1 -1
- package/dist/collection/components/dnn-sort-icon/dnn-sort-icon.js +55 -54
- package/dist/collection/components/dnn-sort-icon/dnn-sort-icon.stories.js +1 -1
- package/dist/collection/components/dnn-tab/dnn-tab.js +69 -59
- package/dist/collection/components/dnn-tab/dnn-tab.stories.js +1 -1
- package/dist/collection/components/dnn-tabs/dnn-tabs.js +19 -16
- package/dist/collection/components/dnn-tabs/dnn-tabs.stories.js +1 -1
- package/dist/collection/components/dnn-toggle/dnn-toggle.js +83 -75
- package/dist/collection/components/dnn-toggle/dnn-toggle.stories.js +1 -1
- package/dist/collection/components/dnn-toggle/toggle-interface.js +1 -1
- package/dist/collection/components/dnn-treeview-item/dnn-treeview-item.js +79 -77
- package/dist/collection/components/dnn-treeview-item/dnn-treeview-item.stories.js +1 -1
- package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.js +20 -24
- package/dist/collection/components/dnn-vertical-overflow-menu/dnn-vertical-overflow-menu.stories.js +1 -1
- package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.js +117 -111
- package/dist/collection/components/dnn-vertical-splitview/dnn-vertical-splitview.stories.js +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/collection/utilities/colorInfo.js +1 -1
- package/dist/collection/utilities/debounce.js +1 -1
- package/dist/collection/utilities/dnnServicesFramework.js +1 -1
- package/dist/collection/utilities/mouseUtilities.js +1 -1
- package/dist/dnn/dnn.esm.js +1 -1
- package/dist/dnn/dnn.esm.js.map +1 -1
- package/dist/dnn/dnn.js +2 -1
- package/dist/dnn/p-21f18e37.system.js +3 -0
- package/dist/dnn/p-21f18e37.system.js.map +1 -0
- package/dist/dnn/p-2a79ad5b.system.entry.js +11 -0
- package/dist/dnn/p-2a79ad5b.system.entry.js.map +1 -0
- package/dist/dnn/{p-5bcf3629.system.js → p-52139080.system.js} +2 -2
- package/dist/dnn/{p-5bcf3629.system.js.map → p-52139080.system.js.map} +1 -1
- package/dist/dnn/{p-909f2db9.entry.js → p-6cc227ab.entry.js} +3 -3
- package/dist/dnn/p-6cc227ab.entry.js.map +1 -0
- package/dist/dnn/p-97d752ed.js +3 -0
- package/dist/dnn/p-97d752ed.js.map +1 -0
- package/dist/esm/dnn-button_17.entry.js +3 -3
- package/dist/esm/dnn-button_17.entry.js.map +1 -1
- package/dist/esm/dnn.js +2 -2
- package/dist/esm/dnn.js.map +1 -1
- package/dist/esm/{index-59e0950f.js → index-e9a3fcad.js} +404 -239
- package/dist/esm/index-e9a3fcad.js.map +1 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm-es5/dnn-button_17.entry.js +2 -2
- package/dist/esm-es5/dnn-button_17.entry.js.map +1 -1
- package/dist/esm-es5/dnn.js +1 -1
- package/dist/esm-es5/dnn.js.map +1 -1
- package/dist/esm-es5/index-e9a3fcad.js +3 -0
- package/dist/esm-es5/index-e9a3fcad.js.map +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/loader.js.map +1 -1
- package/dist/types/components.d.ts +73 -17
- package/dist/types/stencil-public-runtime.d.ts +15 -4
- package/loader/package.json +1 -0
- package/package.json +14 -14
- package/dist/cjs/index-514ef6dd.js.map +0 -1
- package/dist/dnn/p-3155c8a8.system.entry.js +0 -11
- package/dist/dnn/p-3155c8a8.system.entry.js.map +0 -1
- package/dist/dnn/p-7ffdbed1.js +0 -2
- package/dist/dnn/p-7ffdbed1.js.map +0 -1
- package/dist/dnn/p-909f2db9.entry.js.map +0 -1
- package/dist/dnn/p-b8064287.system.js +0 -2
- package/dist/dnn/p-b8064287.system.js.map +0 -1
- package/dist/esm/index-59e0950f.js.map +0 -1
- package/dist/esm-es5/index-59e0950f.js +0 -2
- package/dist/esm-es5/index-59e0950f.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Host, h } from '@stencil/core';
|
|
2
2
|
export class DnnPermissionsGrid {
|
|
3
3
|
constructor() {
|
|
4
4
|
/** Optionally allows localizing the component strings. */
|
|
@@ -89,37 +89,15 @@ export class DnnPermissionsGrid {
|
|
|
89
89
|
renderRoleCheckBox(rolePermission, permissionDefinition) {
|
|
90
90
|
const item = rolePermission.permissions.filter(permission => permission.permissionId == permissionDefinition.permissionId)[0];
|
|
91
91
|
if (rolePermission.locked) {
|
|
92
|
-
return (h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" },
|
|
93
|
-
h("g", { fill: "none" },
|
|
94
|
-
h("path", { d: "M0 0h24v24H0V0z" }),
|
|
95
|
-
h("path", { d: "M0 0h24v24H0V0z", opacity: ".87" })),
|
|
96
|
-
h("path", { d: "M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z" })));
|
|
92
|
+
return (h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, h("g", { fill: "none" }, h("path", { d: "M0 0h24v24H0V0z" }), h("path", { d: "M0 0h24v24H0V0z", opacity: ".87" })), h("path", { d: "M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z" })));
|
|
97
93
|
}
|
|
98
94
|
const checked = item == undefined ? "intermediate" : item.allowAccess ? "checked" : "unchecked";
|
|
99
|
-
return (h("dnn-checkbox", { "use-intermediate": true, checked: checked, onCheckedchange: e => this.handleRoleChanged(e.detail, rolePermission, permissionDefinition) },
|
|
100
|
-
h("div", { slot: "intermediateicon" },
|
|
101
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" },
|
|
102
|
-
h("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
103
|
-
h("path", { d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" }))),
|
|
104
|
-
h("div", { slot: "uncheckedicon" },
|
|
105
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" },
|
|
106
|
-
h("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
107
|
-
h("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z" }))),
|
|
108
|
-
h("span", null, permissionDefinition.permissionName)));
|
|
95
|
+
return (h("dnn-checkbox", { "use-intermediate": true, checked: checked, onCheckedchange: e => this.handleRoleChanged(e.detail, rolePermission, permissionDefinition) }, h("div", { slot: "intermediateicon" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), h("path", { d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" }))), h("div", { slot: "uncheckedicon" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), h("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z" }))), h("span", null, permissionDefinition.permissionName)));
|
|
109
96
|
}
|
|
110
97
|
renderUserCheckBox(userPermission, permissionDefinition) {
|
|
111
98
|
const item = userPermission.permissions.filter(permission => permission.permissionId == permissionDefinition.permissionId)[0];
|
|
112
99
|
const checked = item == undefined ? "intermediate" : item.allowAccess ? "checked" : "unchecked";
|
|
113
|
-
return (h("dnn-checkbox", { "use-intermediate": true, checked: checked, onCheckedchange: e => this.handleUserChanged(e.detail, userPermission, permissionDefinition) },
|
|
114
|
-
h("div", { slot: "intermediateicon" },
|
|
115
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" },
|
|
116
|
-
h("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
117
|
-
h("path", { d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" }))),
|
|
118
|
-
h("div", { slot: "uncheckedicon" },
|
|
119
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" },
|
|
120
|
-
h("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
121
|
-
h("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z" }))),
|
|
122
|
-
h("span", null, permissionDefinition.permissionName)));
|
|
100
|
+
return (h("dnn-checkbox", { "use-intermediate": true, checked: checked, onCheckedchange: e => this.handleUserChanged(e.detail, userPermission, permissionDefinition) }, h("div", { slot: "intermediateicon" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), h("path", { d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" }))), h("div", { slot: "uncheckedicon" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), h("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z" }))), h("span", null, permissionDefinition.permissionName)));
|
|
123
101
|
}
|
|
124
102
|
handleRoleChanged(checked, rolePermission, permissionDefinition) {
|
|
125
103
|
switch (checked) {
|
|
@@ -313,219 +291,182 @@ export class DnnPermissionsGrid {
|
|
|
313
291
|
}
|
|
314
292
|
render() {
|
|
315
293
|
const filteredRoles = this.getRoles();
|
|
316
|
-
return (h(Host, null,
|
|
317
|
-
h("div", { class: "
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
h("option", { value: -2, selected: this.selectedRoleGroupId == -2 }, this.resx.AllRoles),
|
|
324
|
-
h("option", { value: -1, selected: this.selectedRoleGroupId == -1 }, this.resx.GlobalRoles),
|
|
325
|
-
this.roleGroups.map(roleGroup => h("option", { value: roleGroup.id, selected: this.selectedRoleGroupId == roleGroup.id }, roleGroup.name)))),
|
|
326
|
-
filteredRoles && filteredRoles.length > 0 && [
|
|
327
|
-
h("div", { class: "dropdown" },
|
|
328
|
-
h("label", null,
|
|
329
|
-
this.resx.SelectRole,
|
|
330
|
-
" :"),
|
|
331
|
-
h("select", { ref: el => this.roleDropDown = el }, this.getRoles().map(role => h("option", { value: role.RoleId }, role.RoleName)))),
|
|
332
|
-
h("dnn-button", { type: "primary", onClick: () => this.addRole() }, this.resx.Add)
|
|
333
|
-
]),
|
|
334
|
-
h("table", { class: "roles-table" },
|
|
335
|
-
h("caption", null, this.resx.RolePermissions),
|
|
336
|
-
h("thead", null,
|
|
337
|
-
h("tr", null,
|
|
338
|
-
h("th", null, this.resx.Role),
|
|
339
|
-
this.permissions.permissionDefinitions.map(permissionDefinition => h("th", null, permissionDefinition.permissionName)),
|
|
340
|
-
h("th", null, "\u00A0"))),
|
|
341
|
-
h("tbody", null, this.permissions.rolePermissions.map(rolePermission => h("tr", null,
|
|
342
|
-
h("th", null, rolePermission.roleName),
|
|
343
|
-
this.permissions.permissionDefinitions.map(permissionDefinition => h("td", null, this.renderRoleCheckBox(rolePermission, permissionDefinition))),
|
|
344
|
-
h("td", null, !rolePermission.default &&
|
|
345
|
-
h("button", { onClick: () => this.removeRole(rolePermission) },
|
|
346
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" },
|
|
347
|
-
h("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
348
|
-
h("path", { d: "M14.59 8L12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z" })))))))),
|
|
349
|
-
h("div", { class: "search-user" },
|
|
350
|
-
h("div", { class: "search-control" },
|
|
351
|
-
h("dnn-searchbox", { placeholder: this.resx.User, debounced: true, onQueryChanged: e => this.handleQueryChanged(e.detail), onKeyDown: e => this.handleSearchUserFieldKeyDown(e), query: this.userQuery }),
|
|
352
|
-
h("dnn-collapsible", { ref: el => this.userCollapsible = el },
|
|
353
|
-
h("div", { class: "dropdown" }, this.getFilteredUsers().map(searchedUser => h("button", { onKeyDown: e => this.handleSearchedUserKeyDown(e), onClick: () => this.handleUserPicked(searchedUser) }, searchedUser.displayName))))),
|
|
354
|
-
this.pickedUser &&
|
|
355
|
-
h("dnn-button", { onClick: () => this.addUser() }, this.resx.Add)),
|
|
356
|
-
this.permissions.userPermissions && this.permissions.userPermissions.length > 0 &&
|
|
357
|
-
h("table", { class: "users-table" },
|
|
358
|
-
h("caption", null, this.resx.UserPermissions),
|
|
359
|
-
h("thead", null,
|
|
360
|
-
h("tr", null,
|
|
361
|
-
h("th", null, this.resx.User),
|
|
362
|
-
this.permissions.permissionDefinitions.map(permissionDefinition => h("th", null, permissionDefinition.permissionName)),
|
|
363
|
-
h("th", null, "\u00A0"))),
|
|
364
|
-
h("tbody", null, this.permissions.userPermissions.map(userPermission => h("tr", null,
|
|
365
|
-
h("th", null, userPermission.displayName),
|
|
366
|
-
this.permissions.permissionDefinitions.map(permissionDefinition => h("td", null, this.renderUserCheckBox(userPermission, permissionDefinition))),
|
|
367
|
-
h("td", null,
|
|
368
|
-
h("button", { onClick: () => this.removeUser(userPermission) },
|
|
369
|
-
h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" },
|
|
370
|
-
h("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
|
|
371
|
-
h("path", { d: "M14.59 8L12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z" }))))))))));
|
|
294
|
+
return (h(Host, null, h("div", { class: "add-role-row" }, h("div", { class: "dropdown" }, h("label", null, this.resx.FilterByGroup, " :"), h("select", { onChange: e => this.handleRoleGroupChanged(e.target) }, h("option", { value: -2, selected: this.selectedRoleGroupId == -2 }, this.resx.AllRoles), h("option", { value: -1, selected: this.selectedRoleGroupId == -1 }, this.resx.GlobalRoles), this.roleGroups.map(roleGroup => h("option", { value: roleGroup.id, selected: this.selectedRoleGroupId == roleGroup.id }, roleGroup.name)))), filteredRoles && filteredRoles.length > 0 && [
|
|
295
|
+
h("div", { class: "dropdown" }, h("label", null, this.resx.SelectRole, " :"), h("select", { ref: el => this.roleDropDown = el }, this.getRoles().map(role => h("option", { value: role.RoleId }, role.RoleName)))),
|
|
296
|
+
h("dnn-button", { type: "primary", onClick: () => this.addRole() }, this.resx.Add)
|
|
297
|
+
]), h("table", { class: "roles-table" }, h("caption", null, this.resx.RolePermissions), h("thead", null, h("tr", null, h("th", null, this.resx.Role), this.permissions.permissionDefinitions.map(permissionDefinition => h("th", null, permissionDefinition.permissionName)), h("th", null, "\u00A0"))), h("tbody", null, this.permissions.rolePermissions.map(rolePermission => h("tr", null, h("th", null, rolePermission.roleName), this.permissions.permissionDefinitions.map(permissionDefinition => h("td", null, this.renderRoleCheckBox(rolePermission, permissionDefinition))), h("td", null, !rolePermission.default &&
|
|
298
|
+
h("button", { onClick: () => this.removeRole(rolePermission) }, h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), h("path", { d: "M14.59 8L12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z" })))))))), h("div", { class: "search-user" }, h("div", { class: "search-control" }, h("dnn-searchbox", { placeholder: this.resx.User, debounced: true, onQueryChanged: e => this.handleQueryChanged(e.detail), onKeyDown: e => this.handleSearchUserFieldKeyDown(e), query: this.userQuery }), h("dnn-collapsible", { ref: el => this.userCollapsible = el }, h("div", { class: "dropdown" }, this.getFilteredUsers().map(searchedUser => h("button", { onKeyDown: e => this.handleSearchedUserKeyDown(e), onClick: () => this.handleUserPicked(searchedUser) }, searchedUser.displayName))))), this.pickedUser &&
|
|
299
|
+
h("dnn-button", { onClick: () => this.addUser() }, this.resx.Add)), this.permissions.userPermissions && this.permissions.userPermissions.length > 0 &&
|
|
300
|
+
h("table", { class: "users-table" }, h("caption", null, this.resx.UserPermissions), h("thead", null, h("tr", null, h("th", null, this.resx.User), this.permissions.permissionDefinitions.map(permissionDefinition => h("th", null, permissionDefinition.permissionName)), h("th", null, "\u00A0"))), h("tbody", null, this.permissions.userPermissions.map(userPermission => h("tr", null, h("th", null, userPermission.displayName), this.permissions.permissionDefinitions.map(permissionDefinition => h("td", null, this.renderUserCheckBox(userPermission, permissionDefinition))), h("td", null, h("button", { onClick: () => this.removeUser(userPermission) }, h("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "#000000" }, h("path", { d: "M0 0h24v24H0V0z", fill: "none" }), h("path", { d: "M14.59 8L12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z" }))))))))));
|
|
372
301
|
}
|
|
373
302
|
static get is() { return "dnn-permissions-grid"; }
|
|
374
303
|
static get encapsulation() { return "shadow"; }
|
|
375
|
-
static get originalStyleUrls() {
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
"
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
304
|
+
static get originalStyleUrls() {
|
|
305
|
+
return {
|
|
306
|
+
"$": ["dnn-permissions-grid.scss"]
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
static get styleUrls() {
|
|
310
|
+
return {
|
|
311
|
+
"$": ["dnn-permissions-grid.css"]
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
static get properties() {
|
|
315
|
+
return {
|
|
316
|
+
"permissions": {
|
|
317
|
+
"type": "unknown",
|
|
318
|
+
"mutable": true,
|
|
319
|
+
"complexType": {
|
|
320
|
+
"original": "IPermissions",
|
|
321
|
+
"resolved": "IPermissions",
|
|
322
|
+
"references": {
|
|
323
|
+
"IPermissions": {
|
|
324
|
+
"location": "import",
|
|
325
|
+
"path": "./permissions-interface"
|
|
326
|
+
}
|
|
392
327
|
}
|
|
328
|
+
},
|
|
329
|
+
"required": true,
|
|
330
|
+
"optional": false,
|
|
331
|
+
"docs": {
|
|
332
|
+
"tags": [],
|
|
333
|
+
"text": "The list of permissions."
|
|
393
334
|
}
|
|
394
335
|
},
|
|
395
|
-
"
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
"
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
"original": "IRoleGroup[]",
|
|
407
|
-
"resolved": "IRoleGroup[]",
|
|
408
|
-
"references": {
|
|
409
|
-
"IRoleGroup": {
|
|
410
|
-
"location": "import",
|
|
411
|
-
"path": "./role-group-interface"
|
|
336
|
+
"roleGroups": {
|
|
337
|
+
"type": "unknown",
|
|
338
|
+
"mutable": false,
|
|
339
|
+
"complexType": {
|
|
340
|
+
"original": "IRoleGroup[]",
|
|
341
|
+
"resolved": "IRoleGroup[]",
|
|
342
|
+
"references": {
|
|
343
|
+
"IRoleGroup": {
|
|
344
|
+
"location": "import",
|
|
345
|
+
"path": "./role-group-interface"
|
|
346
|
+
}
|
|
412
347
|
}
|
|
348
|
+
},
|
|
349
|
+
"required": true,
|
|
350
|
+
"optional": false,
|
|
351
|
+
"docs": {
|
|
352
|
+
"tags": [],
|
|
353
|
+
"text": "The list of role groups."
|
|
413
354
|
}
|
|
414
355
|
},
|
|
415
|
-
"
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
"
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
"original": "IRole[]",
|
|
427
|
-
"resolved": "IRole[]",
|
|
428
|
-
"references": {
|
|
429
|
-
"IRole": {
|
|
430
|
-
"location": "import",
|
|
431
|
-
"path": "./role-interface"
|
|
356
|
+
"roles": {
|
|
357
|
+
"type": "unknown",
|
|
358
|
+
"mutable": false,
|
|
359
|
+
"complexType": {
|
|
360
|
+
"original": "IRole[]",
|
|
361
|
+
"resolved": "IRole[]",
|
|
362
|
+
"references": {
|
|
363
|
+
"IRole": {
|
|
364
|
+
"location": "import",
|
|
365
|
+
"path": "./role-interface"
|
|
366
|
+
}
|
|
432
367
|
}
|
|
368
|
+
},
|
|
369
|
+
"required": true,
|
|
370
|
+
"optional": false,
|
|
371
|
+
"docs": {
|
|
372
|
+
"tags": [],
|
|
373
|
+
"text": "The list of possible roles."
|
|
433
374
|
}
|
|
434
375
|
},
|
|
435
|
-
"
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
"
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
"original": "ILocalization",
|
|
447
|
-
"resolved": "ILocalization",
|
|
448
|
-
"references": {
|
|
449
|
-
"ILocalization": {
|
|
450
|
-
"location": "import",
|
|
451
|
-
"path": "./localization-interface"
|
|
376
|
+
"resx": {
|
|
377
|
+
"type": "unknown",
|
|
378
|
+
"mutable": false,
|
|
379
|
+
"complexType": {
|
|
380
|
+
"original": "ILocalization",
|
|
381
|
+
"resolved": "ILocalization",
|
|
382
|
+
"references": {
|
|
383
|
+
"ILocalization": {
|
|
384
|
+
"location": "import",
|
|
385
|
+
"path": "./localization-interface"
|
|
386
|
+
}
|
|
452
387
|
}
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
388
|
+
},
|
|
389
|
+
"required": false,
|
|
390
|
+
"optional": false,
|
|
391
|
+
"docs": {
|
|
392
|
+
"tags": [],
|
|
393
|
+
"text": "Optionally allows localizing the component strings."
|
|
394
|
+
},
|
|
395
|
+
"defaultValue": "{\n Add: \"Add\",\n AllRoles: \"All Roles\",\n FilterByGroup: \"Filter By Group\",\n GlobalRoles: \"Global Roles\",\n Role: \"Role\",\n RolePermissions: \"Role Permissions\",\n SelectRole: \"Select Role\",\n User: \"User\",\n UserPermissions: \"User Permissions\",\n }"
|
|
460
396
|
},
|
|
461
|
-
"
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
"path": "./searched-user-interface"
|
|
397
|
+
"foundUsers": {
|
|
398
|
+
"type": "unknown",
|
|
399
|
+
"mutable": false,
|
|
400
|
+
"complexType": {
|
|
401
|
+
"original": "ISearchedUser[]",
|
|
402
|
+
"resolved": "ISearchedUser[]",
|
|
403
|
+
"references": {
|
|
404
|
+
"ISearchedUser": {
|
|
405
|
+
"location": "import",
|
|
406
|
+
"path": "./searched-user-interface"
|
|
407
|
+
}
|
|
473
408
|
}
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
"defaultValue": "[]"
|
|
483
|
-
}
|
|
484
|
-
}; }
|
|
485
|
-
static get states() { return {
|
|
486
|
-
"selectedRoleGroupId": {},
|
|
487
|
-
"userQuery": {},
|
|
488
|
-
"pickedUser": {}
|
|
489
|
-
}; }
|
|
490
|
-
static get events() { return [{
|
|
491
|
-
"method": "userSearchQueryChanged",
|
|
492
|
-
"name": "userSearchQueryChanged",
|
|
493
|
-
"bubbles": true,
|
|
494
|
-
"cancelable": true,
|
|
495
|
-
"composed": true,
|
|
496
|
-
"docs": {
|
|
497
|
-
"tags": [],
|
|
498
|
-
"text": "Fires when searching for users to add to the permissions. Emits the search query."
|
|
499
|
-
},
|
|
500
|
-
"complexType": {
|
|
501
|
-
"original": "string",
|
|
502
|
-
"resolved": "string",
|
|
503
|
-
"references": {}
|
|
409
|
+
},
|
|
410
|
+
"required": false,
|
|
411
|
+
"optional": false,
|
|
412
|
+
"docs": {
|
|
413
|
+
"tags": [],
|
|
414
|
+
"text": "The list of users to show under the search users field when a search is performed."
|
|
415
|
+
},
|
|
416
|
+
"defaultValue": "[]"
|
|
504
417
|
}
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
"
|
|
510
|
-
"
|
|
511
|
-
"
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
"
|
|
517
|
-
"
|
|
518
|
-
"
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
static get states() {
|
|
421
|
+
return {
|
|
422
|
+
"selectedRoleGroupId": {},
|
|
423
|
+
"userQuery": {},
|
|
424
|
+
"pickedUser": {}
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
static get events() {
|
|
428
|
+
return [{
|
|
429
|
+
"method": "userSearchQueryChanged",
|
|
430
|
+
"name": "userSearchQueryChanged",
|
|
431
|
+
"bubbles": true,
|
|
432
|
+
"cancelable": true,
|
|
433
|
+
"composed": true,
|
|
434
|
+
"docs": {
|
|
435
|
+
"tags": [],
|
|
436
|
+
"text": "Fires when searching for users to add to the permissions. Emits the search query."
|
|
437
|
+
},
|
|
438
|
+
"complexType": {
|
|
439
|
+
"original": "string",
|
|
440
|
+
"resolved": "string",
|
|
441
|
+
"references": {}
|
|
442
|
+
}
|
|
443
|
+
}, {
|
|
444
|
+
"method": "permissionsChanged",
|
|
445
|
+
"name": "permissionsChanged",
|
|
446
|
+
"bubbles": true,
|
|
447
|
+
"cancelable": true,
|
|
448
|
+
"composed": true,
|
|
449
|
+
"docs": {
|
|
450
|
+
"tags": [],
|
|
451
|
+
"text": "Fires when any permissions have changed, can be used for instance to have linked permissions."
|
|
452
|
+
},
|
|
453
|
+
"complexType": {
|
|
454
|
+
"original": "IPermissions",
|
|
455
|
+
"resolved": "IPermissions",
|
|
456
|
+
"references": {
|
|
457
|
+
"IPermissions": {
|
|
458
|
+
"location": "import",
|
|
459
|
+
"path": "./permissions-interface"
|
|
460
|
+
}
|
|
522
461
|
}
|
|
523
462
|
}
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
static get watchers() {
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
463
|
+
}];
|
|
464
|
+
}
|
|
465
|
+
static get watchers() {
|
|
466
|
+
return [{
|
|
467
|
+
"propName": "foundUsers",
|
|
468
|
+
"methodName": "handleFoundUsersChanged"
|
|
469
|
+
}];
|
|
470
|
+
}
|
|
530
471
|
}
|
|
531
|
-
//# sourceMappingURL=dnn-permissions-grid.js.map
|
|
472
|
+
//# sourceMappingURL=dnn-permissions-grid.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=role-group-interface.js.map
|
|
2
|
+
//# sourceMappingURL=role-group-interface.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=role-interface.js.map
|
|
2
|
+
//# sourceMappingURL=role-interface.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=searched-user-interface.js.map
|
|
2
|
+
//# sourceMappingURL=searched-user-interface.js.map
|