@genesislcap/foundation-entity-management 14.418.1 → 14.418.2-alpha-222b313.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 +141 -84
- package/dist/dts/list/list.d.ts +19 -0
- package/dist/dts/list/list.d.ts.map +1 -1
- package/dist/esm/list/list.js +76 -34
- package/dist/foundation-entity-management.d.ts +19 -0
- package/package.json +23 -23
|
@@ -89,41 +89,6 @@
|
|
|
89
89
|
}
|
|
90
90
|
]
|
|
91
91
|
},
|
|
92
|
-
{
|
|
93
|
-
"kind": "javascript-module",
|
|
94
|
-
"path": "src/components/components.ts",
|
|
95
|
-
"declarations": [
|
|
96
|
-
{
|
|
97
|
-
"kind": "function",
|
|
98
|
-
"name": "loadRemotes"
|
|
99
|
-
}
|
|
100
|
-
],
|
|
101
|
-
"exports": [
|
|
102
|
-
{
|
|
103
|
-
"kind": "js",
|
|
104
|
-
"name": "loadRemotes",
|
|
105
|
-
"declaration": {
|
|
106
|
-
"name": "loadRemotes",
|
|
107
|
-
"module": "src/components/components.ts"
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
]
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"kind": "javascript-module",
|
|
114
|
-
"path": "src/components/index.ts",
|
|
115
|
-
"declarations": [],
|
|
116
|
-
"exports": [
|
|
117
|
-
{
|
|
118
|
-
"kind": "js",
|
|
119
|
-
"name": "*",
|
|
120
|
-
"declaration": {
|
|
121
|
-
"name": "*",
|
|
122
|
-
"package": "./components"
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
]
|
|
126
|
-
},
|
|
127
92
|
{
|
|
128
93
|
"kind": "javascript-module",
|
|
129
94
|
"path": "src/entities/entities.styles.ts",
|
|
@@ -2695,6 +2660,41 @@
|
|
|
2695
2660
|
}
|
|
2696
2661
|
]
|
|
2697
2662
|
},
|
|
2663
|
+
{
|
|
2664
|
+
"kind": "javascript-module",
|
|
2665
|
+
"path": "src/components/components.ts",
|
|
2666
|
+
"declarations": [
|
|
2667
|
+
{
|
|
2668
|
+
"kind": "function",
|
|
2669
|
+
"name": "loadRemotes"
|
|
2670
|
+
}
|
|
2671
|
+
],
|
|
2672
|
+
"exports": [
|
|
2673
|
+
{
|
|
2674
|
+
"kind": "js",
|
|
2675
|
+
"name": "loadRemotes",
|
|
2676
|
+
"declaration": {
|
|
2677
|
+
"name": "loadRemotes",
|
|
2678
|
+
"module": "src/components/components.ts"
|
|
2679
|
+
}
|
|
2680
|
+
}
|
|
2681
|
+
]
|
|
2682
|
+
},
|
|
2683
|
+
{
|
|
2684
|
+
"kind": "javascript-module",
|
|
2685
|
+
"path": "src/components/index.ts",
|
|
2686
|
+
"declarations": [],
|
|
2687
|
+
"exports": [
|
|
2688
|
+
{
|
|
2689
|
+
"kind": "js",
|
|
2690
|
+
"name": "*",
|
|
2691
|
+
"declaration": {
|
|
2692
|
+
"name": "*",
|
|
2693
|
+
"package": "./components"
|
|
2694
|
+
}
|
|
2695
|
+
}
|
|
2696
|
+
]
|
|
2697
|
+
},
|
|
2698
2698
|
{
|
|
2699
2699
|
"kind": "javascript-module",
|
|
2700
2700
|
"path": "src/list/index.ts",
|
|
@@ -3006,6 +3006,25 @@
|
|
|
3006
3006
|
},
|
|
3007
3007
|
"privacy": "protected"
|
|
3008
3008
|
},
|
|
3009
|
+
{
|
|
3010
|
+
"kind": "field",
|
|
3011
|
+
"name": "_pendingSchemaEvent",
|
|
3012
|
+
"type": {
|
|
3013
|
+
"text": "CustomEvent<SchemaUpdatedEventDetail> | null"
|
|
3014
|
+
},
|
|
3015
|
+
"privacy": "private",
|
|
3016
|
+
"default": "null",
|
|
3017
|
+
"description": "Latest schema event token: newer `datasource-schema-updated` supersedes in-flight `queueUpdate` work."
|
|
3018
|
+
},
|
|
3019
|
+
{
|
|
3020
|
+
"kind": "field",
|
|
3021
|
+
"name": "_serverSchemaListenerAttached",
|
|
3022
|
+
"type": {
|
|
3023
|
+
"text": "boolean"
|
|
3024
|
+
},
|
|
3025
|
+
"privacy": "private",
|
|
3026
|
+
"default": "false"
|
|
3027
|
+
},
|
|
3009
3028
|
{
|
|
3010
3029
|
"kind": "field",
|
|
3011
3030
|
"name": "isServerSideDatasource",
|
|
@@ -3026,6 +3045,44 @@
|
|
|
3026
3045
|
}
|
|
3027
3046
|
]
|
|
3028
3047
|
},
|
|
3048
|
+
{
|
|
3049
|
+
"kind": "method",
|
|
3050
|
+
"name": "actionColumnIcon",
|
|
3051
|
+
"privacy": "private",
|
|
3052
|
+
"parameters": [
|
|
3053
|
+
{
|
|
3054
|
+
"name": "iconName",
|
|
3055
|
+
"type": {
|
|
3056
|
+
"text": "string"
|
|
3057
|
+
}
|
|
3058
|
+
},
|
|
3059
|
+
{
|
|
3060
|
+
"name": "variant",
|
|
3061
|
+
"default": "'solid'",
|
|
3062
|
+
"type": {
|
|
3063
|
+
"text": "'solid' | 'regular'"
|
|
3064
|
+
}
|
|
3065
|
+
}
|
|
3066
|
+
],
|
|
3067
|
+
"description": "Shared markup for CRUD / custom action column icons (grid cell renderers)."
|
|
3068
|
+
},
|
|
3069
|
+
{
|
|
3070
|
+
"kind": "method",
|
|
3071
|
+
"name": "populateActionButtonsConfig",
|
|
3072
|
+
"privacy": "private",
|
|
3073
|
+
"return": {
|
|
3074
|
+
"type": {
|
|
3075
|
+
"text": "void"
|
|
3076
|
+
}
|
|
3077
|
+
},
|
|
3078
|
+
"description": "Builds column defs for CRUD / custom actions in the grid (pinned action column)."
|
|
3079
|
+
},
|
|
3080
|
+
{
|
|
3081
|
+
"kind": "field",
|
|
3082
|
+
"name": "handleDatasourceSchemaUpdated",
|
|
3083
|
+
"privacy": "private",
|
|
3084
|
+
"description": "Server-side row model: `grid-pro` may run `handleSchemaUpdated` before `grid-pro-column` for action\nbuttons exist in the DOM, so the merge omits them. After schema, repopulate actions and re-dispatch\nthe same event so `grid-pro` merges again with template columns present."
|
|
3085
|
+
},
|
|
3029
3086
|
{
|
|
3030
3087
|
"kind": "field",
|
|
3031
3088
|
"name": "criteria",
|
|
@@ -3394,55 +3451,6 @@
|
|
|
3394
3451
|
}
|
|
3395
3452
|
]
|
|
3396
3453
|
},
|
|
3397
|
-
{
|
|
3398
|
-
"kind": "javascript-module",
|
|
3399
|
-
"path": "src/layouts/default.ts",
|
|
3400
|
-
"declarations": [
|
|
3401
|
-
{
|
|
3402
|
-
"kind": "variable",
|
|
3403
|
-
"name": "loginLayout",
|
|
3404
|
-
"default": "new GenesisElementLayout(\n html`\n <div class=\"container\">\n <div class=\"content\">\n <slot></slot>\n </div>\n </div>\n `,\n baseLayoutCss,\n)"
|
|
3405
|
-
},
|
|
3406
|
-
{
|
|
3407
|
-
"kind": "variable",
|
|
3408
|
-
"name": "defaultLayout",
|
|
3409
|
-
"default": "new GenesisElementLayout(\n html`\n <div class=\"container\">\n <div class=\"content\">\n <slot></slot>\n </div>\n </div>\n `,\n css`\n ${baseLayoutCss}\n `,\n)"
|
|
3410
|
-
}
|
|
3411
|
-
],
|
|
3412
|
-
"exports": [
|
|
3413
|
-
{
|
|
3414
|
-
"kind": "js",
|
|
3415
|
-
"name": "loginLayout",
|
|
3416
|
-
"declaration": {
|
|
3417
|
-
"name": "loginLayout",
|
|
3418
|
-
"module": "src/layouts/default.ts"
|
|
3419
|
-
}
|
|
3420
|
-
},
|
|
3421
|
-
{
|
|
3422
|
-
"kind": "js",
|
|
3423
|
-
"name": "defaultLayout",
|
|
3424
|
-
"declaration": {
|
|
3425
|
-
"name": "defaultLayout",
|
|
3426
|
-
"module": "src/layouts/default.ts"
|
|
3427
|
-
}
|
|
3428
|
-
}
|
|
3429
|
-
]
|
|
3430
|
-
},
|
|
3431
|
-
{
|
|
3432
|
-
"kind": "javascript-module",
|
|
3433
|
-
"path": "src/layouts/index.ts",
|
|
3434
|
-
"declarations": [],
|
|
3435
|
-
"exports": [
|
|
3436
|
-
{
|
|
3437
|
-
"kind": "js",
|
|
3438
|
-
"name": "*",
|
|
3439
|
-
"declaration": {
|
|
3440
|
-
"name": "*",
|
|
3441
|
-
"package": "./default"
|
|
3442
|
-
}
|
|
3443
|
-
}
|
|
3444
|
-
]
|
|
3445
|
-
},
|
|
3446
3454
|
{
|
|
3447
3455
|
"kind": "javascript-module",
|
|
3448
3456
|
"path": "src/main/index.ts",
|
|
@@ -3587,6 +3595,55 @@
|
|
|
3587
3595
|
}
|
|
3588
3596
|
]
|
|
3589
3597
|
},
|
|
3598
|
+
{
|
|
3599
|
+
"kind": "javascript-module",
|
|
3600
|
+
"path": "src/layouts/default.ts",
|
|
3601
|
+
"declarations": [
|
|
3602
|
+
{
|
|
3603
|
+
"kind": "variable",
|
|
3604
|
+
"name": "loginLayout",
|
|
3605
|
+
"default": "new GenesisElementLayout(\n html`\n <div class=\"container\">\n <div class=\"content\">\n <slot></slot>\n </div>\n </div>\n `,\n baseLayoutCss,\n)"
|
|
3606
|
+
},
|
|
3607
|
+
{
|
|
3608
|
+
"kind": "variable",
|
|
3609
|
+
"name": "defaultLayout",
|
|
3610
|
+
"default": "new GenesisElementLayout(\n html`\n <div class=\"container\">\n <div class=\"content\">\n <slot></slot>\n </div>\n </div>\n `,\n css`\n ${baseLayoutCss}\n `,\n)"
|
|
3611
|
+
}
|
|
3612
|
+
],
|
|
3613
|
+
"exports": [
|
|
3614
|
+
{
|
|
3615
|
+
"kind": "js",
|
|
3616
|
+
"name": "loginLayout",
|
|
3617
|
+
"declaration": {
|
|
3618
|
+
"name": "loginLayout",
|
|
3619
|
+
"module": "src/layouts/default.ts"
|
|
3620
|
+
}
|
|
3621
|
+
},
|
|
3622
|
+
{
|
|
3623
|
+
"kind": "js",
|
|
3624
|
+
"name": "defaultLayout",
|
|
3625
|
+
"declaration": {
|
|
3626
|
+
"name": "defaultLayout",
|
|
3627
|
+
"module": "src/layouts/default.ts"
|
|
3628
|
+
}
|
|
3629
|
+
}
|
|
3630
|
+
]
|
|
3631
|
+
},
|
|
3632
|
+
{
|
|
3633
|
+
"kind": "javascript-module",
|
|
3634
|
+
"path": "src/layouts/index.ts",
|
|
3635
|
+
"declarations": [],
|
|
3636
|
+
"exports": [
|
|
3637
|
+
{
|
|
3638
|
+
"kind": "js",
|
|
3639
|
+
"name": "*",
|
|
3640
|
+
"declaration": {
|
|
3641
|
+
"name": "*",
|
|
3642
|
+
"package": "./default"
|
|
3643
|
+
}
|
|
3644
|
+
}
|
|
3645
|
+
]
|
|
3646
|
+
},
|
|
3590
3647
|
{
|
|
3591
3648
|
"kind": "javascript-module",
|
|
3592
3649
|
"path": "src/routes/config.ts",
|
package/dist/dts/list/list.d.ts
CHANGED
|
@@ -427,9 +427,28 @@ export declare class List extends List_base {
|
|
|
427
427
|
statusBarConfig: GridProStatusBarConfig;
|
|
428
428
|
customActions: CustomAction[];
|
|
429
429
|
protected connect: Connect;
|
|
430
|
+
/**
|
|
431
|
+
* Latest schema event token: newer `datasource-schema-updated` supersedes in-flight `queueUpdate` work.
|
|
432
|
+
*/
|
|
433
|
+
private _pendingSchemaEvent;
|
|
434
|
+
private _serverSchemaListenerAttached;
|
|
430
435
|
get isServerSideDatasource(): boolean;
|
|
431
436
|
connectedCallback(): void;
|
|
432
437
|
handleCellEditRequest(event: CustomEvent<CellEditRequestEvent>): Promise<void>;
|
|
438
|
+
/**
|
|
439
|
+
* Shared markup for CRUD / custom action column icons (grid cell renderers).
|
|
440
|
+
*/
|
|
441
|
+
private actionColumnIcon;
|
|
442
|
+
/**
|
|
443
|
+
* Builds column defs for CRUD / custom actions in the grid (pinned action column).
|
|
444
|
+
*/
|
|
445
|
+
private populateActionButtonsConfig;
|
|
446
|
+
/**
|
|
447
|
+
* Server-side row model: `grid-pro` may run `handleSchemaUpdated` before `grid-pro-column` for action
|
|
448
|
+
* buttons exist in the DOM, so the merge omits them. After schema, repopulate actions and re-dispatch
|
|
449
|
+
* the same event so `grid-pro` merges again with template columns present.
|
|
450
|
+
*/
|
|
451
|
+
private handleDatasourceSchemaUpdated;
|
|
433
452
|
disconnectedCallback(): Promise<void>;
|
|
434
453
|
get criteria(): string;
|
|
435
454
|
get fields(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/list/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,oBAAoB,EAAU,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAExD,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAC9F,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/list/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC1F,OAAO,EAAE,oBAAoB,EAAU,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAExD,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAC9F,OAAO,KAAK,EACV,eAAe,EACf,sBAAsB,EAEvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,cAAc,EAIf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAIL,cAAc,EAIf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;;;;;;;kBA+CE,CAAC;;;;;;;;8BAkDjC,CAAC,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA0BzB,CAAF;4IAGgE,CAAC;wFAItC,CAAA;+IAOxB,CAAC;2FAIA,CAAC;;;;;;;;;;;;;;;;;;;;;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oBAAoB,CAAC,CAAC,EAAE,WAAW,GAAG,IAAI;IAI1C,OAAO,CAAC,mBAAmB;IAM3B,OAAO,CAAC,mBAAmB;IAK3B,iBAAiB,CAAC,CAAC,EAAE,WAAW;IAIhC,sBAAsB,CAAC,CAAC,EAAE,WAAW,CAAC,qBAAqB,CAAC;IAI5D,OAAO,CAAC,IAAI,CAEV;IAEI,MAAM,CAAC,CAAC,KAAA;IAId,OAAO,CAAC,kBAAkB,CAExB;CACH"}
|
package/dist/esm/list/list.js
CHANGED
|
@@ -2,7 +2,7 @@ import { __awaiter, __decorate } from "tslib";
|
|
|
2
2
|
import { Events } from '@ag-grid-community/core';
|
|
3
3
|
import { Connect } from '@genesislcap/foundation-comms';
|
|
4
4
|
import { LifecycleMixin } from '@genesislcap/foundation-utils';
|
|
5
|
-
import { EDITED_COLUMN_FIELD, ERROR_COLUMN_FIELD } from '@genesislcap/grid-pro';
|
|
5
|
+
import { datasourceEventNames, EDITED_COLUMN_FIELD, ERROR_COLUMN_FIELD, } from '@genesislcap/grid-pro';
|
|
6
6
|
import { attr, customElement, DOM, GenesisElement, html, observable, volatile, } from '@genesislcap/web-core';
|
|
7
7
|
import { CrudMenuPosition } from '../types';
|
|
8
8
|
import { buttonCellRenderer } from '../utils';
|
|
@@ -28,6 +28,42 @@ let List = class List extends LifecycleMixin(GenesisElement) {
|
|
|
28
28
|
this.datasourceType = 'client';
|
|
29
29
|
this.actionButtonsConfig = [];
|
|
30
30
|
this.customActions = [];
|
|
31
|
+
/**
|
|
32
|
+
* Latest schema event token: newer `datasource-schema-updated` supersedes in-flight `queueUpdate` work.
|
|
33
|
+
*/
|
|
34
|
+
this._pendingSchemaEvent = null;
|
|
35
|
+
this._serverSchemaListenerAttached = false;
|
|
36
|
+
/**
|
|
37
|
+
* Server-side row model: `grid-pro` may run `handleSchemaUpdated` before `grid-pro-column` for action
|
|
38
|
+
* buttons exist in the DOM, so the merge omits them. After schema, repopulate actions and re-dispatch
|
|
39
|
+
* the same event so `grid-pro` merges again with template columns present.
|
|
40
|
+
*/
|
|
41
|
+
this.handleDatasourceSchemaUpdated = (e) => {
|
|
42
|
+
var _a;
|
|
43
|
+
if (!this.isServerSideDatasource)
|
|
44
|
+
return;
|
|
45
|
+
if ((_a = e.detail) === null || _a === void 0 ? void 0 : _a.__rebroadcast) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
this._pendingSchemaEvent = e;
|
|
49
|
+
DOM.queueUpdate(() => {
|
|
50
|
+
if (this._pendingSchemaEvent !== e)
|
|
51
|
+
return;
|
|
52
|
+
this.populateActionButtonsConfig();
|
|
53
|
+
DOM.queueUpdate(() => {
|
|
54
|
+
if (this._pendingSchemaEvent !== e)
|
|
55
|
+
return;
|
|
56
|
+
if (!this.grid)
|
|
57
|
+
return;
|
|
58
|
+
this._pendingSchemaEvent = null;
|
|
59
|
+
this.grid.dispatchEvent(new CustomEvent(datasourceEventNames.schemaUpdated, {
|
|
60
|
+
bubbles: true,
|
|
61
|
+
composed: true,
|
|
62
|
+
detail: Object.assign(Object.assign({}, e.detail), { __rebroadcast: true }),
|
|
63
|
+
}));
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
};
|
|
31
67
|
this.edit = (e) => {
|
|
32
68
|
this.$emit('edit-entity', e);
|
|
33
69
|
};
|
|
@@ -43,39 +79,10 @@ let List = class List extends LifecycleMixin(GenesisElement) {
|
|
|
43
79
|
if (!this.shouldRunConnect)
|
|
44
80
|
return;
|
|
45
81
|
this.grid.addEventListener(Events.EVENT_GRID_READY, () => {
|
|
46
|
-
this.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
this.
|
|
50
|
-
<${this.prefix}-icon
|
|
51
|
-
style="pointer-events: none; opacity: 0.5"
|
|
52
|
-
class="icon-button"
|
|
53
|
-
variant="solid"
|
|
54
|
-
name="${action.icon || 'gear'}"
|
|
55
|
-
size="1x"
|
|
56
|
-
></${this.prefix}-icon>
|
|
57
|
-
`, action.tooltip || action.name));
|
|
58
|
-
});
|
|
59
|
-
if (this.updateEvent && !this.hideEdit) {
|
|
60
|
-
this.actionButtonsConfig.push(buttonCellRenderer('Edit', this.edit, html `
|
|
61
|
-
<${this.prefix}-icon
|
|
62
|
-
style="pointer-events: none; opacity: 0.5"
|
|
63
|
-
class="icon-button"
|
|
64
|
-
variant="solid"
|
|
65
|
-
name="pen"
|
|
66
|
-
size="1x"
|
|
67
|
-
></${this.prefix}-icon>
|
|
68
|
-
`));
|
|
69
|
-
}
|
|
70
|
-
if (this.deleteEvent && !this.hideDelete) {
|
|
71
|
-
this.actionButtonsConfig.push(buttonCellRenderer('Delete', (e) => this.delete(e), html `
|
|
72
|
-
<${this.prefix}-icon
|
|
73
|
-
style="opacity: 0.5"
|
|
74
|
-
variant="regular"
|
|
75
|
-
name="trash-alt"
|
|
76
|
-
size="1x"
|
|
77
|
-
></${this.prefix}-icon>
|
|
78
|
-
`));
|
|
82
|
+
this.populateActionButtonsConfig();
|
|
83
|
+
if (this.isServerSideDatasource && !this._serverSchemaListenerAttached) {
|
|
84
|
+
this._serverSchemaListenerAttached = true;
|
|
85
|
+
this.grid.addEventListener(datasourceEventNames.schemaUpdated, this.handleDatasourceSchemaUpdated);
|
|
79
86
|
}
|
|
80
87
|
if (this.enableFilterBar) {
|
|
81
88
|
this.addEventListener('filter-changed', this.handleFilterChanged);
|
|
@@ -117,16 +124,51 @@ let List = class List extends LifecycleMixin(GenesisElement) {
|
|
|
117
124
|
}
|
|
118
125
|
});
|
|
119
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Shared markup for CRUD / custom action column icons (grid cell renderers).
|
|
129
|
+
*/
|
|
130
|
+
actionColumnIcon(iconName, variant = 'solid') {
|
|
131
|
+
return html `
|
|
132
|
+
<${this.prefix}-icon
|
|
133
|
+
style="pointer-events: none; opacity: 0.5"
|
|
134
|
+
class="icon-button"
|
|
135
|
+
variant="${variant}"
|
|
136
|
+
name="${iconName}"
|
|
137
|
+
size="1x"
|
|
138
|
+
></${this.prefix}-icon>
|
|
139
|
+
`;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Builds column defs for CRUD / custom actions in the grid (pinned action column).
|
|
143
|
+
*/
|
|
144
|
+
populateActionButtonsConfig() {
|
|
145
|
+
this.actionButtonsConfig = [];
|
|
146
|
+
const gridCustomActions = this.customActions.filter((action) => (action.position || CrudMenuPosition.Column) === CrudMenuPosition.Column);
|
|
147
|
+
gridCustomActions.forEach((action) => {
|
|
148
|
+
this.actionButtonsConfig.push(buttonCellRenderer(action.name, () => this.handleCustomAction(action.name), this.actionColumnIcon(action.icon || 'gear'), action.tooltip || action.name));
|
|
149
|
+
});
|
|
150
|
+
if (this.updateEvent && !this.hideEdit) {
|
|
151
|
+
this.actionButtonsConfig.push(buttonCellRenderer('Edit', this.edit, this.actionColumnIcon('pen')));
|
|
152
|
+
}
|
|
153
|
+
if (this.deleteEvent && !this.hideDelete) {
|
|
154
|
+
this.actionButtonsConfig.push(buttonCellRenderer('Delete', (e) => this.delete(e), this.actionColumnIcon('trash-alt', 'regular')));
|
|
155
|
+
}
|
|
156
|
+
}
|
|
120
157
|
disconnectedCallback() {
|
|
121
158
|
const _super = Object.create(null, {
|
|
122
159
|
disconnectedCallback: { get: () => super.disconnectedCallback }
|
|
123
160
|
});
|
|
124
161
|
return __awaiter(this, void 0, void 0, function* () {
|
|
125
162
|
const shouldRunDisconnect = this.shouldRunDisconnect;
|
|
163
|
+
this._serverSchemaListenerAttached = false;
|
|
164
|
+
this._pendingSchemaEvent = null;
|
|
126
165
|
DOM.queueUpdate(() => {
|
|
127
166
|
if (!shouldRunDisconnect)
|
|
128
167
|
return;
|
|
129
168
|
_super.disconnectedCallback.call(this);
|
|
169
|
+
if (this.grid) {
|
|
170
|
+
this.grid.removeEventListener(datasourceEventNames.schemaUpdated, this.handleDatasourceSchemaUpdated);
|
|
171
|
+
}
|
|
130
172
|
if (this.enableFilterBar) {
|
|
131
173
|
this.removeEventListener('filter-changed', this.handleFilterChanged);
|
|
132
174
|
this.removeEventListener('filter-cleared', this.handleFilterCleared);
|
|
@@ -1316,9 +1316,28 @@ export declare class List extends List_base {
|
|
|
1316
1316
|
statusBarConfig: GridProStatusBarConfig;
|
|
1317
1317
|
customActions: CustomAction[];
|
|
1318
1318
|
protected connect: Connect;
|
|
1319
|
+
/**
|
|
1320
|
+
* Latest schema event token: newer `datasource-schema-updated` supersedes in-flight `queueUpdate` work.
|
|
1321
|
+
*/
|
|
1322
|
+
private _pendingSchemaEvent;
|
|
1323
|
+
private _serverSchemaListenerAttached;
|
|
1319
1324
|
get isServerSideDatasource(): boolean;
|
|
1320
1325
|
connectedCallback(): void;
|
|
1321
1326
|
handleCellEditRequest(event: CustomEvent<CellEditRequestEvent>): Promise<void>;
|
|
1327
|
+
/**
|
|
1328
|
+
* Shared markup for CRUD / custom action column icons (grid cell renderers).
|
|
1329
|
+
*/
|
|
1330
|
+
private actionColumnIcon;
|
|
1331
|
+
/**
|
|
1332
|
+
* Builds column defs for CRUD / custom actions in the grid (pinned action column).
|
|
1333
|
+
*/
|
|
1334
|
+
private populateActionButtonsConfig;
|
|
1335
|
+
/**
|
|
1336
|
+
* Server-side row model: `grid-pro` may run `handleSchemaUpdated` before `grid-pro-column` for action
|
|
1337
|
+
* buttons exist in the DOM, so the merge omits them. After schema, repopulate actions and re-dispatch
|
|
1338
|
+
* the same event so `grid-pro` merges again with template columns present.
|
|
1339
|
+
*/
|
|
1340
|
+
private handleDatasourceSchemaUpdated;
|
|
1322
1341
|
disconnectedCallback(): Promise<void>;
|
|
1323
1342
|
get criteria(): string;
|
|
1324
1343
|
get fields(): string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-entity-management",
|
|
3
3
|
"description": "Genesis Foundation Entity Management",
|
|
4
|
-
"version": "14.418.
|
|
4
|
+
"version": "14.418.2-alpha-222b313.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -54,32 +54,32 @@
|
|
|
54
54
|
}
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@genesislcap/foundation-testing": "14.418.
|
|
58
|
-
"@genesislcap/genx": "14.418.
|
|
59
|
-
"@genesislcap/rollup-builder": "14.418.
|
|
60
|
-
"@genesislcap/ts-builder": "14.418.
|
|
61
|
-
"@genesislcap/uvu-playwright-builder": "14.418.
|
|
62
|
-
"@genesislcap/vite-builder": "14.418.
|
|
63
|
-
"@genesislcap/webpack-builder": "14.418.
|
|
57
|
+
"@genesislcap/foundation-testing": "14.418.2-alpha-222b313.0",
|
|
58
|
+
"@genesislcap/genx": "14.418.2-alpha-222b313.0",
|
|
59
|
+
"@genesislcap/rollup-builder": "14.418.2-alpha-222b313.0",
|
|
60
|
+
"@genesislcap/ts-builder": "14.418.2-alpha-222b313.0",
|
|
61
|
+
"@genesislcap/uvu-playwright-builder": "14.418.2-alpha-222b313.0",
|
|
62
|
+
"@genesislcap/vite-builder": "14.418.2-alpha-222b313.0",
|
|
63
|
+
"@genesislcap/webpack-builder": "14.418.2-alpha-222b313.0"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"@ag-grid-community/core": "29.2.0"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@genesislcap/foundation-ai": "14.418.
|
|
70
|
-
"@genesislcap/foundation-comms": "14.418.
|
|
71
|
-
"@genesislcap/foundation-errors": "14.418.
|
|
72
|
-
"@genesislcap/foundation-events": "14.418.
|
|
73
|
-
"@genesislcap/foundation-forms": "14.418.
|
|
74
|
-
"@genesislcap/foundation-logger": "14.418.
|
|
75
|
-
"@genesislcap/foundation-login": "14.418.
|
|
76
|
-
"@genesislcap/foundation-notifications": "14.418.
|
|
77
|
-
"@genesislcap/foundation-ui": "14.418.
|
|
78
|
-
"@genesislcap/foundation-utils": "14.418.
|
|
79
|
-
"@genesislcap/foundation-zero": "14.418.
|
|
80
|
-
"@genesislcap/foundation-zero-grid-pro": "14.418.
|
|
81
|
-
"@genesislcap/grid-pro": "14.418.
|
|
82
|
-
"@genesislcap/web-core": "14.418.
|
|
69
|
+
"@genesislcap/foundation-ai": "14.418.2-alpha-222b313.0",
|
|
70
|
+
"@genesislcap/foundation-comms": "14.418.2-alpha-222b313.0",
|
|
71
|
+
"@genesislcap/foundation-errors": "14.418.2-alpha-222b313.0",
|
|
72
|
+
"@genesislcap/foundation-events": "14.418.2-alpha-222b313.0",
|
|
73
|
+
"@genesislcap/foundation-forms": "14.418.2-alpha-222b313.0",
|
|
74
|
+
"@genesislcap/foundation-logger": "14.418.2-alpha-222b313.0",
|
|
75
|
+
"@genesislcap/foundation-login": "14.418.2-alpha-222b313.0",
|
|
76
|
+
"@genesislcap/foundation-notifications": "14.418.2-alpha-222b313.0",
|
|
77
|
+
"@genesislcap/foundation-ui": "14.418.2-alpha-222b313.0",
|
|
78
|
+
"@genesislcap/foundation-utils": "14.418.2-alpha-222b313.0",
|
|
79
|
+
"@genesislcap/foundation-zero": "14.418.2-alpha-222b313.0",
|
|
80
|
+
"@genesislcap/foundation-zero-grid-pro": "14.418.2-alpha-222b313.0",
|
|
81
|
+
"@genesislcap/grid-pro": "14.418.2-alpha-222b313.0",
|
|
82
|
+
"@genesislcap/web-core": "14.418.2-alpha-222b313.0",
|
|
83
83
|
"change-case": "^4.1.2"
|
|
84
84
|
},
|
|
85
85
|
"repository": {
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"access": "public"
|
|
92
92
|
},
|
|
93
93
|
"customElements": "dist/custom-elements.json",
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "0d2672c05ec4efeab709698bde5a604c0866bda6"
|
|
95
95
|
}
|