@genesislcap/foundation-entity-management 14.174.0 → 14.176.0
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/custom-elements.json +221 -68
- package/dist/dts/entities/entities.d.ts +37 -4
- package/dist/dts/entities/entities.d.ts.map +1 -1
- package/dist/dts/entities/entities.styles.d.ts.map +1 -1
- package/dist/dts/entities/entities.template.d.ts +4 -2
- package/dist/dts/entities/entities.template.d.ts.map +1 -1
- package/dist/dts/list/list.d.ts +6 -0
- package/dist/dts/list/list.d.ts.map +1 -1
- package/dist/dts/list/list.template.d.ts +2 -0
- package/dist/dts/list/list.template.d.ts.map +1 -1
- package/dist/dts/users/users.d.ts +12 -5
- package/dist/dts/users/users.d.ts.map +1 -1
- package/dist/dts/users/users.template.d.ts +4 -2
- package/dist/dts/users/users.template.d.ts.map +1 -1
- package/dist/esm/entities/entities.js +22 -5
- package/dist/esm/entities/entities.styles.js +3 -1
- package/dist/esm/entities/entities.template.js +20 -13
- package/dist/esm/list/list.js +15 -4
- package/dist/esm/list/list.template.js +10 -6
- package/dist/esm/users/users.js +9 -1
- package/dist/esm/users/users.template.js +6 -1
- package/dist/foundation-entity-management.api.json +90 -0
- package/dist/foundation-entity-management.d.ts +49 -9
- package/docs/api/foundation-entity-management.entitymanagement.md +2 -0
- package/docs/api/foundation-entity-management.entitymanagement.prefix.md +13 -0
- package/docs/api/foundation-entity-management.entitymanagement.rowselection.md +18 -0
- package/docs/api/foundation-entity-management.users.md +1 -0
- package/docs/api/foundation-entity-management.users.prefix.md +13 -0
- package/docs/api-report.md +3 -0
- package/package.json +21 -21
|
@@ -80,6 +80,9 @@ declare const Users_base: (new (...args: any[]) => {
|
|
|
80
80
|
readonly part: DOMTokenList;
|
|
81
81
|
readonly prefix: string;
|
|
82
82
|
readonly scrollHeight: number;
|
|
83
|
+
/**
|
|
84
|
+
* String which contains event if we have permission to update user of empty string if not
|
|
85
|
+
*/
|
|
83
86
|
scrollLeft: number;
|
|
84
87
|
scrollTop: number;
|
|
85
88
|
readonly scrollWidth: number;
|
|
@@ -90,10 +93,7 @@ declare const Users_base: (new (...args: any[]) => {
|
|
|
90
93
|
closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2];
|
|
91
94
|
closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3];
|
|
92
95
|
closest<E extends Element = Element>(selectors: string): E;
|
|
93
|
-
getAttribute(qualifiedName: string): string;
|
|
94
|
-
* Definition of the `DATASERVER` query which is used when managing Counterpartys
|
|
95
|
-
* @internal
|
|
96
|
-
*/
|
|
96
|
+
getAttribute(qualifiedName: string): string;
|
|
97
97
|
getAttributeNS(namespace: string, localName: string): string;
|
|
98
98
|
getAttributeNames(): string[];
|
|
99
99
|
getAttributeNode(qualifiedName: string): Attr;
|
|
@@ -157,7 +157,9 @@ declare const Users_base: (new (...args: any[]) => {
|
|
|
157
157
|
isDefaultNamespace(namespace: string): boolean;
|
|
158
158
|
isEqualNode(otherNode: Node): boolean;
|
|
159
159
|
isSameNode(otherNode: Node): boolean;
|
|
160
|
-
lookupNamespaceURI(prefix: string): string;
|
|
160
|
+
lookupNamespaceURI(prefix: string): string; /**
|
|
161
|
+
* @internal
|
|
162
|
+
*/
|
|
161
163
|
lookupPrefix(namespace: string): string;
|
|
162
164
|
normalize(): void;
|
|
163
165
|
removeChild<T_3 extends Node>(child: T_3): T_3;
|
|
@@ -424,6 +426,11 @@ export declare class Users extends Users_base {
|
|
|
424
426
|
* @internal
|
|
425
427
|
*/
|
|
426
428
|
datasourceConfig: DatasourceConfiguration;
|
|
429
|
+
/**
|
|
430
|
+
* Name of the design system prefix that will be used for components.
|
|
431
|
+
* @public
|
|
432
|
+
*/
|
|
433
|
+
prefix: string;
|
|
427
434
|
/**
|
|
428
435
|
* Configuring the resourceName from the entity-management, set to manage the users resource specifically
|
|
429
436
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../src/users/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAItD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAA4B,WAAW,EAAc,MAAM,yBAAyB,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAQtD;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;IAoC7B,CAAC
|
|
1
|
+
{"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../../src/users/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAItD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAA4B,WAAW,EAAc,MAAM,yBAAyB,CAAC;AAC5F,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAQtD;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;IAoC7B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgLA;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDAmIH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AArTL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,qBASa,KAAM,SAAQ,UAA2B;IACpD;;;;;;;;OAQG;IACM,OAAO,CAAC,OAAO,CAAU;IAElC;;;;;;;;OAQG;IACG,OAAO,CAAC,IAAI,CAAO;IAEzB;;;;;;;OAOG;IACS,gBAAgB,EAAE,uBAAuB,CAAC;IAEtD;;;OAGG;IAC0C,MAAM,EAAE,MAAM,CAAU;IAErE;;;OAGG;IACG,YAAY,SAAe;IAEjC;;;;;;;;;OASG;IAC8C,qBAAqB,EAAE,MAAM,CAClD;IAE5B;;;OAGG;IACwD,eAAe,EAAE,OAAO,CAAS;IAE5F;;;OAGG;IACS,WAAW,EAAE,WAAW,CAAC;IAErC;;;;;OAKG;IACI,YAAY;;;;;;;;;IAYnB;;;;;OAKG;IACI,YAAY;;;;;IAYnB;;OAEG;IACS,OAAO,EAAE,GAAG,CAAqB;IAEjC,sBAAsB,EAAE,GAAG,CAAM;IACjC,sBAAsB,EAAE,GAAG,CAAM;IAEjC,aAAa,EAAE,OAAO,CAAC;IACnC,OAAO,CAAC,aAAa,CAAS;IAE9B;;OAEG;IACS,WAAW,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACS,WAAW,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACS,WAAW,EAAE,MAAM,CAAC;IAEhC;;;OAGG;IACG,QAAQ,EAAE,MAAM,CAAqB;IAE3C;;;OAGG;IACG,cAAc,EAAE,MAAM,CAAU;IAEtC;;;OAGG;IACG,WAAW,EAAE,MAAM,CAAkB;IAE3C;;;OAGG;IACG,yBAAyB,EAAE,MAAM,CAAuB;IAE9D;;OAEG;;IAaG,iBAAiB;IAcd,SAAS,IAAI,IAAI;IAe1B;;;OAGG;IACH,sBAAsB,CAAC,MAAM,KAAA;;;;;;;;IAW7B;;;;;;;;OAQG;IACG,YAAY,CAAC,MAAM,KAAA;IAoCzB;;OAEG;IACG,YAAY,CAAC,IAAI,KAAA;;;;;;;;;;;;;;;CAwBxB"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const
|
|
1
|
+
import { Users } from './users';
|
|
2
|
+
export declare const getPrefixedUsers: (prefix: any) => import("@microsoft/fast-element").ViewTemplate<Users, any>;
|
|
3
|
+
/** @internal */
|
|
4
|
+
export declare const UsersTemplate: import("@microsoft/fast-element").ViewTemplate<Users, any>;
|
|
3
5
|
//# sourceMappingURL=users.template.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"users.template.d.ts","sourceRoot":"","sources":["../../../src/users/users.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"users.template.d.ts","sourceRoot":"","sources":["../../../src/users/users.template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAoFhC,eAAO,MAAM,gBAAgB,6EAqC5B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,aAAa,4DAEzB,CAAC"}
|
|
@@ -42,6 +42,11 @@ import { defaultHeader, searchBarHeader, template } from './entities.template';
|
|
|
42
42
|
let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement) {
|
|
43
43
|
constructor() {
|
|
44
44
|
super(...arguments);
|
|
45
|
+
/**
|
|
46
|
+
* Name of the design system prefix that will be used in renderers.
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
this.prefix = 'zero';
|
|
45
50
|
/**
|
|
46
51
|
* Label for the entity which has usages such as being shown in the title of the modal wen editing the entity
|
|
47
52
|
* @public
|
|
@@ -65,6 +70,12 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
|
|
|
65
70
|
* @public
|
|
66
71
|
*/
|
|
67
72
|
this.asyncUpdate = true;
|
|
73
|
+
/**
|
|
74
|
+
* This attribute allows you to change row-selection to 'single' or 'multiple' which will allow you to select single or multiple rows.
|
|
75
|
+
* @remarks Defaults to single
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
78
|
+
this.rowSelection = 'single';
|
|
68
79
|
/**
|
|
69
80
|
* If false, will disable cell flashing for all cells by default, unless otherwise defined in custom colDef
|
|
70
81
|
* @remarks Defaults to true
|
|
@@ -260,7 +271,7 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
|
|
|
260
271
|
this.editModalVisible = false;
|
|
261
272
|
}
|
|
262
273
|
get headerTempalate() {
|
|
263
|
-
return this.enableSearchBar ? searchBarHeader : defaultHeader;
|
|
274
|
+
return this.enableSearchBar ? searchBarHeader(this.prefix) : defaultHeader(this.prefix);
|
|
264
275
|
}
|
|
265
276
|
searchChanged(event) {
|
|
266
277
|
const options = event.detail;
|
|
@@ -293,7 +304,7 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
|
|
|
293
304
|
type: 'error',
|
|
294
305
|
},
|
|
295
306
|
},
|
|
296
|
-
},
|
|
307
|
+
}, this.prefix);
|
|
297
308
|
}
|
|
298
309
|
else {
|
|
299
310
|
showNotification({
|
|
@@ -305,7 +316,7 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
|
|
|
305
316
|
confirmingActions: [{ label: '', action: () => { } }],
|
|
306
317
|
},
|
|
307
318
|
},
|
|
308
|
-
},
|
|
319
|
+
}, this.prefix);
|
|
309
320
|
}
|
|
310
321
|
});
|
|
311
322
|
}
|
|
@@ -350,7 +361,7 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
|
|
|
350
361
|
dismissingAction: { label: 'Dismiss', action: () => (this.selectedEntity = null) },
|
|
351
362
|
confirmingActions: [{ label: 'Confirm', action: () => this.confirmDelete() }],
|
|
352
363
|
},
|
|
353
|
-
},
|
|
364
|
+
}, this.prefix);
|
|
354
365
|
}
|
|
355
366
|
/**
|
|
356
367
|
* Show notifications if the executed event returned an error.
|
|
@@ -367,7 +378,7 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
|
|
|
367
378
|
config: {
|
|
368
379
|
toast: { type: 'warning', autoClose: true, closeTimeout: notificationCloseTimeout },
|
|
369
380
|
},
|
|
370
|
-
},
|
|
381
|
+
}, this.prefix);
|
|
371
382
|
});
|
|
372
383
|
}
|
|
373
384
|
}
|
|
@@ -375,6 +386,9 @@ let EntityManagement = class EntityManagement extends LifecycleMixin(FASTElement
|
|
|
375
386
|
__decorate([
|
|
376
387
|
Connect
|
|
377
388
|
], EntityManagement.prototype, "connect", void 0);
|
|
389
|
+
__decorate([
|
|
390
|
+
attr({ attribute: 'design-system-prefix' })
|
|
391
|
+
], EntityManagement.prototype, "prefix", void 0);
|
|
378
392
|
__decorate([
|
|
379
393
|
attr
|
|
380
394
|
], EntityManagement.prototype, "resourceName", void 0);
|
|
@@ -411,6 +425,9 @@ __decorate([
|
|
|
411
425
|
__decorate([
|
|
412
426
|
attr({ mode: 'boolean', attribute: 'async-update' })
|
|
413
427
|
], EntityManagement.prototype, "asyncUpdate", void 0);
|
|
428
|
+
__decorate([
|
|
429
|
+
attr({ attribute: 'row-selection' })
|
|
430
|
+
], EntityManagement.prototype, "rowSelection", void 0);
|
|
414
431
|
__decorate([
|
|
415
432
|
attr({ mode: 'boolean', attribute: 'enable-cell-flashing' })
|
|
416
433
|
], EntityManagement.prototype, "enableCellFlashing", void 0);
|
|
@@ -39,9 +39,11 @@ export const styles = css `
|
|
|
39
39
|
.search-container {
|
|
40
40
|
display: flex;
|
|
41
41
|
align-items: center;
|
|
42
|
+
gap: calc(var(--design-unit) * 2px);
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
.search-container zero-search-bar
|
|
45
|
+
.search-container zero-search-bar,
|
|
46
|
+
.search-container rapid-search-bar {
|
|
45
47
|
width: 500px;
|
|
46
48
|
}
|
|
47
49
|
`;
|
|
@@ -8,31 +8,31 @@ Form;
|
|
|
8
8
|
* Default header for Entity Management screen
|
|
9
9
|
* @internal
|
|
10
10
|
*/
|
|
11
|
-
export const defaultHeader = html `
|
|
11
|
+
export const defaultHeader = (prefix) => html `
|
|
12
12
|
<h3>${(x) => x.title}</h3>
|
|
13
13
|
${when((x) => x.createEvent, html `
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
<${prefix}-button appearance="neutral" @click=${(x, y) => x.createEntity()}>
|
|
15
|
+
<${prefix}-icon size="lg" name="plus"></${prefix}-icon>
|
|
16
16
|
Add
|
|
17
|
-
|
|
17
|
+
</${prefix}-button>
|
|
18
18
|
`)}
|
|
19
19
|
`;
|
|
20
20
|
/**
|
|
21
21
|
* Header with search-bar for Entity Management screen
|
|
22
22
|
* @internal
|
|
23
23
|
*/
|
|
24
|
-
export const searchBarHeader = html `
|
|
24
|
+
export const searchBarHeader = (prefix) => html `
|
|
25
25
|
<h3>${(x) => x.title}</h3>
|
|
26
26
|
<div class="search-container">
|
|
27
|
-
|
|
27
|
+
<${prefix}-search-bar
|
|
28
28
|
:options="${(x) => x.searchBarConfig}"
|
|
29
29
|
@selectionChange=${(x, ctx) => x.searchChanged(customEvent(ctx))}
|
|
30
|
-
|
|
30
|
+
></${prefix}-search-bar>
|
|
31
31
|
${when((x) => x.createEvent, html `
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
<${prefix}-button appearance="neutral" @click=${(x, y) => x.createEntity()}>
|
|
33
|
+
<${prefix}-icon size="lg" name="plus"></${prefix}-icon>
|
|
34
34
|
Add
|
|
35
|
-
|
|
35
|
+
</${prefix}-button>
|
|
36
36
|
`)}
|
|
37
37
|
</div>
|
|
38
38
|
`;
|
|
@@ -40,7 +40,7 @@ export const searchBarHeader = html `
|
|
|
40
40
|
* Defines the html of the entity component as a ViewTemplate object
|
|
41
41
|
* @typeParam EntityManagement - the {@link EntityManagement | class} the template is defined for
|
|
42
42
|
*/
|
|
43
|
-
export const
|
|
43
|
+
export const getPrefixedEntities = (prefix) => html `
|
|
44
44
|
<div class="container">
|
|
45
45
|
<slot name="header" part="header">${(x) => x.headerTempalate}</slot>
|
|
46
46
|
<entity-list
|
|
@@ -51,6 +51,7 @@ export const template = html `
|
|
|
51
51
|
enable-cell-flashing=${(x) => x.enableCellFlashing}
|
|
52
52
|
enable-row-flashing=${(x) => x.enableRowFlashing}
|
|
53
53
|
persist-column-state-key=${(x) => x.persistColumnStateKey}
|
|
54
|
+
row-selection=${(x) => x.rowSelection}
|
|
54
55
|
size-columns-to-fit=${(x) => x.sizeColumnsToFit}
|
|
55
56
|
enable-filter-bar=${(x) => x.enableFilterBar}
|
|
56
57
|
resourceName=${(x) => x.resourceName}
|
|
@@ -59,6 +60,7 @@ export const template = html `
|
|
|
59
60
|
:gridOptions=${(x) => x.gridOptions}
|
|
60
61
|
:columns=${(x) => x.columns}
|
|
61
62
|
:datasourceConfig=${(x) => x.datasourceConfig}
|
|
63
|
+
design-system-prefix=${prefix}
|
|
62
64
|
data-test-id="entity-list"
|
|
63
65
|
hide-edit=${(x) => x.hideEdit}
|
|
64
66
|
hide-delete=${(x) => x.hideDelete}
|
|
@@ -66,7 +68,7 @@ export const template = html `
|
|
|
66
68
|
>
|
|
67
69
|
<slot name="header" slot="header">${defaultHeader}</slot>
|
|
68
70
|
</entity-list>
|
|
69
|
-
|
|
71
|
+
<${prefix}-modal
|
|
70
72
|
${ref('editEntityModal')}
|
|
71
73
|
position=${(x) => x.modalPosition}
|
|
72
74
|
:onCloseCallback=${(x) => x.closeModal.bind(x)}
|
|
@@ -81,12 +83,17 @@ export const template = html `
|
|
|
81
83
|
:renderers=${(x) => x.formRenderers}
|
|
82
84
|
resourceName=${(x) => x.formResourceName}
|
|
83
85
|
:data=${(x) => x.editedEntity}
|
|
86
|
+
design-system-prefix=${prefix}
|
|
84
87
|
:uischema=${(x) => x.formUiSchema}
|
|
85
88
|
readonly=${(x) => x.readonly}
|
|
86
89
|
@submit-success=${(x, c) => x.submitEntityChanges(c.event)}
|
|
87
90
|
></foundation-form>
|
|
88
91
|
`)}
|
|
89
92
|
</slot>
|
|
90
|
-
|
|
93
|
+
</${prefix}-modal>
|
|
91
94
|
</div>
|
|
92
95
|
`;
|
|
96
|
+
/** @internal */
|
|
97
|
+
export const template = html `
|
|
98
|
+
${(x) => getPrefixedEntities(x.prefix)}
|
|
99
|
+
`;
|
package/dist/esm/list/list.js
CHANGED
|
@@ -10,6 +10,11 @@ import { listTemplate } from './list.template';
|
|
|
10
10
|
let List = class List extends FASTElement {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments);
|
|
13
|
+
/**
|
|
14
|
+
* Name of the design system prefix that will be used in renderers.
|
|
15
|
+
* @public
|
|
16
|
+
*/
|
|
17
|
+
this.prefix = 'zero';
|
|
13
18
|
this.resourceName = '';
|
|
14
19
|
this.title = '';
|
|
15
20
|
this.asyncAdd = false;
|
|
@@ -39,23 +44,23 @@ let List = class List extends FASTElement {
|
|
|
39
44
|
this.actionButtonsConfig = [];
|
|
40
45
|
if (this.updateEvent && !this.hideEdit) {
|
|
41
46
|
this.actionButtonsConfig.push(buttonCellRenderer('Edit', this.edit, html `
|
|
42
|
-
|
|
47
|
+
<${this.prefix}-icon
|
|
43
48
|
style="pointer-events: none; opacity: 0.5"
|
|
44
49
|
class="icon-button"
|
|
45
50
|
variant="solid"
|
|
46
51
|
name="pen"
|
|
47
52
|
size="lg"
|
|
48
|
-
|
|
53
|
+
></${this.prefix}-icon>
|
|
49
54
|
`));
|
|
50
55
|
}
|
|
51
56
|
if (this.deleteEvent && !this.hideDelete) {
|
|
52
57
|
this.actionButtonsConfig.push(buttonCellRenderer('Delete', (e) => this.delete(e), html `
|
|
53
|
-
|
|
58
|
+
<${this.prefix}-icon
|
|
54
59
|
style="opacity: 0.5"
|
|
55
60
|
variant="regular"
|
|
56
61
|
name="trash-alt"
|
|
57
62
|
size="lg"
|
|
58
|
-
|
|
63
|
+
></${this.prefix}-icon>
|
|
59
64
|
`));
|
|
60
65
|
}
|
|
61
66
|
if (this.enableFilterBar) {
|
|
@@ -122,6 +127,9 @@ let List = class List extends FASTElement {
|
|
|
122
127
|
});
|
|
123
128
|
}
|
|
124
129
|
};
|
|
130
|
+
__decorate([
|
|
131
|
+
attr({ attribute: 'design-system-prefix' })
|
|
132
|
+
], List.prototype, "prefix", void 0);
|
|
125
133
|
__decorate([
|
|
126
134
|
attr
|
|
127
135
|
], List.prototype, "resourceName", void 0);
|
|
@@ -134,6 +142,9 @@ __decorate([
|
|
|
134
142
|
__decorate([
|
|
135
143
|
attr({ mode: 'boolean', attribute: 'size-columns-to-fit' })
|
|
136
144
|
], List.prototype, "sizeColumnsToFit", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
attr({ attribute: 'row-selection' })
|
|
147
|
+
], List.prototype, "rowSelection", void 0);
|
|
137
148
|
__decorate([
|
|
138
149
|
attr({ mode: 'boolean', attribute: 'enable-filter-bar' })
|
|
139
150
|
], List.prototype, "enableFilterBar", void 0);
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { html, ref, repeat, when } from '@microsoft/fast-element';
|
|
2
|
-
export const
|
|
2
|
+
export const getPrefixedList = (prefix) => html `
|
|
3
3
|
<div class="container">
|
|
4
4
|
${when((x) => x.enableFilterBar, html `
|
|
5
|
-
|
|
5
|
+
<${prefix}-filter-bar
|
|
6
6
|
resource=${(x) => x.resourceName}
|
|
7
7
|
only=${(x) => { var _a; return (_a = x.columns) === null || _a === void 0 ? void 0 : _a.map((colDef) => colDef.field).filter((field) => !!field); }}
|
|
8
8
|
labels=${(x) => { var _a; return (_a = x.columns) === null || _a === void 0 ? void 0 : _a.map((colDef) => colDef.headerName || ''); }}
|
|
9
9
|
target="datasource"
|
|
10
|
-
|
|
10
|
+
></${prefix}-filter-bar>
|
|
11
11
|
`)}
|
|
12
|
-
|
|
12
|
+
<${prefix}-grid-pro
|
|
13
13
|
${ref('grid')}
|
|
14
14
|
auto-cell-renderer-by-type
|
|
15
|
-
rowSelection="
|
|
15
|
+
rowSelection="${(x) => x.rowSelection}"
|
|
16
16
|
persist-column-state-key=${(x) => x.persistColumnStateKey}
|
|
17
17
|
?only-template-col-defs=${(x) => !!x.columns}
|
|
18
18
|
readOnlyEdit="true"
|
|
@@ -45,6 +45,10 @@ export const listTemplate = html `
|
|
|
45
45
|
${repeat((x) => x.actionButtonsConfig, html `
|
|
46
46
|
<grid-pro-column :definition=${(x) => x}></grid-pro-column>
|
|
47
47
|
`)}
|
|
48
|
-
|
|
48
|
+
</${prefix}-grid-pro>
|
|
49
49
|
</div>
|
|
50
50
|
`;
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const listTemplate = html `
|
|
53
|
+
${(x) => getPrefixedList(x.prefix)}
|
|
54
|
+
`;
|
package/dist/esm/users/users.js
CHANGED
|
@@ -98,6 +98,11 @@ let Users = class Users extends LifecycleMixin(FASTElement) {
|
|
|
98
98
|
*/
|
|
99
99
|
constructor() {
|
|
100
100
|
super();
|
|
101
|
+
/**
|
|
102
|
+
* Name of the design system prefix that will be used for components.
|
|
103
|
+
* @public
|
|
104
|
+
*/
|
|
105
|
+
this.prefix = 'zero';
|
|
101
106
|
/**
|
|
102
107
|
* Configuring the resourceName from the entity-management, set to manage the users resource specifically
|
|
103
108
|
* @internal
|
|
@@ -227,7 +232,7 @@ let Users = class Users extends LifecycleMixin(FASTElement) {
|
|
|
227
232
|
config: {
|
|
228
233
|
toast: { type: 'warning', autoClose: true, closeTimeout: notificationCloseTimeout },
|
|
229
234
|
},
|
|
230
|
-
},
|
|
235
|
+
}, this.prefix);
|
|
231
236
|
});
|
|
232
237
|
// bring back original value
|
|
233
238
|
params.setValue(previousValue);
|
|
@@ -264,6 +269,9 @@ __decorate([
|
|
|
264
269
|
__decorate([
|
|
265
270
|
observable
|
|
266
271
|
], Users.prototype, "datasourceConfig", void 0);
|
|
272
|
+
__decorate([
|
|
273
|
+
attr({ attribute: 'design-system-prefix' })
|
|
274
|
+
], Users.prototype, "prefix", void 0);
|
|
267
275
|
__decorate([
|
|
268
276
|
attr
|
|
269
277
|
], Users.prototype, "resourceName", void 0);
|
|
@@ -70,7 +70,7 @@ const editUserSchema = (edit, allAccessType, entityID, entityLabel, entityLabelK
|
|
|
70
70
|
: entry),
|
|
71
71
|
],
|
|
72
72
|
});
|
|
73
|
-
export const
|
|
73
|
+
export const getPrefixedUsers = (prefix) => html `
|
|
74
74
|
<entity-management
|
|
75
75
|
resourceName=${(x) => x.resourceName}
|
|
76
76
|
title="User Management"
|
|
@@ -87,5 +87,10 @@ export const UsersTemplate = html `
|
|
|
87
87
|
size-columns-to-fit
|
|
88
88
|
:columns=${(x) => [...x.columns, ...x.entityColumn(), x.statusColumn()]}
|
|
89
89
|
:datasourceConfig=${(x) => x.datasourceConfig}
|
|
90
|
+
design-system-prefix=${prefix}
|
|
90
91
|
></entity-management>
|
|
91
92
|
`;
|
|
93
|
+
/** @internal */
|
|
94
|
+
export const UsersTemplate = html `
|
|
95
|
+
${(x) => getPrefixedUsers(x.prefix)}
|
|
96
|
+
`;
|
|
@@ -1320,6 +1320,36 @@
|
|
|
1320
1320
|
"isProtected": false,
|
|
1321
1321
|
"isAbstract": false
|
|
1322
1322
|
},
|
|
1323
|
+
{
|
|
1324
|
+
"kind": "Property",
|
|
1325
|
+
"canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#prefix:member",
|
|
1326
|
+
"docComment": "/**\n * Name of the design system prefix that will be used in renderers.\n *\n * @public\n */\n",
|
|
1327
|
+
"excerptTokens": [
|
|
1328
|
+
{
|
|
1329
|
+
"kind": "Content",
|
|
1330
|
+
"text": "prefix: "
|
|
1331
|
+
},
|
|
1332
|
+
{
|
|
1333
|
+
"kind": "Content",
|
|
1334
|
+
"text": "string"
|
|
1335
|
+
},
|
|
1336
|
+
{
|
|
1337
|
+
"kind": "Content",
|
|
1338
|
+
"text": ";"
|
|
1339
|
+
}
|
|
1340
|
+
],
|
|
1341
|
+
"isReadonly": false,
|
|
1342
|
+
"isOptional": false,
|
|
1343
|
+
"releaseTag": "Public",
|
|
1344
|
+
"name": "prefix",
|
|
1345
|
+
"propertyTypeTokenRange": {
|
|
1346
|
+
"startIndex": 1,
|
|
1347
|
+
"endIndex": 2
|
|
1348
|
+
},
|
|
1349
|
+
"isStatic": false,
|
|
1350
|
+
"isProtected": false,
|
|
1351
|
+
"isAbstract": false
|
|
1352
|
+
},
|
|
1323
1353
|
{
|
|
1324
1354
|
"kind": "Property",
|
|
1325
1355
|
"canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#readEvent:member",
|
|
@@ -1440,6 +1470,36 @@
|
|
|
1440
1470
|
"isProtected": false,
|
|
1441
1471
|
"isAbstract": false
|
|
1442
1472
|
},
|
|
1473
|
+
{
|
|
1474
|
+
"kind": "Property",
|
|
1475
|
+
"canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#rowSelection:member",
|
|
1476
|
+
"docComment": "/**\n * This attribute allows you to change row-selection to 'single' or 'multiple' which will allow you to select single or multiple rows.\n *\n * @remarks\n *\n * Defaults to single\n *\n * @public\n */\n",
|
|
1477
|
+
"excerptTokens": [
|
|
1478
|
+
{
|
|
1479
|
+
"kind": "Content",
|
|
1480
|
+
"text": "rowSelection: "
|
|
1481
|
+
},
|
|
1482
|
+
{
|
|
1483
|
+
"kind": "Content",
|
|
1484
|
+
"text": "string"
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
"kind": "Content",
|
|
1488
|
+
"text": ";"
|
|
1489
|
+
}
|
|
1490
|
+
],
|
|
1491
|
+
"isReadonly": false,
|
|
1492
|
+
"isOptional": false,
|
|
1493
|
+
"releaseTag": "Public",
|
|
1494
|
+
"name": "rowSelection",
|
|
1495
|
+
"propertyTypeTokenRange": {
|
|
1496
|
+
"startIndex": 1,
|
|
1497
|
+
"endIndex": 2
|
|
1498
|
+
},
|
|
1499
|
+
"isStatic": false,
|
|
1500
|
+
"isProtected": false,
|
|
1501
|
+
"isAbstract": false
|
|
1502
|
+
},
|
|
1443
1503
|
{
|
|
1444
1504
|
"kind": "Property",
|
|
1445
1505
|
"canonicalReference": "@genesislcap/foundation-entity-management!EntityManagement#searchBarConfig:member",
|
|
@@ -2795,6 +2855,36 @@
|
|
|
2795
2855
|
"isProtected": false,
|
|
2796
2856
|
"isAbstract": false
|
|
2797
2857
|
},
|
|
2858
|
+
{
|
|
2859
|
+
"kind": "Property",
|
|
2860
|
+
"canonicalReference": "@genesislcap/foundation-entity-management!Users#prefix:member",
|
|
2861
|
+
"docComment": "/**\n * Name of the design system prefix that will be used for components.\n *\n * @public\n */\n",
|
|
2862
|
+
"excerptTokens": [
|
|
2863
|
+
{
|
|
2864
|
+
"kind": "Content",
|
|
2865
|
+
"text": "prefix: "
|
|
2866
|
+
},
|
|
2867
|
+
{
|
|
2868
|
+
"kind": "Content",
|
|
2869
|
+
"text": "string"
|
|
2870
|
+
},
|
|
2871
|
+
{
|
|
2872
|
+
"kind": "Content",
|
|
2873
|
+
"text": ";"
|
|
2874
|
+
}
|
|
2875
|
+
],
|
|
2876
|
+
"isReadonly": false,
|
|
2877
|
+
"isOptional": false,
|
|
2878
|
+
"releaseTag": "Public",
|
|
2879
|
+
"name": "prefix",
|
|
2880
|
+
"propertyTypeTokenRange": {
|
|
2881
|
+
"startIndex": 1,
|
|
2882
|
+
"endIndex": 2
|
|
2883
|
+
},
|
|
2884
|
+
"isStatic": false,
|
|
2885
|
+
"isProtected": false,
|
|
2886
|
+
"isAbstract": false
|
|
2887
|
+
},
|
|
2798
2888
|
{
|
|
2799
2889
|
"kind": "Property",
|
|
2800
2890
|
"canonicalReference": "@genesislcap/foundation-entity-management!Users#updateEvent:member",
|
|
@@ -95,6 +95,11 @@ export declare class EntityManagement extends EntityManagement_base {
|
|
|
95
95
|
* DI container
|
|
96
96
|
*/
|
|
97
97
|
protected connect: Connect;
|
|
98
|
+
/**
|
|
99
|
+
* Name of the design system prefix that will be used in renderers.
|
|
100
|
+
* @public
|
|
101
|
+
*/
|
|
102
|
+
prefix: string;
|
|
98
103
|
/**
|
|
99
104
|
* Name of the backend resource which contain the entities to manage
|
|
100
105
|
* @public
|
|
@@ -146,6 +151,12 @@ export declare class EntityManagement extends EntityManagement_base {
|
|
|
146
151
|
* @public
|
|
147
152
|
*/
|
|
148
153
|
asyncUpdate: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* This attribute allows you to change row-selection to 'single' or 'multiple' which will allow you to select single or multiple rows.
|
|
156
|
+
* @remarks Defaults to single
|
|
157
|
+
* @public
|
|
158
|
+
*/
|
|
159
|
+
rowSelection: string;
|
|
149
160
|
/**
|
|
150
161
|
* If false, will disable cell flashing for all cells by default, unless otherwise defined in custom colDef
|
|
151
162
|
* @remarks Defaults to true
|
|
@@ -354,7 +365,10 @@ declare const EntityManagement_base: (new (...args: any[]) => {
|
|
|
354
365
|
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
355
366
|
readonly attributes: NamedNodeMap;
|
|
356
367
|
readonly classList: DOMTokenList;
|
|
357
|
-
className: string;
|
|
368
|
+
className: string; /**
|
|
369
|
+
* Array which holds the column definitions.
|
|
370
|
+
* @public
|
|
371
|
+
*/
|
|
358
372
|
readonly clientHeight: number;
|
|
359
373
|
readonly clientLeft: number;
|
|
360
374
|
readonly clientTop: number;
|
|
@@ -405,7 +419,10 @@ declare const EntityManagement_base: (new (...args: any[]) => {
|
|
|
405
419
|
removeAttribute(qualifiedName: string): void;
|
|
406
420
|
removeAttributeNS(namespace: string, localName: string): void;
|
|
407
421
|
removeAttributeNode(attr: Attr): Attr;
|
|
408
|
-
requestFullscreen(options?: FullscreenOptions): Promise<void>;
|
|
422
|
+
requestFullscreen(options?: FullscreenOptions): Promise<void>; /**
|
|
423
|
+
* Set up the web component
|
|
424
|
+
* @internal
|
|
425
|
+
*/
|
|
409
426
|
requestPointerLock(): void;
|
|
410
427
|
scroll(options?: ScrollToOptions): void;
|
|
411
428
|
scroll(x: number, y: number): void;
|
|
@@ -467,7 +484,14 @@ declare const EntityManagement_base: (new (...args: any[]) => {
|
|
|
467
484
|
readonly PROCESSING_INSTRUCTION_NODE: number;
|
|
468
485
|
readonly TEXT_NODE: number;
|
|
469
486
|
dispatchEvent(event: Event): boolean;
|
|
470
|
-
ariaAtomic: string;
|
|
487
|
+
ariaAtomic: string; /**
|
|
488
|
+
* Event handler for when the user submits the action for the currently open form, either editing or adding the entity
|
|
489
|
+
*
|
|
490
|
+
* @param e - CustomEvent which contains the payload for the entity to submit to the backend
|
|
491
|
+
*
|
|
492
|
+
* Emits an event upon error
|
|
493
|
+
* @public
|
|
494
|
+
*/
|
|
471
495
|
ariaAutoComplete: string;
|
|
472
496
|
ariaBusy: string;
|
|
473
497
|
ariaChecked: string;
|
|
@@ -480,6 +504,12 @@ declare const EntityManagement_base: (new (...args: any[]) => {
|
|
|
480
504
|
ariaExpanded: string;
|
|
481
505
|
ariaHasPopup: string;
|
|
482
506
|
ariaHidden: string;
|
|
507
|
+
/**
|
|
508
|
+
* Updates the reference to the current entity stored in the class. Added as an event listener on the class when receiving the `rowSelected` event.
|
|
509
|
+
*
|
|
510
|
+
* @param e - CustomEvent which contains data about the selected entity. If the row is not selected then the reference will be set to an empty object.
|
|
511
|
+
* @internal
|
|
512
|
+
*/
|
|
483
513
|
ariaInvalid: string;
|
|
484
514
|
ariaKeyShortcuts: string;
|
|
485
515
|
ariaLabel: string;
|
|
@@ -575,7 +605,10 @@ declare const EntityManagement_base: (new (...args: any[]) => {
|
|
|
575
605
|
onkeypress: (this: GlobalEventHandlers, ev: KeyboardEvent) => any;
|
|
576
606
|
onkeyup: (this: GlobalEventHandlers, ev: KeyboardEvent) => any;
|
|
577
607
|
onload: (this: GlobalEventHandlers, ev: Event) => any;
|
|
578
|
-
onloadeddata: (this: GlobalEventHandlers, ev: Event) => any;
|
|
608
|
+
onloadeddata: (this: GlobalEventHandlers, ev: Event) => any; /**
|
|
609
|
+
* Show notifications if the executed event returned an error.
|
|
610
|
+
* @internal
|
|
611
|
+
*/
|
|
579
612
|
onloadedmetadata: (this: GlobalEventHandlers, ev: Event) => any;
|
|
580
613
|
onloadstart: (this: GlobalEventHandlers, ev: Event) => any;
|
|
581
614
|
onlostpointercapture: (this: GlobalEventHandlers, ev: PointerEvent) => any;
|
|
@@ -820,6 +853,11 @@ export declare class Users extends Users_base {
|
|
|
820
853
|
* @internal
|
|
821
854
|
*/
|
|
822
855
|
datasourceConfig: DatasourceConfiguration;
|
|
856
|
+
/**
|
|
857
|
+
* Name of the design system prefix that will be used for components.
|
|
858
|
+
* @public
|
|
859
|
+
*/
|
|
860
|
+
prefix: string;
|
|
823
861
|
/**
|
|
824
862
|
* Configuring the resourceName from the entity-management, set to manage the users resource specifically
|
|
825
863
|
* @internal
|
|
@@ -1018,6 +1056,9 @@ declare const Users_base: (new (...args: any[]) => {
|
|
|
1018
1056
|
readonly part: DOMTokenList;
|
|
1019
1057
|
readonly prefix: string;
|
|
1020
1058
|
readonly scrollHeight: number;
|
|
1059
|
+
/**
|
|
1060
|
+
* String which contains event if we have permission to update user of empty string if not
|
|
1061
|
+
*/
|
|
1021
1062
|
scrollLeft: number;
|
|
1022
1063
|
scrollTop: number;
|
|
1023
1064
|
readonly scrollWidth: number;
|
|
@@ -1028,10 +1069,7 @@ declare const Users_base: (new (...args: any[]) => {
|
|
|
1028
1069
|
closest<K_2 extends keyof HTMLElementTagNameMap>(selector: K_2): HTMLElementTagNameMap[K_2];
|
|
1029
1070
|
closest<K_3 extends keyof SVGElementTagNameMap>(selector: K_3): SVGElementTagNameMap[K_3];
|
|
1030
1071
|
closest<E extends Element = Element>(selectors: string): E;
|
|
1031
|
-
getAttribute(qualifiedName: string): string;
|
|
1032
|
-
* Definition of the `DATASERVER` query which is used when managing Counterpartys
|
|
1033
|
-
* @internal
|
|
1034
|
-
*/
|
|
1072
|
+
getAttribute(qualifiedName: string): string;
|
|
1035
1073
|
getAttributeNS(namespace: string, localName: string): string;
|
|
1036
1074
|
getAttributeNames(): string[];
|
|
1037
1075
|
getAttributeNode(qualifiedName: string): Attr;
|
|
@@ -1095,7 +1133,9 @@ declare const Users_base: (new (...args: any[]) => {
|
|
|
1095
1133
|
isDefaultNamespace(namespace: string): boolean;
|
|
1096
1134
|
isEqualNode(otherNode: Node): boolean;
|
|
1097
1135
|
isSameNode(otherNode: Node): boolean;
|
|
1098
|
-
lookupNamespaceURI(prefix: string): string;
|
|
1136
|
+
lookupNamespaceURI(prefix: string): string; /**
|
|
1137
|
+
* @internal
|
|
1138
|
+
*/
|
|
1099
1139
|
lookupPrefix(namespace: string): string;
|
|
1100
1140
|
normalize(): void;
|
|
1101
1141
|
removeChild<T_3 extends Node>(child: T_3): T_3;
|