@ngstarter-ui/components 22.2.7 → 22.2.9
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/ai/component-registry.json +114 -1
- package/fesm2022/ngstarter-ui-components-core.mjs +9 -4
- package/fesm2022/ngstarter-ui-components-core.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-data-view.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-data-view.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-number-input.mjs +11 -4
- package/fesm2022/ngstarter-ui-components-number-input.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-builder.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-pdf-builder.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-pin-input.mjs +1 -1
- package/fesm2022/ngstarter-ui-components-pin-input.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs +2 -2
- package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-timepicker.mjs.map +1 -1
- package/fesm2022/ngstarter-ui-components-tree-select.mjs +434 -0
- package/fesm2022/ngstarter-ui-components-tree-select.mjs.map +1 -0
- package/package.json +5 -1
- package/types/ngstarter-ui-components-number-input.d.ts +2 -1
- package/types/ngstarter-ui-components-timepicker.d.ts +1 -1
- package/types/ngstarter-ui-components-tree-select.d.ts +107 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"generatedBy": "scripts/generate-ai-metadata.mjs",
|
|
4
4
|
"package": "@ngstarter-ui/components",
|
|
5
5
|
"description": "AI-readable registry for NgStarter UI Angular secondary entry points.",
|
|
6
|
-
"componentCount":
|
|
6
|
+
"componentCount": 127,
|
|
7
7
|
"conventions": {
|
|
8
8
|
"importPattern": "@ngstarter-ui/components/<component>",
|
|
9
9
|
"selectorPrefix": "ngs",
|
|
@@ -7168,6 +7168,7 @@
|
|
|
7168
7168
|
"NumberInputSuffixDirective"
|
|
7169
7169
|
],
|
|
7170
7170
|
"inputs": [
|
|
7171
|
+
"aria-label",
|
|
7171
7172
|
"disabled",
|
|
7172
7173
|
"max",
|
|
7173
7174
|
"min",
|
|
@@ -11323,6 +11324,118 @@
|
|
|
11323
11324
|
],
|
|
11324
11325
|
"example": null
|
|
11325
11326
|
},
|
|
11327
|
+
{
|
|
11328
|
+
"name": "tree-select",
|
|
11329
|
+
"title": "Tree Select",
|
|
11330
|
+
"overviewName": "Tree Select",
|
|
11331
|
+
"category": "forms",
|
|
11332
|
+
"package": "@ngstarter-ui/components",
|
|
11333
|
+
"importPath": "@ngstarter-ui/components/tree-select",
|
|
11334
|
+
"publicApi": "projects/components/tree-select/public-api.ts",
|
|
11335
|
+
"sourceRoot": "projects/components/tree-select/src",
|
|
11336
|
+
"docsPath": "/forms/tree-select",
|
|
11337
|
+
"docsOverviewSource": "projects/docs/src/app/forms/tree-select/overview/overview.html",
|
|
11338
|
+
"purpose": "Choose one or more hierarchical values in an Angular form.",
|
|
11339
|
+
"useWhen": "Use for departments, categories, folders, and nested entity selection. Nodes have unique string or number values, labels, optional children, disabled, and hasChildren. Supports search retaining ancestors, single/multiple selection, leavesOnly, cascading selection of enabled loaded leaves, independent selection with cascade=false, lazy loadChildren, clear, and Angular forms inside FormField. Search and cascade operate on loaded nodes. Use Tree for navigation rather than form selection and Select for flat choices.",
|
|
11340
|
+
"exampleTopics": [
|
|
11341
|
+
"Single selection and reactive forms",
|
|
11342
|
+
"Multiple selection",
|
|
11343
|
+
"Load children on expansion",
|
|
11344
|
+
"Basic tree select",
|
|
11345
|
+
"Multiple tree select",
|
|
11346
|
+
"Lazy tree select"
|
|
11347
|
+
],
|
|
11348
|
+
"minimalExample": "<ngs-form-field class=\"w-full max-w-96\">\n <ngs-label>Department</ngs-label>\n <ngs-tree-select\n [nodes]=\"nodes\"\n [formControl]=\"department\"\n leavesOnly\n clearable\n required\n aria-label=\"Department\"\n />\n @if (department.touched && department.invalid) {\n <ngs-error>Choose a department.</ngs-error>\n }\n</ngs-form-field>\n<p class=\"mt-3 text-sm\">Selected: {{ department.value ?? 'None' }}</p>",
|
|
11349
|
+
"exampleFiles": [
|
|
11350
|
+
{
|
|
11351
|
+
"name": "basic-tree-select-example",
|
|
11352
|
+
"title": "Basic tree select",
|
|
11353
|
+
"file": "projects/docs/src/app/forms/tree-select/_examples/basic-tree-select-example/basic-tree-select-example.html",
|
|
11354
|
+
"source": "<ngs-form-field class=\"w-full max-w-96\">\n <ngs-label>Department</ngs-label>\n <ngs-tree-select\n [nodes]=\"nodes\"\n [formControl]=\"department\"\n leavesOnly\n clearable\n required\n aria-label=\"Department\"\n />\n @if (department.touched && department.invalid) {\n <ngs-error>Choose a department.</ngs-error>\n }\n</ngs-form-field>\n<p class=\"mt-3 text-sm\">Selected: {{ department.value ?? 'None' }}</p>"
|
|
11355
|
+
},
|
|
11356
|
+
{
|
|
11357
|
+
"name": "lazy-tree-select-example",
|
|
11358
|
+
"title": "Lazy tree select",
|
|
11359
|
+
"file": "projects/docs/src/app/forms/tree-select/_examples/lazy-tree-select-example/lazy-tree-select-example.html",
|
|
11360
|
+
"source": "<ngs-form-field class=\"w-full max-w-96\">\n <ngs-label>Folder</ngs-label>\n <ngs-tree-select\n [nodes]=\"nodes\"\n [loadChildren]=\"loadChildren\"\n [(ngModel)]=\"selected\"\n leavesOnly\n clearable\n aria-label=\"Folder\"\n />\n</ngs-form-field>"
|
|
11361
|
+
},
|
|
11362
|
+
{
|
|
11363
|
+
"name": "multiple-tree-select-example",
|
|
11364
|
+
"title": "Multiple tree select",
|
|
11365
|
+
"file": "projects/docs/src/app/forms/tree-select/_examples/multiple-tree-select-example/multiple-tree-select-example.html",
|
|
11366
|
+
"source": "<ngs-form-field class=\"w-full max-w-96\">\n <ngs-label>Permissions</ngs-label>\n <ngs-tree-select\n [nodes]=\"nodes\"\n [(ngModel)]=\"selected\"\n multiple\n clearable\n aria-label=\"Permissions\"\n />\n</ngs-form-field>\n<p class=\"mt-3 text-sm\">Selected: {{ selected().join(', ') || 'None' }}</p>"
|
|
11367
|
+
}
|
|
11368
|
+
],
|
|
11369
|
+
"previewAsset": null,
|
|
11370
|
+
"selectors": [
|
|
11371
|
+
"ngs-tree-select",
|
|
11372
|
+
"ngs-tree-select-panel"
|
|
11373
|
+
],
|
|
11374
|
+
"exportedSymbols": [
|
|
11375
|
+
"TreeSelect",
|
|
11376
|
+
"TreeSelectChildrenLoader",
|
|
11377
|
+
"TreeSelectKey",
|
|
11378
|
+
"TreeSelectNode",
|
|
11379
|
+
"TreeSelectPanel",
|
|
11380
|
+
"TreeSelectValue"
|
|
11381
|
+
],
|
|
11382
|
+
"inputs": [
|
|
11383
|
+
"aria-label",
|
|
11384
|
+
"cascade",
|
|
11385
|
+
"clearable",
|
|
11386
|
+
"disabled",
|
|
11387
|
+
"emptyText",
|
|
11388
|
+
"label",
|
|
11389
|
+
"leavesOnly",
|
|
11390
|
+
"loadChildren",
|
|
11391
|
+
"multiple",
|
|
11392
|
+
"nodes",
|
|
11393
|
+
"panelId",
|
|
11394
|
+
"placeholder",
|
|
11395
|
+
"query",
|
|
11396
|
+
"required",
|
|
11397
|
+
"searchable",
|
|
11398
|
+
"value"
|
|
11399
|
+
],
|
|
11400
|
+
"outputs": [
|
|
11401
|
+
"closed",
|
|
11402
|
+
"dismiss",
|
|
11403
|
+
"loadError",
|
|
11404
|
+
"loadNode",
|
|
11405
|
+
"opened",
|
|
11406
|
+
"queryChange",
|
|
11407
|
+
"selectionChange",
|
|
11408
|
+
"selectNode"
|
|
11409
|
+
],
|
|
11410
|
+
"cssTokens": [
|
|
11411
|
+
"--ngs-button-height",
|
|
11412
|
+
"--ngs-dropdown-item-padding-x",
|
|
11413
|
+
"--ngs-field-font-size",
|
|
11414
|
+
"--ngs-field-label-color",
|
|
11415
|
+
"--ngs-field-padding-x",
|
|
11416
|
+
"--ngs-icon-size",
|
|
11417
|
+
"--ngs-option-active-background",
|
|
11418
|
+
"--ngs-option-color",
|
|
11419
|
+
"--ngs-option-font-size",
|
|
11420
|
+
"--ngs-option-gap",
|
|
11421
|
+
"--ngs-option-group-padding-start",
|
|
11422
|
+
"--ngs-option-height",
|
|
11423
|
+
"--ngs-option-padding",
|
|
11424
|
+
"--ngs-option-radius",
|
|
11425
|
+
"--ngs-option-selected-color",
|
|
11426
|
+
"--ngs-select-font-size",
|
|
11427
|
+
"--ngs-select-placeholder-color",
|
|
11428
|
+
"--ngs-select-search-padding-inline",
|
|
11429
|
+
"--ngs-tree-gap",
|
|
11430
|
+
"--ngs-tree-node-color",
|
|
11431
|
+
"--ngs-tree-node-font-size",
|
|
11432
|
+
"--ngs-tree-node-gap",
|
|
11433
|
+
"--ngs-tree-node-min-height",
|
|
11434
|
+
"--ngs-tree-node-padding",
|
|
11435
|
+
"--ngs-tree-padding"
|
|
11436
|
+
],
|
|
11437
|
+
"example": null
|
|
11438
|
+
},
|
|
11326
11439
|
{
|
|
11327
11440
|
"name": "upload",
|
|
11328
11441
|
"title": "Upload",
|
|
@@ -1622,13 +1622,18 @@ function scrollDropdownItemIntoView(element, panel) {
|
|
|
1622
1622
|
container ??= panel;
|
|
1623
1623
|
const itemBounds = element.getBoundingClientRect();
|
|
1624
1624
|
const bounds = container.getBoundingClientRect();
|
|
1625
|
-
|
|
1626
|
-
const
|
|
1625
|
+
// Popup opening animations scale visual bounds, but scrollTop/clientHeight stay in layout pixels.
|
|
1626
|
+
const scaleY = container.offsetHeight > 0 ? bounds.height / container.offsetHeight : 1;
|
|
1627
|
+
if (scaleY <= 0) {
|
|
1628
|
+
return;
|
|
1629
|
+
}
|
|
1630
|
+
const top = bounds.top + container.clientTop * scaleY;
|
|
1631
|
+
const bottom = top + container.clientHeight * scaleY;
|
|
1627
1632
|
if (itemBounds.top < top) {
|
|
1628
|
-
container.scrollTop += itemBounds.top - top;
|
|
1633
|
+
container.scrollTop += (itemBounds.top - top) / scaleY;
|
|
1629
1634
|
}
|
|
1630
1635
|
else if (itemBounds.bottom > bottom) {
|
|
1631
|
-
container.scrollTop += itemBounds.bottom - bottom;
|
|
1636
|
+
container.scrollTop += (itemBounds.bottom - bottom) / scaleY;
|
|
1632
1637
|
}
|
|
1633
1638
|
}
|
|
1634
1639
|
function isDropdownTextInput(target) {
|