@genesislcap/foundation-ui 14.141.0 → 14.141.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/custom-elements.json +237 -218
- package/dist/dts/multiselect/multiselect-consts.d.ts +1 -2
- package/dist/dts/multiselect/multiselect-consts.d.ts.map +1 -1
- package/dist/dts/multiselect/multiselect.d.ts +16 -2
- package/dist/dts/multiselect/multiselect.d.ts.map +1 -1
- package/dist/esm/multiselect/multiselect-consts.js +0 -1
- package/dist/esm/multiselect/multiselect.js +53 -15
- package/package.json +10 -10
|
@@ -826,6 +826,219 @@
|
|
|
826
826
|
}
|
|
827
827
|
]
|
|
828
828
|
},
|
|
829
|
+
{
|
|
830
|
+
"kind": "javascript-module",
|
|
831
|
+
"path": "src/_config/index.ts",
|
|
832
|
+
"declarations": [],
|
|
833
|
+
"exports": [
|
|
834
|
+
{
|
|
835
|
+
"kind": "js",
|
|
836
|
+
"name": "*",
|
|
837
|
+
"declaration": {
|
|
838
|
+
"name": "*",
|
|
839
|
+
"package": "./styles"
|
|
840
|
+
}
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
"kind": "js",
|
|
844
|
+
"name": "*",
|
|
845
|
+
"declaration": {
|
|
846
|
+
"name": "*",
|
|
847
|
+
"package": "./tokens"
|
|
848
|
+
}
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
"kind": "js",
|
|
852
|
+
"name": "*",
|
|
853
|
+
"declaration": {
|
|
854
|
+
"name": "*",
|
|
855
|
+
"package": "./values"
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
]
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
"kind": "javascript-module",
|
|
862
|
+
"path": "src/accordion/accordion.styles.ts",
|
|
863
|
+
"declarations": [
|
|
864
|
+
{
|
|
865
|
+
"kind": "function",
|
|
866
|
+
"name": "foundationAccordionStyles",
|
|
867
|
+
"return": {
|
|
868
|
+
"type": {
|
|
869
|
+
"text": "ElementStyles"
|
|
870
|
+
}
|
|
871
|
+
},
|
|
872
|
+
"parameters": [
|
|
873
|
+
{
|
|
874
|
+
"name": "context",
|
|
875
|
+
"type": {
|
|
876
|
+
"text": "ElementDefinitionContext"
|
|
877
|
+
}
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
"name": "definition",
|
|
881
|
+
"type": {
|
|
882
|
+
"text": "FoundationElementDefinition"
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
]
|
|
886
|
+
}
|
|
887
|
+
],
|
|
888
|
+
"exports": [
|
|
889
|
+
{
|
|
890
|
+
"kind": "js",
|
|
891
|
+
"name": "foundationAccordionStyles",
|
|
892
|
+
"declaration": {
|
|
893
|
+
"name": "foundationAccordionStyles",
|
|
894
|
+
"module": "src/accordion/accordion.styles.ts"
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
]
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
"kind": "javascript-module",
|
|
901
|
+
"path": "src/accordion/accordion.template.ts",
|
|
902
|
+
"declarations": [
|
|
903
|
+
{
|
|
904
|
+
"kind": "function",
|
|
905
|
+
"name": "foundationAccordionTemplate",
|
|
906
|
+
"return": {
|
|
907
|
+
"type": {
|
|
908
|
+
"text": "ViewTemplate<Accordion>"
|
|
909
|
+
}
|
|
910
|
+
},
|
|
911
|
+
"parameters": [
|
|
912
|
+
{
|
|
913
|
+
"name": "context",
|
|
914
|
+
"type": {
|
|
915
|
+
"text": "ElementDefinitionContext"
|
|
916
|
+
}
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
"name": "definition",
|
|
920
|
+
"type": {
|
|
921
|
+
"text": "FoundationElementDefinition"
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
]
|
|
925
|
+
}
|
|
926
|
+
],
|
|
927
|
+
"exports": [
|
|
928
|
+
{
|
|
929
|
+
"kind": "js",
|
|
930
|
+
"name": "foundationAccordionTemplate",
|
|
931
|
+
"declaration": {
|
|
932
|
+
"name": "foundationAccordionTemplate",
|
|
933
|
+
"module": "src/accordion/accordion.template.ts"
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
]
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
"kind": "javascript-module",
|
|
940
|
+
"path": "src/accordion/accordion.ts",
|
|
941
|
+
"declarations": [
|
|
942
|
+
{
|
|
943
|
+
"kind": "class",
|
|
944
|
+
"description": "",
|
|
945
|
+
"name": "Accordion",
|
|
946
|
+
"superclass": {
|
|
947
|
+
"name": "FASTAccordion",
|
|
948
|
+
"package": "@microsoft/fast-foundation"
|
|
949
|
+
},
|
|
950
|
+
"tagName": "%%prefix%%-accordion",
|
|
951
|
+
"customElement": true
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
"kind": "variable",
|
|
955
|
+
"name": "foundationAccordionShadowOptions",
|
|
956
|
+
"type": {
|
|
957
|
+
"text": "ShadowRootInit"
|
|
958
|
+
},
|
|
959
|
+
"default": "{\n delegatesFocus: true,\n mode: 'open',\n}"
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
"kind": "variable",
|
|
963
|
+
"name": "defaultAccordionConfig",
|
|
964
|
+
"type": {
|
|
965
|
+
"text": "object"
|
|
966
|
+
},
|
|
967
|
+
"default": "{}"
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"kind": "variable",
|
|
971
|
+
"name": "foundationAccordion",
|
|
972
|
+
"description": "The Foundation Accordion",
|
|
973
|
+
"privacy": "public"
|
|
974
|
+
}
|
|
975
|
+
],
|
|
976
|
+
"exports": [
|
|
977
|
+
{
|
|
978
|
+
"kind": "js",
|
|
979
|
+
"name": "Accordion",
|
|
980
|
+
"declaration": {
|
|
981
|
+
"name": "Accordion",
|
|
982
|
+
"module": "src/accordion/accordion.ts"
|
|
983
|
+
}
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
"kind": "js",
|
|
987
|
+
"name": "foundationAccordionShadowOptions",
|
|
988
|
+
"declaration": {
|
|
989
|
+
"name": "foundationAccordionShadowOptions",
|
|
990
|
+
"module": "src/accordion/accordion.ts"
|
|
991
|
+
}
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
"kind": "js",
|
|
995
|
+
"name": "defaultAccordionConfig",
|
|
996
|
+
"declaration": {
|
|
997
|
+
"name": "defaultAccordionConfig",
|
|
998
|
+
"module": "src/accordion/accordion.ts"
|
|
999
|
+
}
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
"kind": "js",
|
|
1003
|
+
"name": "foundationAccordion",
|
|
1004
|
+
"declaration": {
|
|
1005
|
+
"name": "foundationAccordion",
|
|
1006
|
+
"module": "src/accordion/accordion.ts"
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
]
|
|
1010
|
+
},
|
|
1011
|
+
{
|
|
1012
|
+
"kind": "javascript-module",
|
|
1013
|
+
"path": "src/accordion/index.ts",
|
|
1014
|
+
"declarations": [],
|
|
1015
|
+
"exports": [
|
|
1016
|
+
{
|
|
1017
|
+
"kind": "js",
|
|
1018
|
+
"name": "*",
|
|
1019
|
+
"declaration": {
|
|
1020
|
+
"name": "*",
|
|
1021
|
+
"package": "./accordion.template"
|
|
1022
|
+
}
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
"kind": "js",
|
|
1026
|
+
"name": "*",
|
|
1027
|
+
"declaration": {
|
|
1028
|
+
"name": "*",
|
|
1029
|
+
"package": "./accordion.styles"
|
|
1030
|
+
}
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
"kind": "js",
|
|
1034
|
+
"name": "*",
|
|
1035
|
+
"declaration": {
|
|
1036
|
+
"name": "*",
|
|
1037
|
+
"package": "./accordion"
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
]
|
|
1041
|
+
},
|
|
829
1042
|
{
|
|
830
1043
|
"kind": "javascript-module",
|
|
831
1044
|
"path": "src/accordion-item/accordion-item.styles.ts",
|
|
@@ -1220,219 +1433,6 @@
|
|
|
1220
1433
|
}
|
|
1221
1434
|
]
|
|
1222
1435
|
},
|
|
1223
|
-
{
|
|
1224
|
-
"kind": "javascript-module",
|
|
1225
|
-
"path": "src/_config/index.ts",
|
|
1226
|
-
"declarations": [],
|
|
1227
|
-
"exports": [
|
|
1228
|
-
{
|
|
1229
|
-
"kind": "js",
|
|
1230
|
-
"name": "*",
|
|
1231
|
-
"declaration": {
|
|
1232
|
-
"name": "*",
|
|
1233
|
-
"package": "./styles"
|
|
1234
|
-
}
|
|
1235
|
-
},
|
|
1236
|
-
{
|
|
1237
|
-
"kind": "js",
|
|
1238
|
-
"name": "*",
|
|
1239
|
-
"declaration": {
|
|
1240
|
-
"name": "*",
|
|
1241
|
-
"package": "./tokens"
|
|
1242
|
-
}
|
|
1243
|
-
},
|
|
1244
|
-
{
|
|
1245
|
-
"kind": "js",
|
|
1246
|
-
"name": "*",
|
|
1247
|
-
"declaration": {
|
|
1248
|
-
"name": "*",
|
|
1249
|
-
"package": "./values"
|
|
1250
|
-
}
|
|
1251
|
-
}
|
|
1252
|
-
]
|
|
1253
|
-
},
|
|
1254
|
-
{
|
|
1255
|
-
"kind": "javascript-module",
|
|
1256
|
-
"path": "src/accordion/accordion.styles.ts",
|
|
1257
|
-
"declarations": [
|
|
1258
|
-
{
|
|
1259
|
-
"kind": "function",
|
|
1260
|
-
"name": "foundationAccordionStyles",
|
|
1261
|
-
"return": {
|
|
1262
|
-
"type": {
|
|
1263
|
-
"text": "ElementStyles"
|
|
1264
|
-
}
|
|
1265
|
-
},
|
|
1266
|
-
"parameters": [
|
|
1267
|
-
{
|
|
1268
|
-
"name": "context",
|
|
1269
|
-
"type": {
|
|
1270
|
-
"text": "ElementDefinitionContext"
|
|
1271
|
-
}
|
|
1272
|
-
},
|
|
1273
|
-
{
|
|
1274
|
-
"name": "definition",
|
|
1275
|
-
"type": {
|
|
1276
|
-
"text": "FoundationElementDefinition"
|
|
1277
|
-
}
|
|
1278
|
-
}
|
|
1279
|
-
]
|
|
1280
|
-
}
|
|
1281
|
-
],
|
|
1282
|
-
"exports": [
|
|
1283
|
-
{
|
|
1284
|
-
"kind": "js",
|
|
1285
|
-
"name": "foundationAccordionStyles",
|
|
1286
|
-
"declaration": {
|
|
1287
|
-
"name": "foundationAccordionStyles",
|
|
1288
|
-
"module": "src/accordion/accordion.styles.ts"
|
|
1289
|
-
}
|
|
1290
|
-
}
|
|
1291
|
-
]
|
|
1292
|
-
},
|
|
1293
|
-
{
|
|
1294
|
-
"kind": "javascript-module",
|
|
1295
|
-
"path": "src/accordion/accordion.template.ts",
|
|
1296
|
-
"declarations": [
|
|
1297
|
-
{
|
|
1298
|
-
"kind": "function",
|
|
1299
|
-
"name": "foundationAccordionTemplate",
|
|
1300
|
-
"return": {
|
|
1301
|
-
"type": {
|
|
1302
|
-
"text": "ViewTemplate<Accordion>"
|
|
1303
|
-
}
|
|
1304
|
-
},
|
|
1305
|
-
"parameters": [
|
|
1306
|
-
{
|
|
1307
|
-
"name": "context",
|
|
1308
|
-
"type": {
|
|
1309
|
-
"text": "ElementDefinitionContext"
|
|
1310
|
-
}
|
|
1311
|
-
},
|
|
1312
|
-
{
|
|
1313
|
-
"name": "definition",
|
|
1314
|
-
"type": {
|
|
1315
|
-
"text": "FoundationElementDefinition"
|
|
1316
|
-
}
|
|
1317
|
-
}
|
|
1318
|
-
]
|
|
1319
|
-
}
|
|
1320
|
-
],
|
|
1321
|
-
"exports": [
|
|
1322
|
-
{
|
|
1323
|
-
"kind": "js",
|
|
1324
|
-
"name": "foundationAccordionTemplate",
|
|
1325
|
-
"declaration": {
|
|
1326
|
-
"name": "foundationAccordionTemplate",
|
|
1327
|
-
"module": "src/accordion/accordion.template.ts"
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
]
|
|
1331
|
-
},
|
|
1332
|
-
{
|
|
1333
|
-
"kind": "javascript-module",
|
|
1334
|
-
"path": "src/accordion/accordion.ts",
|
|
1335
|
-
"declarations": [
|
|
1336
|
-
{
|
|
1337
|
-
"kind": "class",
|
|
1338
|
-
"description": "",
|
|
1339
|
-
"name": "Accordion",
|
|
1340
|
-
"superclass": {
|
|
1341
|
-
"name": "FASTAccordion",
|
|
1342
|
-
"package": "@microsoft/fast-foundation"
|
|
1343
|
-
},
|
|
1344
|
-
"tagName": "%%prefix%%-accordion",
|
|
1345
|
-
"customElement": true
|
|
1346
|
-
},
|
|
1347
|
-
{
|
|
1348
|
-
"kind": "variable",
|
|
1349
|
-
"name": "foundationAccordionShadowOptions",
|
|
1350
|
-
"type": {
|
|
1351
|
-
"text": "ShadowRootInit"
|
|
1352
|
-
},
|
|
1353
|
-
"default": "{\n delegatesFocus: true,\n mode: 'open',\n}"
|
|
1354
|
-
},
|
|
1355
|
-
{
|
|
1356
|
-
"kind": "variable",
|
|
1357
|
-
"name": "defaultAccordionConfig",
|
|
1358
|
-
"type": {
|
|
1359
|
-
"text": "object"
|
|
1360
|
-
},
|
|
1361
|
-
"default": "{}"
|
|
1362
|
-
},
|
|
1363
|
-
{
|
|
1364
|
-
"kind": "variable",
|
|
1365
|
-
"name": "foundationAccordion",
|
|
1366
|
-
"description": "The Foundation Accordion",
|
|
1367
|
-
"privacy": "public"
|
|
1368
|
-
}
|
|
1369
|
-
],
|
|
1370
|
-
"exports": [
|
|
1371
|
-
{
|
|
1372
|
-
"kind": "js",
|
|
1373
|
-
"name": "Accordion",
|
|
1374
|
-
"declaration": {
|
|
1375
|
-
"name": "Accordion",
|
|
1376
|
-
"module": "src/accordion/accordion.ts"
|
|
1377
|
-
}
|
|
1378
|
-
},
|
|
1379
|
-
{
|
|
1380
|
-
"kind": "js",
|
|
1381
|
-
"name": "foundationAccordionShadowOptions",
|
|
1382
|
-
"declaration": {
|
|
1383
|
-
"name": "foundationAccordionShadowOptions",
|
|
1384
|
-
"module": "src/accordion/accordion.ts"
|
|
1385
|
-
}
|
|
1386
|
-
},
|
|
1387
|
-
{
|
|
1388
|
-
"kind": "js",
|
|
1389
|
-
"name": "defaultAccordionConfig",
|
|
1390
|
-
"declaration": {
|
|
1391
|
-
"name": "defaultAccordionConfig",
|
|
1392
|
-
"module": "src/accordion/accordion.ts"
|
|
1393
|
-
}
|
|
1394
|
-
},
|
|
1395
|
-
{
|
|
1396
|
-
"kind": "js",
|
|
1397
|
-
"name": "foundationAccordion",
|
|
1398
|
-
"declaration": {
|
|
1399
|
-
"name": "foundationAccordion",
|
|
1400
|
-
"module": "src/accordion/accordion.ts"
|
|
1401
|
-
}
|
|
1402
|
-
}
|
|
1403
|
-
]
|
|
1404
|
-
},
|
|
1405
|
-
{
|
|
1406
|
-
"kind": "javascript-module",
|
|
1407
|
-
"path": "src/accordion/index.ts",
|
|
1408
|
-
"declarations": [],
|
|
1409
|
-
"exports": [
|
|
1410
|
-
{
|
|
1411
|
-
"kind": "js",
|
|
1412
|
-
"name": "*",
|
|
1413
|
-
"declaration": {
|
|
1414
|
-
"name": "*",
|
|
1415
|
-
"package": "./accordion.template"
|
|
1416
|
-
}
|
|
1417
|
-
},
|
|
1418
|
-
{
|
|
1419
|
-
"kind": "js",
|
|
1420
|
-
"name": "*",
|
|
1421
|
-
"declaration": {
|
|
1422
|
-
"name": "*",
|
|
1423
|
-
"package": "./accordion.styles"
|
|
1424
|
-
}
|
|
1425
|
-
},
|
|
1426
|
-
{
|
|
1427
|
-
"kind": "js",
|
|
1428
|
-
"name": "*",
|
|
1429
|
-
"declaration": {
|
|
1430
|
-
"name": "*",
|
|
1431
|
-
"package": "./accordion"
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
]
|
|
1435
|
-
},
|
|
1436
1436
|
{
|
|
1437
1437
|
"kind": "javascript-module",
|
|
1438
1438
|
"path": "src/actions-menu/actions-menu.styles.ts",
|
|
@@ -23083,6 +23083,14 @@
|
|
|
23083
23083
|
},
|
|
23084
23084
|
"default": "''"
|
|
23085
23085
|
},
|
|
23086
|
+
{
|
|
23087
|
+
"kind": "field",
|
|
23088
|
+
"name": "autoPosition",
|
|
23089
|
+
"type": {
|
|
23090
|
+
"text": "boolean"
|
|
23091
|
+
},
|
|
23092
|
+
"default": "true"
|
|
23093
|
+
},
|
|
23086
23094
|
{
|
|
23087
23095
|
"kind": "field",
|
|
23088
23096
|
"name": "all",
|
|
@@ -23249,7 +23257,8 @@
|
|
|
23249
23257
|
"name": "position",
|
|
23250
23258
|
"type": {
|
|
23251
23259
|
"text": "Position"
|
|
23252
|
-
}
|
|
23260
|
+
},
|
|
23261
|
+
"description": "Controls the positioning of the multiselect dropdown. Accepts the following values:\n- Position.ABOVE: Forces the dropdown to always open above the input field.\n- Position.BELOW: Forces the dropdown to always open below the input field."
|
|
23253
23262
|
},
|
|
23254
23263
|
{
|
|
23255
23264
|
"kind": "field",
|
|
@@ -23283,19 +23292,21 @@
|
|
|
23283
23292
|
},
|
|
23284
23293
|
{
|
|
23285
23294
|
"kind": "method",
|
|
23286
|
-
"name": "
|
|
23295
|
+
"name": "toggle"
|
|
23287
23296
|
},
|
|
23288
23297
|
{
|
|
23289
23298
|
"kind": "method",
|
|
23290
|
-
"name": "
|
|
23299
|
+
"name": "optionsChanged"
|
|
23291
23300
|
},
|
|
23292
23301
|
{
|
|
23293
23302
|
"kind": "method",
|
|
23294
|
-
"name": "
|
|
23303
|
+
"name": "selectedOptionsChanged"
|
|
23295
23304
|
},
|
|
23296
23305
|
{
|
|
23297
23306
|
"kind": "method",
|
|
23298
|
-
"name": "setDropdownPosition"
|
|
23307
|
+
"name": "setDropdownPosition",
|
|
23308
|
+
"privacy": "private",
|
|
23309
|
+
"description": "Sets the dropdown position based on the current configuration."
|
|
23299
23310
|
},
|
|
23300
23311
|
{
|
|
23301
23312
|
"kind": "method",
|
|
@@ -23548,6 +23559,14 @@
|
|
|
23548
23559
|
"default": "''",
|
|
23549
23560
|
"fieldName": "name"
|
|
23550
23561
|
},
|
|
23562
|
+
{
|
|
23563
|
+
"name": "auto-position",
|
|
23564
|
+
"type": {
|
|
23565
|
+
"text": "boolean"
|
|
23566
|
+
},
|
|
23567
|
+
"default": "true",
|
|
23568
|
+
"fieldName": "autoPosition"
|
|
23569
|
+
},
|
|
23551
23570
|
{
|
|
23552
23571
|
"type": {
|
|
23553
23572
|
"text": "boolean"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiselect-consts.d.ts","sourceRoot":"","sources":["../../../src/multiselect/multiselect-consts.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,KAAK,UAAU;IACf,KAAK,UAAU;
|
|
1
|
+
{"version":3,"file":"multiselect-consts.d.ts","sourceRoot":"","sources":["../../../src/multiselect/multiselect-consts.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,KAAK,UAAU;IACf,KAAK,UAAU;CAChB"}
|
|
@@ -13,6 +13,7 @@ export type MultiselectOption = {
|
|
|
13
13
|
*/
|
|
14
14
|
export declare class Multiselect extends FoundationElement {
|
|
15
15
|
name: string;
|
|
16
|
+
autoPosition: boolean;
|
|
16
17
|
all: boolean;
|
|
17
18
|
allSelected: boolean;
|
|
18
19
|
search: boolean;
|
|
@@ -33,6 +34,11 @@ export declare class Multiselect extends FoundationElement {
|
|
|
33
34
|
selectedOptions: string[];
|
|
34
35
|
filteredAvailableOptions: MultiselectOption[];
|
|
35
36
|
scrollContainer: HTMLElement;
|
|
37
|
+
/**
|
|
38
|
+
* Controls the positioning of the multiselect dropdown. Accepts the following values:
|
|
39
|
+
* - Position.ABOVE: Forces the dropdown to always open above the input field.
|
|
40
|
+
* - Position.BELOW: Forces the dropdown to always open below the input field.
|
|
41
|
+
*/
|
|
36
42
|
position: Position;
|
|
37
43
|
onAllSelectedCallback: (allSelected: boolean) => void;
|
|
38
44
|
private initialisedOptions;
|
|
@@ -40,10 +46,18 @@ export declare class Multiselect extends FoundationElement {
|
|
|
40
46
|
optionsElement: HTMLElement;
|
|
41
47
|
connectedCallback(): void;
|
|
42
48
|
disconnectedCallback(): void;
|
|
49
|
+
toggle(): void;
|
|
43
50
|
optionsChanged(): void;
|
|
44
51
|
selectedOptionsChanged(): void;
|
|
45
|
-
|
|
46
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Sets the dropdown position based on the current configuration.
|
|
54
|
+
* @remarks
|
|
55
|
+
* If `autoPosition` is `true`, this method calculates the available space above and below the input field in the viewport and positions the dropdown accordingly.
|
|
56
|
+
* This ensures the dropdown is always visible to the user. If `autoPosition` is `false`, the dropdown position is locked to either 'above' or 'below', as specified by the `position` attribute.
|
|
57
|
+
* This method is intended for internal use by the component and is marked as private.
|
|
58
|
+
* @private
|
|
59
|
+
*/
|
|
60
|
+
private setDropdownPosition;
|
|
47
61
|
optionGetter(option: MultiselectOption): string;
|
|
48
62
|
getItemLabel(option: MultiselectOption): any;
|
|
49
63
|
isOptionDisabled(option: MultiselectOption): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiselect.d.ts","sourceRoot":"","sources":["../../../src/multiselect/multiselect.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAO9D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAMhD,eAAO,MAAM,kCAAkC,EAAE,cAA0B,CAAC;AAE5E,eAAO,MAAM,wBAAwB,IAAK,CAAC;AAE3C,MAAM,MAAM,iBAAiB,GACzB;IACE,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GACD,MAAM,CAAC;AAEX;;GAEG;AACH,qBAAa,WAAY,SAAQ,iBAAiB;IAC1C,IAAI,SAAM;
|
|
1
|
+
{"version":3,"file":"multiselect.d.ts","sourceRoot":"","sources":["../../../src/multiselect/multiselect.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAO9D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAMhD,eAAO,MAAM,kCAAkC,EAAE,cAA0B,CAAC;AAE5E,eAAO,MAAM,wBAAwB,IAAK,CAAC;AAE3C,MAAM,MAAM,iBAAiB,GACzB;IACE,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GACD,MAAM,CAAC;AAEX;;GAEG;AACH,qBAAa,WAAY,SAAQ,iBAAiB;IAC1C,IAAI,SAAM;IACuC,YAAY,EAAE,OAAO,CAAQ;IACzD,GAAG,UAAQ;IACX,WAAW,UAAS;IACpB,MAAM,UAAQ;IACd,QAAQ,UAAS;IACjB,KAAK,UAAS;IACnC,QAAQ,EAAE,MAAM,CAAiB;IACvC,eAAe,CAAC,QAAQ,KAAA,EAAE,QAAQ,EAAE,MAAM;IAG1C,qBAAqB,MAAC;IACV,mBAAmB,EAAE,IAAI,EAAE,CAAC;IAC5B,iBAAiB,EAAE,qBAAqB,EAAE,CAAC;IAC3C,cAAc,MAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IACtC,OAAO,CAAC,YAAY,CAAiD;IACzD,IAAI,UAAS;IACzB,WAAW,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO;IAYhC,OAAO,EAAE,iBAAiB,EAAE,CAAM;IAClC,eAAe,EAAE,MAAM,EAAE,CAAM;IAC/B,wBAAwB,EAAE,iBAAiB,EAAE,CAAqB;IAClE,eAAe,EAAE,WAAW,CAAC;IAEzC;;;;OAIG;IACS,QAAQ,EAAE,QAAQ,CAAkB;IAEpC,qBAAqB,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;IAElE,OAAO,CAAC,kBAAkB,CAAkB;IAE5C,SAAS,EAAE,UAAU,CAAC;IACtB,cAAc,EAAE,WAAW,CAAC;IAE5B,iBAAiB;IAOjB,oBAAoB;IAKpB,MAAM;IAON,cAAc;IAQd,sBAAsB;IAOtB;;;;;;;OAOG;IACH,OAAO,CAAC,mBAAmB;IAqC3B,YAAY,CAAC,MAAM,EAAE,iBAAiB;IAOtC,YAAY,CAAC,MAAM,EAAE,iBAAiB;IAetC,gBAAgB,CAAC,MAAM,EAAE,iBAAiB;IAQ1C,IACI,eAAe,WAyBlB;IAED,IACI,cAAc,WAEjB;IAED,IACI,aAAa,YAIhB;IAED,IACI,oBAAoB,YAEvB;IAED,gBAAgB,CAAC,gBAAgB,EAAE,iBAAiB,GAAG,OAAO;IAI9D,iBAAiB,CAAC,gBAAgB,EAAE,iBAAiB;IAarD,sBAAsB;IAItB,iBAAiB;IAajB,YAAY;IAUZ,SAAS;IAST,cAAc;IAkBd,aAAa,CAAC,KAAK,EAAE,KAAK;IAK1B,OAAO,CAAC,kBAAkB;CAK3B;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;sBAMhC,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { FoundationElement } from '@microsoft/fast-foundation';
|
|
|
5
5
|
import debounce from 'lodash.debounce';
|
|
6
6
|
import { dataserverCriteriaBuilder, logger, requestServerCriteriaBuilder, wasClickOutsideElement, } from '../utils';
|
|
7
7
|
import { Position } from './multiselect-consts';
|
|
8
|
-
import { multiselectStyles as styles
|
|
8
|
+
import { multiselectStyles as styles } from './multiselect.styles';
|
|
9
9
|
import { multiselectTemplate as template } from './multiselect.template';
|
|
10
10
|
const DEBOUNCE_TIME = 500;
|
|
11
11
|
export const foundationMultiselectShadowOptions = undefined;
|
|
@@ -17,6 +17,7 @@ export class Multiselect extends FoundationElement {
|
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments);
|
|
19
19
|
this.name = '';
|
|
20
|
+
this.autoPosition = true;
|
|
20
21
|
this.all = true;
|
|
21
22
|
this.allSelected = false;
|
|
22
23
|
this.search = true;
|
|
@@ -28,6 +29,11 @@ export class Multiselect extends FoundationElement {
|
|
|
28
29
|
this.options = [];
|
|
29
30
|
this.selectedOptions = [];
|
|
30
31
|
this.filteredAvailableOptions = [...this.options];
|
|
32
|
+
/**
|
|
33
|
+
* Controls the positioning of the multiselect dropdown. Accepts the following values:
|
|
34
|
+
* - Position.ABOVE: Forces the dropdown to always open above the input field.
|
|
35
|
+
* - Position.BELOW: Forces the dropdown to always open below the input field.
|
|
36
|
+
*/
|
|
31
37
|
this.position = Position.BELOW;
|
|
32
38
|
this.initialisedOptions = false;
|
|
33
39
|
}
|
|
@@ -58,6 +64,12 @@ export class Multiselect extends FoundationElement {
|
|
|
58
64
|
super.disconnectedCallback();
|
|
59
65
|
document.removeEventListener('mousedown', this.clickOutside);
|
|
60
66
|
}
|
|
67
|
+
toggle() {
|
|
68
|
+
if (!this.open) {
|
|
69
|
+
this.setDropdownPosition();
|
|
70
|
+
}
|
|
71
|
+
this.open = !this.open;
|
|
72
|
+
}
|
|
61
73
|
optionsChanged() {
|
|
62
74
|
if (this.allSelected && !this.initialisedOptions) {
|
|
63
75
|
this.selectedOptions = this.options.map((option) => this.optionGetter(option));
|
|
@@ -70,22 +82,45 @@ export class Multiselect extends FoundationElement {
|
|
|
70
82
|
return;
|
|
71
83
|
}
|
|
72
84
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
85
|
+
/**
|
|
86
|
+
* Sets the dropdown position based on the current configuration.
|
|
87
|
+
* @remarks
|
|
88
|
+
* If `autoPosition` is `true`, this method calculates the available space above and below the input field in the viewport and positions the dropdown accordingly.
|
|
89
|
+
* This ensures the dropdown is always visible to the user. If `autoPosition` is `false`, the dropdown position is locked to either 'above' or 'below', as specified by the `position` attribute.
|
|
90
|
+
* This method is intended for internal use by the component and is marked as private.
|
|
91
|
+
* @private
|
|
92
|
+
*/
|
|
79
93
|
setDropdownPosition() {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
94
|
+
let calculatedPosition = this.position;
|
|
95
|
+
if (this.autoPosition) {
|
|
96
|
+
let container = this.assignedSlot ? this.assignedSlot.parentElement : this.parentElement;
|
|
97
|
+
while (container && !container.classList.contains('content-wrapper')) {
|
|
98
|
+
container = container.parentElement;
|
|
99
|
+
}
|
|
100
|
+
if (!container) {
|
|
101
|
+
const multiselectRect = this.getBoundingClientRect();
|
|
102
|
+
const viewportHeight = window.innerHeight;
|
|
103
|
+
const spaceAbove = multiselectRect.top;
|
|
104
|
+
const spaceBelow = viewportHeight - multiselectRect.bottom;
|
|
105
|
+
calculatedPosition =
|
|
106
|
+
spaceBelow < multiselectRect.height && spaceAbove > spaceBelow
|
|
107
|
+
? Position.ABOVE
|
|
108
|
+
: Position.BELOW;
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
const containerRect = container.getBoundingClientRect();
|
|
112
|
+
const thisRect = this.getBoundingClientRect();
|
|
113
|
+
const midPoint = containerRect.top + containerRect.height / 2;
|
|
114
|
+
calculatedPosition = thisRect.top < midPoint ? Position.BELOW : Position.ABOVE;
|
|
115
|
+
}
|
|
86
116
|
}
|
|
87
|
-
|
|
88
|
-
|
|
117
|
+
if (calculatedPosition === Position.ABOVE) {
|
|
118
|
+
this.optionsElement.classList.add('position-above');
|
|
119
|
+
this.optionsElement.classList.remove('position-below');
|
|
120
|
+
}
|
|
121
|
+
else if (calculatedPosition === Position.BELOW) {
|
|
122
|
+
this.optionsElement.classList.add('position-below');
|
|
123
|
+
this.optionsElement.classList.remove('position-above');
|
|
89
124
|
}
|
|
90
125
|
}
|
|
91
126
|
optionGetter(option) {
|
|
@@ -221,6 +256,9 @@ export class Multiselect extends FoundationElement {
|
|
|
221
256
|
__decorate([
|
|
222
257
|
attr
|
|
223
258
|
], Multiselect.prototype, "name", void 0);
|
|
259
|
+
__decorate([
|
|
260
|
+
attr({ mode: 'boolean', attribute: 'auto-position' })
|
|
261
|
+
], Multiselect.prototype, "autoPosition", void 0);
|
|
224
262
|
__decorate([
|
|
225
263
|
attr({ mode: 'boolean' })
|
|
226
264
|
], Multiselect.prototype, "all", void 0);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-ui",
|
|
3
3
|
"description": "Genesis Foundation UI",
|
|
4
|
-
"version": "14.141.
|
|
4
|
+
"version": "14.141.2",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"test:debug": "genx test --debug"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
|
-
"@genesislcap/foundation-testing": "14.141.
|
|
78
|
-
"@genesislcap/genx": "14.141.
|
|
77
|
+
"@genesislcap/foundation-testing": "14.141.2",
|
|
78
|
+
"@genesislcap/genx": "14.141.2",
|
|
79
79
|
"copyfiles": "^2.4.1",
|
|
80
80
|
"rimraf": "^3.0.2",
|
|
81
81
|
"rxjs": "^7.5.4"
|
|
@@ -86,12 +86,12 @@
|
|
|
86
86
|
"@fortawesome/free-regular-svg-icons": "^6.2.1",
|
|
87
87
|
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
|
88
88
|
"@genesiscommunitysuccess/analyzer-import-alias-plugin": "^4.0.0",
|
|
89
|
-
"@genesislcap/foundation-comms": "14.141.
|
|
90
|
-
"@genesislcap/foundation-criteria": "14.141.
|
|
91
|
-
"@genesislcap/foundation-errors": "14.141.
|
|
92
|
-
"@genesislcap/foundation-logger": "14.141.
|
|
93
|
-
"@genesislcap/foundation-notifications": "14.141.
|
|
94
|
-
"@genesislcap/foundation-utils": "14.141.
|
|
89
|
+
"@genesislcap/foundation-comms": "14.141.2",
|
|
90
|
+
"@genesislcap/foundation-criteria": "14.141.2",
|
|
91
|
+
"@genesislcap/foundation-errors": "14.141.2",
|
|
92
|
+
"@genesislcap/foundation-logger": "14.141.2",
|
|
93
|
+
"@genesislcap/foundation-notifications": "14.141.2",
|
|
94
|
+
"@genesislcap/foundation-utils": "14.141.2",
|
|
95
95
|
"@microsoft/fast-colors": "^5.3.1",
|
|
96
96
|
"@microsoft/fast-components": "^2.30.6",
|
|
97
97
|
"@microsoft/fast-element": "^1.12.0",
|
|
@@ -113,5 +113,5 @@
|
|
|
113
113
|
"access": "public"
|
|
114
114
|
},
|
|
115
115
|
"customElements": "dist/custom-elements.json",
|
|
116
|
-
"gitHead": "
|
|
116
|
+
"gitHead": "51b9d2cd8291ce37769cbbb5135f19b8a726f642"
|
|
117
117
|
}
|