@genesislcap/foundation-entity-management 14.107.1 → 14.109.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 +177 -177
- package/dist/dts/list/list.d.ts.map +1 -1
- package/dist/esm/list/list.js +27 -21
- package/dist/esm/list/list.template.js +3 -3
- package/package.json +15 -15
|
@@ -777,55 +777,6 @@
|
|
|
777
777
|
}
|
|
778
778
|
]
|
|
779
779
|
},
|
|
780
|
-
{
|
|
781
|
-
"kind": "javascript-module",
|
|
782
|
-
"path": "src/layouts/default.ts",
|
|
783
|
-
"declarations": [
|
|
784
|
-
{
|
|
785
|
-
"kind": "variable",
|
|
786
|
-
"name": "loginLayout",
|
|
787
|
-
"default": "new FASTElementLayout(\n html`\n <div class=\"container\">\n <div class=\"content\">\n <slot></slot>\n </div>\n </div>\n `,\n baseLayoutCss,\n)"
|
|
788
|
-
},
|
|
789
|
-
{
|
|
790
|
-
"kind": "variable",
|
|
791
|
-
"name": "defaultLayout",
|
|
792
|
-
"default": "new FASTElementLayout(\n html`\n <div class=\"container\">\n <div class=\"content\">\n <slot></slot>\n </div>\n </div>\n `,\n css`\n ${baseLayoutCss}\n `,\n)"
|
|
793
|
-
}
|
|
794
|
-
],
|
|
795
|
-
"exports": [
|
|
796
|
-
{
|
|
797
|
-
"kind": "js",
|
|
798
|
-
"name": "loginLayout",
|
|
799
|
-
"declaration": {
|
|
800
|
-
"name": "loginLayout",
|
|
801
|
-
"module": "src/layouts/default.ts"
|
|
802
|
-
}
|
|
803
|
-
},
|
|
804
|
-
{
|
|
805
|
-
"kind": "js",
|
|
806
|
-
"name": "defaultLayout",
|
|
807
|
-
"declaration": {
|
|
808
|
-
"name": "defaultLayout",
|
|
809
|
-
"module": "src/layouts/default.ts"
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
]
|
|
813
|
-
},
|
|
814
|
-
{
|
|
815
|
-
"kind": "javascript-module",
|
|
816
|
-
"path": "src/layouts/index.ts",
|
|
817
|
-
"declarations": [],
|
|
818
|
-
"exports": [
|
|
819
|
-
{
|
|
820
|
-
"kind": "js",
|
|
821
|
-
"name": "*",
|
|
822
|
-
"declaration": {
|
|
823
|
-
"name": "*",
|
|
824
|
-
"package": "./default"
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
]
|
|
828
|
-
},
|
|
829
780
|
{
|
|
830
781
|
"kind": "javascript-module",
|
|
831
782
|
"path": "src/list/index.ts",
|
|
@@ -869,7 +820,7 @@
|
|
|
869
820
|
{
|
|
870
821
|
"kind": "variable",
|
|
871
822
|
"name": "listTemplate",
|
|
872
|
-
"default": "html<List>`\n <div class=\"container\">\n ${when(\n (x) => x.enableFilterBar,\n html<List>`\n <zero-filter-bar\n resource=${(x) => x.resourceName}\n only=${(x) => x.columns?.map((colDef) => colDef.field).filter((field) => !!field)}\n labels=${(x) => x.columns?.map((colDef) => colDef.headerName || '')}\n target=\"datasource\"\n ></zero-filter-bar>\n `,\n )}\n <zero-grid-pro\n ${ref('grid')}\n auto-cell-renderer-by-type\n rowSelection=\"single\"\n rowHeight=\"36\"\n headerHeight=\"36\"\n persist-column-state-key=${(x) => x.persistColumnStateKey}\n ?only-template-col-defs=${(x) => !!x.columns}\n
|
|
823
|
+
"default": "html<List>`\n <div class=\"container\">\n ${when(\n (x) => x.enableFilterBar,\n html<List>`\n <zero-filter-bar\n resource=${(x) => x.resourceName}\n only=${(x) => x.columns?.map((colDef) => colDef.field).filter((field) => !!field)}\n labels=${(x) => x.columns?.map((colDef) => colDef.headerName || '')}\n target=\"datasource\"\n ></zero-filter-bar>\n `,\n )}\n <zero-grid-pro\n ${ref('grid')}\n auto-cell-renderer-by-type\n rowSelection=\"single\"\n rowHeight=\"36\"\n headerHeight=\"36\"\n persist-column-state-key=${(x) => x.persistColumnStateKey}\n ?only-template-col-defs=${(x) => !!x.columns}\n readOnlyEdit=\"true\"\n tooltipMouseTrack=\"true\"\n tooltipShowDelay=\"0\"\n async-add=${(x) => x.asyncAdd}\n async-remove=${(x) => x.asyncRemove}\n async-update=${(x) => x.asyncUpdate}\n enable-cell-flashing=${(x) => x.enableCellFlashing}\n enable-row-flashing=${(x) => x.enableRowFlashing}\n >\n <grid-pro-genesis-datasource\n ${ref('datasource')}\n :deferredGridOptions=${(x) => x.gridOptions}\n criteria=${(x) => x.datasourceConfig?.criteria}\n fields=${(x) => x.datasourceConfig?.fields}\n is-snapshot=${(x) => x.datasourceConfig?.isSnapshot}\n max-rows=${(x) => x.datasourceConfig?.maxRows}\n max-view=${(x) => x.datasourceConfig?.maxView}\n moving-view=${(x) => x.datasourceConfig?.movingView}\n order-by=${(x) => x.datasourceConfig?.orderBy}\n polling-interval=${(x) => x.datasourceConfig?.pollingInterval}\n resource-name=${(x) => x.resourceName}\n reverse=${(x) => x.datasourceConfig?.reverse}\n ></grid-pro-genesis-datasource>\n ${repeat(\n (x) => x.columns,\n html`\n <grid-pro-column :definition=${(x) => x}></grid-pro-column>\n `,\n )}\n ${repeat(\n (x) => x.actionButtonsConfig,\n html`\n <grid-pro-column :definition=${(x) => x}></grid-pro-column>\n `,\n )}\n </zero-grid-pro>\n </div>\n`"
|
|
873
824
|
}
|
|
874
825
|
],
|
|
875
826
|
"exports": [
|
|
@@ -1060,7 +1011,7 @@
|
|
|
1060
1011
|
{
|
|
1061
1012
|
"name": "event",
|
|
1062
1013
|
"type": {
|
|
1063
|
-
"text": "
|
|
1014
|
+
"text": "CellEditRequestEvent"
|
|
1064
1015
|
}
|
|
1065
1016
|
}
|
|
1066
1017
|
]
|
|
@@ -1234,153 +1185,49 @@
|
|
|
1234
1185
|
},
|
|
1235
1186
|
{
|
|
1236
1187
|
"kind": "javascript-module",
|
|
1237
|
-
"path": "src/
|
|
1238
|
-
"declarations": [
|
|
1239
|
-
"exports": [
|
|
1188
|
+
"path": "src/layouts/default.ts",
|
|
1189
|
+
"declarations": [
|
|
1240
1190
|
{
|
|
1241
|
-
"kind": "
|
|
1242
|
-
"name": "
|
|
1243
|
-
"
|
|
1244
|
-
"name": "*",
|
|
1245
|
-
"package": "./main.template"
|
|
1246
|
-
}
|
|
1191
|
+
"kind": "variable",
|
|
1192
|
+
"name": "loginLayout",
|
|
1193
|
+
"default": "new FASTElementLayout(\n html`\n <div class=\"container\">\n <div class=\"content\">\n <slot></slot>\n </div>\n </div>\n `,\n baseLayoutCss,\n)"
|
|
1247
1194
|
},
|
|
1248
|
-
{
|
|
1249
|
-
"kind": "js",
|
|
1250
|
-
"name": "*",
|
|
1251
|
-
"declaration": {
|
|
1252
|
-
"name": "*",
|
|
1253
|
-
"package": "./main"
|
|
1254
|
-
}
|
|
1255
|
-
}
|
|
1256
|
-
]
|
|
1257
|
-
},
|
|
1258
|
-
{
|
|
1259
|
-
"kind": "javascript-module",
|
|
1260
|
-
"path": "src/main/main.styles.ts",
|
|
1261
|
-
"declarations": [
|
|
1262
1195
|
{
|
|
1263
1196
|
"kind": "variable",
|
|
1264
|
-
"name": "
|
|
1265
|
-
"default": "
|
|
1197
|
+
"name": "defaultLayout",
|
|
1198
|
+
"default": "new FASTElementLayout(\n html`\n <div class=\"container\">\n <div class=\"content\">\n <slot></slot>\n </div>\n </div>\n `,\n css`\n ${baseLayoutCss}\n `,\n)"
|
|
1266
1199
|
}
|
|
1267
1200
|
],
|
|
1268
1201
|
"exports": [
|
|
1269
1202
|
{
|
|
1270
1203
|
"kind": "js",
|
|
1271
|
-
"name": "
|
|
1204
|
+
"name": "loginLayout",
|
|
1272
1205
|
"declaration": {
|
|
1273
|
-
"name": "
|
|
1274
|
-
"module": "src/
|
|
1206
|
+
"name": "loginLayout",
|
|
1207
|
+
"module": "src/layouts/default.ts"
|
|
1208
|
+
}
|
|
1209
|
+
},
|
|
1210
|
+
{
|
|
1211
|
+
"kind": "js",
|
|
1212
|
+
"name": "defaultLayout",
|
|
1213
|
+
"declaration": {
|
|
1214
|
+
"name": "defaultLayout",
|
|
1215
|
+
"module": "src/layouts/default.ts"
|
|
1275
1216
|
}
|
|
1276
1217
|
}
|
|
1277
1218
|
]
|
|
1278
1219
|
},
|
|
1279
1220
|
{
|
|
1280
1221
|
"kind": "javascript-module",
|
|
1281
|
-
"path": "src/
|
|
1222
|
+
"path": "src/layouts/index.ts",
|
|
1282
1223
|
"declarations": [],
|
|
1283
|
-
"exports": []
|
|
1284
|
-
},
|
|
1285
|
-
{
|
|
1286
|
-
"kind": "javascript-module",
|
|
1287
|
-
"path": "src/main/main.ts",
|
|
1288
|
-
"declarations": [
|
|
1289
|
-
{
|
|
1290
|
-
"kind": "class",
|
|
1291
|
-
"description": "",
|
|
1292
|
-
"name": "MainApplication",
|
|
1293
|
-
"members": [
|
|
1294
|
-
{
|
|
1295
|
-
"kind": "field",
|
|
1296
|
-
"name": "config",
|
|
1297
|
-
"type": {
|
|
1298
|
-
"text": "MainRouterConfig"
|
|
1299
|
-
}
|
|
1300
|
-
},
|
|
1301
|
-
{
|
|
1302
|
-
"kind": "field",
|
|
1303
|
-
"name": "connect",
|
|
1304
|
-
"type": {
|
|
1305
|
-
"text": "Connect"
|
|
1306
|
-
}
|
|
1307
|
-
},
|
|
1308
|
-
{
|
|
1309
|
-
"kind": "field",
|
|
1310
|
-
"name": "session",
|
|
1311
|
-
"type": {
|
|
1312
|
-
"text": "Session"
|
|
1313
|
-
}
|
|
1314
|
-
},
|
|
1315
|
-
{
|
|
1316
|
-
"kind": "field",
|
|
1317
|
-
"name": "container",
|
|
1318
|
-
"type": {
|
|
1319
|
-
"text": "Container"
|
|
1320
|
-
}
|
|
1321
|
-
},
|
|
1322
|
-
{
|
|
1323
|
-
"kind": "field",
|
|
1324
|
-
"name": "provider",
|
|
1325
|
-
"type": {
|
|
1326
|
-
"text": "any"
|
|
1327
|
-
}
|
|
1328
|
-
},
|
|
1329
|
-
{
|
|
1330
|
-
"kind": "field",
|
|
1331
|
-
"name": "ready",
|
|
1332
|
-
"type": {
|
|
1333
|
-
"text": "boolean"
|
|
1334
|
-
},
|
|
1335
|
-
"default": "false"
|
|
1336
|
-
},
|
|
1337
|
-
{
|
|
1338
|
-
"kind": "field",
|
|
1339
|
-
"name": "data",
|
|
1340
|
-
"type": {
|
|
1341
|
-
"text": "any"
|
|
1342
|
-
},
|
|
1343
|
-
"default": "null"
|
|
1344
|
-
},
|
|
1345
|
-
{
|
|
1346
|
-
"kind": "method",
|
|
1347
|
-
"name": "onLuminanceToggle"
|
|
1348
|
-
},
|
|
1349
|
-
{
|
|
1350
|
-
"kind": "method",
|
|
1351
|
-
"name": "loadRemotes"
|
|
1352
|
-
},
|
|
1353
|
-
{
|
|
1354
|
-
"kind": "method",
|
|
1355
|
-
"name": "selectTemplate"
|
|
1356
|
-
},
|
|
1357
|
-
{
|
|
1358
|
-
"kind": "method",
|
|
1359
|
-
"name": "registerDIDependencies",
|
|
1360
|
-
"privacy": "private"
|
|
1361
|
-
}
|
|
1362
|
-
],
|
|
1363
|
-
"superclass": {
|
|
1364
|
-
"name": "FASTElement",
|
|
1365
|
-
"package": "@microsoft/fast-element"
|
|
1366
|
-
},
|
|
1367
|
-
"customElement": true
|
|
1368
|
-
}
|
|
1369
|
-
],
|
|
1370
1224
|
"exports": [
|
|
1371
1225
|
{
|
|
1372
1226
|
"kind": "js",
|
|
1373
|
-
"name": "
|
|
1374
|
-
"declaration": {
|
|
1375
|
-
"name": "MainApplication",
|
|
1376
|
-
"module": "src/main/main.ts"
|
|
1377
|
-
}
|
|
1378
|
-
},
|
|
1379
|
-
{
|
|
1380
|
-
"kind": "custom-element-definition",
|
|
1227
|
+
"name": "*",
|
|
1381
1228
|
"declaration": {
|
|
1382
|
-
"name": "
|
|
1383
|
-
"
|
|
1229
|
+
"name": "*",
|
|
1230
|
+
"package": "./default"
|
|
1384
1231
|
}
|
|
1385
1232
|
}
|
|
1386
1233
|
]
|
|
@@ -2250,6 +2097,159 @@
|
|
|
2250
2097
|
}
|
|
2251
2098
|
]
|
|
2252
2099
|
},
|
|
2100
|
+
{
|
|
2101
|
+
"kind": "javascript-module",
|
|
2102
|
+
"path": "src/main/index.ts",
|
|
2103
|
+
"declarations": [],
|
|
2104
|
+
"exports": [
|
|
2105
|
+
{
|
|
2106
|
+
"kind": "js",
|
|
2107
|
+
"name": "*",
|
|
2108
|
+
"declaration": {
|
|
2109
|
+
"name": "*",
|
|
2110
|
+
"package": "./main.template"
|
|
2111
|
+
}
|
|
2112
|
+
},
|
|
2113
|
+
{
|
|
2114
|
+
"kind": "js",
|
|
2115
|
+
"name": "*",
|
|
2116
|
+
"declaration": {
|
|
2117
|
+
"name": "*",
|
|
2118
|
+
"package": "./main"
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2121
|
+
]
|
|
2122
|
+
},
|
|
2123
|
+
{
|
|
2124
|
+
"kind": "javascript-module",
|
|
2125
|
+
"path": "src/main/main.styles.ts",
|
|
2126
|
+
"declarations": [
|
|
2127
|
+
{
|
|
2128
|
+
"kind": "variable",
|
|
2129
|
+
"name": "MainStyles",
|
|
2130
|
+
"default": "css`\n ${mixinRobotoFont()}\n :host {\n contain: content;\n }\n\n :host,\n zero-design-system-provider,\n .dynamic-template,\n foundation-router {\n display: flex;\n width: 100%;\n height: 100%;\n }\n\n fast-progress {\n --accent-foreground-rest: #654df9;\n\n height: calc(var(--design-unit) * 1px);\n margin: 0;\n width: 100%;\n }\n`"
|
|
2131
|
+
}
|
|
2132
|
+
],
|
|
2133
|
+
"exports": [
|
|
2134
|
+
{
|
|
2135
|
+
"kind": "js",
|
|
2136
|
+
"name": "MainStyles",
|
|
2137
|
+
"declaration": {
|
|
2138
|
+
"name": "MainStyles",
|
|
2139
|
+
"module": "src/main/main.styles.ts"
|
|
2140
|
+
}
|
|
2141
|
+
}
|
|
2142
|
+
]
|
|
2143
|
+
},
|
|
2144
|
+
{
|
|
2145
|
+
"kind": "javascript-module",
|
|
2146
|
+
"path": "src/main/main.template.ts",
|
|
2147
|
+
"declarations": [],
|
|
2148
|
+
"exports": []
|
|
2149
|
+
},
|
|
2150
|
+
{
|
|
2151
|
+
"kind": "javascript-module",
|
|
2152
|
+
"path": "src/main/main.ts",
|
|
2153
|
+
"declarations": [
|
|
2154
|
+
{
|
|
2155
|
+
"kind": "class",
|
|
2156
|
+
"description": "",
|
|
2157
|
+
"name": "MainApplication",
|
|
2158
|
+
"members": [
|
|
2159
|
+
{
|
|
2160
|
+
"kind": "field",
|
|
2161
|
+
"name": "config",
|
|
2162
|
+
"type": {
|
|
2163
|
+
"text": "MainRouterConfig"
|
|
2164
|
+
}
|
|
2165
|
+
},
|
|
2166
|
+
{
|
|
2167
|
+
"kind": "field",
|
|
2168
|
+
"name": "connect",
|
|
2169
|
+
"type": {
|
|
2170
|
+
"text": "Connect"
|
|
2171
|
+
}
|
|
2172
|
+
},
|
|
2173
|
+
{
|
|
2174
|
+
"kind": "field",
|
|
2175
|
+
"name": "session",
|
|
2176
|
+
"type": {
|
|
2177
|
+
"text": "Session"
|
|
2178
|
+
}
|
|
2179
|
+
},
|
|
2180
|
+
{
|
|
2181
|
+
"kind": "field",
|
|
2182
|
+
"name": "container",
|
|
2183
|
+
"type": {
|
|
2184
|
+
"text": "Container"
|
|
2185
|
+
}
|
|
2186
|
+
},
|
|
2187
|
+
{
|
|
2188
|
+
"kind": "field",
|
|
2189
|
+
"name": "provider",
|
|
2190
|
+
"type": {
|
|
2191
|
+
"text": "any"
|
|
2192
|
+
}
|
|
2193
|
+
},
|
|
2194
|
+
{
|
|
2195
|
+
"kind": "field",
|
|
2196
|
+
"name": "ready",
|
|
2197
|
+
"type": {
|
|
2198
|
+
"text": "boolean"
|
|
2199
|
+
},
|
|
2200
|
+
"default": "false"
|
|
2201
|
+
},
|
|
2202
|
+
{
|
|
2203
|
+
"kind": "field",
|
|
2204
|
+
"name": "data",
|
|
2205
|
+
"type": {
|
|
2206
|
+
"text": "any"
|
|
2207
|
+
},
|
|
2208
|
+
"default": "null"
|
|
2209
|
+
},
|
|
2210
|
+
{
|
|
2211
|
+
"kind": "method",
|
|
2212
|
+
"name": "onLuminanceToggle"
|
|
2213
|
+
},
|
|
2214
|
+
{
|
|
2215
|
+
"kind": "method",
|
|
2216
|
+
"name": "loadRemotes"
|
|
2217
|
+
},
|
|
2218
|
+
{
|
|
2219
|
+
"kind": "method",
|
|
2220
|
+
"name": "selectTemplate"
|
|
2221
|
+
},
|
|
2222
|
+
{
|
|
2223
|
+
"kind": "method",
|
|
2224
|
+
"name": "registerDIDependencies",
|
|
2225
|
+
"privacy": "private"
|
|
2226
|
+
}
|
|
2227
|
+
],
|
|
2228
|
+
"superclass": {
|
|
2229
|
+
"name": "FASTElement",
|
|
2230
|
+
"package": "@microsoft/fast-element"
|
|
2231
|
+
},
|
|
2232
|
+
"customElement": true
|
|
2233
|
+
}
|
|
2234
|
+
],
|
|
2235
|
+
"exports": [
|
|
2236
|
+
{
|
|
2237
|
+
"kind": "js",
|
|
2238
|
+
"name": "MainApplication",
|
|
2239
|
+
"declaration": {
|
|
2240
|
+
"name": "MainApplication",
|
|
2241
|
+
"module": "src/main/main.ts"
|
|
2242
|
+
}
|
|
2243
|
+
},
|
|
2244
|
+
{
|
|
2245
|
+
"kind": "custom-element-definition",
|
|
2246
|
+
"declaration": {
|
|
2247
|
+
"name": "MainApplication",
|
|
2248
|
+
"module": "src/main/main.ts"
|
|
2249
|
+
}
|
|
2250
|
+
}
|
|
2251
|
+
]
|
|
2252
|
+
},
|
|
2253
2253
|
{
|
|
2254
2254
|
"kind": "javascript-module",
|
|
2255
2255
|
"path": "src/routes/config.ts",
|
|
@@ -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,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAEL,wBAAwB,EACxB,WAAW,EACZ,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/list/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAEL,wBAAwB,EACxB,WAAW,EACZ,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAuB,WAAW,EAAoB,MAAM,yBAAyB,CAAC;AAC7F,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAK/D,qBAKa,IAAK,SAAQ,WAAW;IAC7B,YAAY,EAAE,MAAM,CAAM;IAC1B,KAAK,EAAE,MAAM,CAAM;IACwB,qBAAqB,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,OAAO,CAAC;IAC5B,eAAe,EAAE,OAAO,CAAC;IACjC,QAAQ,UAAS;IACd,WAAW,UAAS;IACpB,WAAW,UAAQ;IACX,kBAAkB,UAAS;IAC5B,iBAAiB,UAAS;IACpC,QAAQ,UAAS;IACf,UAAU,UAAS;IACjE,IAAI,EAAG,WAAW,CAAC;IACnB,UAAU,EAAG,wBAAwB,CAAC;IACjC,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,gBAAgB,EAAE,uBAAuB,CAAC;IAC1C,mBAAmB,QAAM;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IAEvB,SAAS,CAAC,OAAO,EAAG,OAAO,CAAC;IAErC,iBAAiB;YA6DH,oBAAoB;IA+ClC,oBAAoB,IAAI,IAAI;IAQ5B,OAAO,CAAC,mBAAmB;IAM3B,OAAO,CAAC,mBAAmB;IAK3B,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,IAAI,CAEV;IAEI,MAAM,CAAC,CAAC,KAAA;CAGf"}
|
package/dist/esm/list/list.js
CHANGED
|
@@ -2,6 +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 { GRID_READY_EVENT, } from '@genesislcap/foundation-zero-grid-pro';
|
|
5
|
+
import { EDITED_COLUMN_FIELD, ERROR_COLUMN_FIELD } from '@genesislcap/grid-pro';
|
|
5
6
|
import { attr, customElement, FASTElement, html, observable } from '@microsoft/fast-element';
|
|
6
7
|
import { buttonCellRenderer } from '../utils';
|
|
7
8
|
import { listStyles } from './list.styles';
|
|
@@ -33,7 +34,7 @@ let List = class List extends FASTElement {
|
|
|
33
34
|
});
|
|
34
35
|
this.grid.gridApi.addEventListener(Events.EVENT_ROW_CLICKED, (e) => this.select(e));
|
|
35
36
|
if (this.updateEvent) {
|
|
36
|
-
this.grid.gridApi.addEventListener(Events.
|
|
37
|
+
this.grid.gridApi.addEventListener(Events.EVENT_CELL_EDIT_REQUEST, (e) => this.onCellEditingStopped(e));
|
|
37
38
|
}
|
|
38
39
|
this.actionButtonsConfig = [];
|
|
39
40
|
if (this.updateEvent && !this.hideEdit) {
|
|
@@ -66,26 +67,31 @@ let List = class List extends FASTElement {
|
|
|
66
67
|
onCellEditingStopped(event) {
|
|
67
68
|
var _a, _b;
|
|
68
69
|
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
})
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
70
|
+
const jsonSchemaResponse = yield this.connect.getJSONSchema(this.updateEvent);
|
|
71
|
+
const jsonSchema = (_b = (_a = jsonSchemaResponse === null || jsonSchemaResponse === void 0 ? void 0 : jsonSchemaResponse.INBOUND) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.DETAILS;
|
|
72
|
+
const editedField = event.column.getColDef().field;
|
|
73
|
+
event.node.setData(Object.assign(Object.assign({}, event.data), { [ERROR_COLUMN_FIELD]: undefined, [EDITED_COLUMN_FIELD]: editedField, [editedField]: event.newValue }));
|
|
74
|
+
// copy only properties required by schema
|
|
75
|
+
const payload = Object.fromEntries(Object.keys(jsonSchema.properties).map((key) => [
|
|
76
|
+
key,
|
|
77
|
+
// if column config was provided get data using grid api, so it takes into account
|
|
78
|
+
// methods like valueGetter
|
|
79
|
+
event.api.getColumnDef(key) ? event.api.getValue(key, event.node) : event.data[key],
|
|
80
|
+
]));
|
|
81
|
+
const updateReq = yield this.connect.commitEvent(this.updateEvent, {
|
|
82
|
+
// merge current payload with the newly edited cell value
|
|
83
|
+
DETAILS: Object.assign(Object.assign({}, payload), { [editedField]: event.newValue }),
|
|
84
|
+
});
|
|
85
|
+
if (updateReq.ERROR) {
|
|
86
|
+
this.$emit('submit-failure', { payload, errors: updateReq.ERROR });
|
|
87
|
+
event.node.setData(Object.assign(Object.assign({}, event.data), { [editedField]: event.oldValue, [EDITED_COLUMN_FIELD]: '', [ERROR_COLUMN_FIELD]: {
|
|
88
|
+
column: editedField,
|
|
89
|
+
message: updateReq.ERROR.map((error) => `${error.CODE}: ${error.TEXT}`),
|
|
90
|
+
} }));
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
event.node.setData(Object.assign(Object.assign({}, event.data), { [editedField]: event.newValue, [EDITED_COLUMN_FIELD]: '' }));
|
|
94
|
+
this.$emit('submit-success', { payload });
|
|
89
95
|
}
|
|
90
96
|
});
|
|
91
97
|
}
|
|
@@ -17,9 +17,9 @@ export const listTemplate = html `
|
|
|
17
17
|
headerHeight="36"
|
|
18
18
|
persist-column-state-key=${(x) => x.persistColumnStateKey}
|
|
19
19
|
?only-template-col-defs=${(x) => !!x.columns}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
readOnlyEdit="true"
|
|
21
|
+
tooltipMouseTrack="true"
|
|
22
|
+
tooltipShowDelay="0"
|
|
23
23
|
async-add=${(x) => x.asyncAdd}
|
|
24
24
|
async-remove=${(x) => x.asyncRemove}
|
|
25
25
|
async-update=${(x) => x.asyncUpdate}
|
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.
|
|
4
|
+
"version": "14.109.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -44,23 +44,23 @@
|
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@genesislcap/foundation-login": "^14.40.0",
|
|
47
|
-
"@genesislcap/foundation-testing": "14.
|
|
48
|
-
"@genesislcap/genx": "14.
|
|
47
|
+
"@genesislcap/foundation-testing": "14.109.0",
|
|
48
|
+
"@genesislcap/genx": "14.109.0",
|
|
49
49
|
"rimraf": "^3.0.2"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@ag-grid-community/core": "29.2.0",
|
|
53
|
-
"@genesislcap/foundation-comms": "14.
|
|
54
|
-
"@genesislcap/foundation-errors": "14.
|
|
55
|
-
"@genesislcap/foundation-forms": "14.
|
|
56
|
-
"@genesislcap/foundation-logger": "14.
|
|
57
|
-
"@genesislcap/foundation-login": "14.
|
|
58
|
-
"@genesislcap/foundation-notifications": "14.
|
|
59
|
-
"@genesislcap/foundation-ui": "14.
|
|
60
|
-
"@genesislcap/foundation-utils": "14.
|
|
61
|
-
"@genesislcap/foundation-zero": "14.
|
|
62
|
-
"@genesislcap/foundation-zero-grid-pro": "14.
|
|
63
|
-
"@genesislcap/grid-pro": "14.
|
|
53
|
+
"@genesislcap/foundation-comms": "14.109.0",
|
|
54
|
+
"@genesislcap/foundation-errors": "14.109.0",
|
|
55
|
+
"@genesislcap/foundation-forms": "14.109.0",
|
|
56
|
+
"@genesislcap/foundation-logger": "14.109.0",
|
|
57
|
+
"@genesislcap/foundation-login": "14.109.0",
|
|
58
|
+
"@genesislcap/foundation-notifications": "14.109.0",
|
|
59
|
+
"@genesislcap/foundation-ui": "14.109.0",
|
|
60
|
+
"@genesislcap/foundation-utils": "14.109.0",
|
|
61
|
+
"@genesislcap/foundation-zero": "14.109.0",
|
|
62
|
+
"@genesislcap/foundation-zero-grid-pro": "14.109.0",
|
|
63
|
+
"@genesislcap/grid-pro": "14.109.0",
|
|
64
64
|
"@microsoft/fast-components": "^2.21.3",
|
|
65
65
|
"@microsoft/fast-element": "^1.7.0",
|
|
66
66
|
"@microsoft/fast-foundation": "^2.33.2",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"access": "public"
|
|
77
77
|
},
|
|
78
78
|
"customElements": "dist/custom-elements.json",
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "d2224a8aa652206cfd991b9b6fbe4b9164188501"
|
|
80
80
|
}
|