ng-adflowtail 0.1.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/README.md +657 -0
- package/fesm2022/ng-adflowtail-ad-data-table.mjs +389 -0
- package/fesm2022/ng-adflowtail-ad-data-table.mjs.map +1 -0
- package/fesm2022/ng-adflowtail-ad-multi-select.mjs +97 -0
- package/fesm2022/ng-adflowtail-ad-multi-select.mjs.map +1 -0
- package/fesm2022/ng-adflowtail.mjs +40 -0
- package/fesm2022/ng-adflowtail.mjs.map +1 -0
- package/package.json +34 -0
- package/types/ng-adflowtail-ad-data-table.d.ts +139 -0
- package/types/ng-adflowtail-ad-multi-select.d.ts +38 -0
- package/types/ng-adflowtail.d.ts +15 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { signal, computed, HostListener, Input, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from 'ng-adflowtail';
|
|
4
|
+
import { AdPrimaryColorDirective } from 'ng-adflowtail';
|
|
5
|
+
|
|
6
|
+
class AdMultiSelect {
|
|
7
|
+
el;
|
|
8
|
+
/** Signal Forms field bound to a string[] value, e.g. userForm.settings.permissions */
|
|
9
|
+
formField;
|
|
10
|
+
options = [];
|
|
11
|
+
placeholder = 'Select options';
|
|
12
|
+
disabled = false;
|
|
13
|
+
errorMessage = '';
|
|
14
|
+
isOpen = signal(false, /* @ts-ignore */
|
|
15
|
+
...(ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []));
|
|
16
|
+
constructor(el) {
|
|
17
|
+
this.el = el;
|
|
18
|
+
}
|
|
19
|
+
/** field() returns FieldState<string[]>; .value() is the actual array signal */
|
|
20
|
+
selectedValues = computed(() => this.formField().value() ?? [], /* @ts-ignore */
|
|
21
|
+
...(ngDevMode ? [{ debugName: "selectedValues" }] : /* istanbul ignore next */ []));
|
|
22
|
+
hasError() {
|
|
23
|
+
return this.formField().touched() && this.formField().invalid();
|
|
24
|
+
}
|
|
25
|
+
labelFor(value) {
|
|
26
|
+
return this.options.find((o) => o.value === value)?.label ?? value;
|
|
27
|
+
}
|
|
28
|
+
isSelected(value) {
|
|
29
|
+
return this.selectedValues().includes(value);
|
|
30
|
+
}
|
|
31
|
+
toggleOpen() {
|
|
32
|
+
if (this.disabled)
|
|
33
|
+
return;
|
|
34
|
+
this.isOpen.update((v) => !v);
|
|
35
|
+
}
|
|
36
|
+
close() {
|
|
37
|
+
this.isOpen.set(false);
|
|
38
|
+
}
|
|
39
|
+
toggleValue(value) {
|
|
40
|
+
const current = this.selectedValues();
|
|
41
|
+
const next = current.includes(value) ? current.filter((v) => v !== value) : [...current, value];
|
|
42
|
+
this.writeValue(next);
|
|
43
|
+
}
|
|
44
|
+
removeValue(value, event) {
|
|
45
|
+
event.stopPropagation(); // don't reopen/close the dropdown when removing a chip
|
|
46
|
+
this.writeValue(this.selectedValues().filter((v) => v !== value));
|
|
47
|
+
}
|
|
48
|
+
selectAll() {
|
|
49
|
+
this.writeValue(this.options.map((o) => o.value));
|
|
50
|
+
}
|
|
51
|
+
clearAll() {
|
|
52
|
+
this.writeValue([]);
|
|
53
|
+
}
|
|
54
|
+
writeValue(next) {
|
|
55
|
+
// field() returns FieldState<string[]>; .value is a WritableSignal<string[]>
|
|
56
|
+
this.formField().value.set(next);
|
|
57
|
+
this.formField().markAsTouched();
|
|
58
|
+
this.formField().markAsDirty();
|
|
59
|
+
}
|
|
60
|
+
onDocumentClick(event) {
|
|
61
|
+
if (!this.el.nativeElement.contains(event.target)) {
|
|
62
|
+
this.close();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AdMultiSelect, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
66
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: AdMultiSelect, isStandalone: true, selector: "ad-multi-select", inputs: { formField: "formField", options: "options", placeholder: "placeholder", disabled: "disabled", errorMessage: "errorMessage" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, hostDirectives: [{ directive: i1.AdPrimaryColorDirective, inputs: ["primaryColor", "primaryColor"] }], ngImport: i0, template: "<div class=\"relative w-full\" (keydown.escape)=\"close()\">\n <!-- Trigger -->\n <button\n type=\"button\"\n class=\"flex items-center justify-between bg-neutral-secondary-medium border-2 border-default-medium text-heading text-sm rounded-base focus:ring-brand focus:border-brand w-full px-3 py-2.5 shadow-xs placeholder:text-body\"\n [class.border-default-medium]=\"!hasError()\"\n [class.border-red-500]=\"hasError()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-disabled]=\"disabled\"\n [disabled]=\"disabled\"\n (click)=\"toggleOpen()\"\n >\n <!-- Selected chips, or placeholder -->\n <div class=\"flex flex-wrap gap-1.5 items-center\" [class.text-fg-disabled]=\"disabled\">\n @if (selectedValues().length) {\n @for (val of selectedValues(); track val) {\n <span\n class=\"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-brand/10 text-fg-brand\"\n >\n {{ labelFor(val) }}\n\n @if (!disabled) {\n <span\n class=\"cursor-pointer hover:text-red-500\"\n (click)=\"removeValue(val, $event)\"\n role=\"button\"\n [attr.aria-label]=\"'Remove ' + labelFor(val)\"\n >\n ×\n </span>\n }\n </span>\n }\n } @else {\n <span class=\"text-body\">{{ placeholder }}</span>\n }\n </div>\n\n <svg\n class=\"w-4 h-4 ms-2 shrink-0 text-body transition-transform\"\n [class.rotate-180]=\"isOpen()\"\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <path\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"m19 9-7 7-7-7\"\n />\n </svg>\n </button>\n\n <!-- Dropdown panel -->\n @if (isOpen()) {\n <div\n class=\"absolute z-10 mt-1 w-full bg-neutral-primary-medium border border-default-medium rounded-base shadow-lg max-h-60 overflow-y-auto\"\n >\n <div class=\"flex items-center justify-between px-2 py-1.5 border-b border-default-medium\">\n <button\n type=\"button\"\n class=\"text-xs font-medium text-fg-brand hover:underline\"\n (click)=\"selectAll()\"\n >\n Select all\n </button>\n <button\n type=\"button\"\n class=\"text-xs font-medium text-body hover:underline\"\n (click)=\"clearAll()\"\n >\n Clear\n </button>\n </div>\n\n <ul class=\"p-1 text-sm text-body\" role=\"listbox\" aria-multiselectable=\"true\">\n @for (opt of options; track opt) {\n <li>\n <label\n class=\"flex items-center gap-2 w-full p-2 rounded-md cursor-pointer hover:bg-neutral-tertiary-medium text-sm font-medium text-heading\"\n >\n <input\n type=\"checkbox\"\n class=\"w-4 h-4 border border-default-medium rounded-xs bg-neutral-secondary-medium focus:ring-2 focus:ring-brand-soft\"\n [checked]=\"isSelected(opt.value)\"\n (change)=\"toggleValue(opt.value)\"\n />\n {{ opt.label }}\n </label>\n </li>\n }\n\n @if (!options.length) {\n <li class=\"p-2 text-body text-sm\">No options available</li>\n }\n </ul>\n </div>\n }\n\n @if (hasError() && errorMessage) {\n <p class=\"mt-1.5 text-sm text-red-500\">\n {{ errorMessage }}\n </p>\n }\n</div>\n", styles: [":host{display:block}:host ::ng-deep .rotate-180{transform:rotate(180deg)}ul::-webkit-scrollbar{width:6px}ul::-webkit-scrollbar-thumb{background-color:#9ca3af80;border-radius:9999px}ul::-webkit-scrollbar-track{background:transparent}\n"] });
|
|
67
|
+
}
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AdMultiSelect, decorators: [{
|
|
69
|
+
type: Component,
|
|
70
|
+
args: [{ selector: 'ad-multi-select', imports: [], hostDirectives: [
|
|
71
|
+
{
|
|
72
|
+
directive: AdPrimaryColorDirective,
|
|
73
|
+
inputs: ['primaryColor']
|
|
74
|
+
}
|
|
75
|
+
], template: "<div class=\"relative w-full\" (keydown.escape)=\"close()\">\n <!-- Trigger -->\n <button\n type=\"button\"\n class=\"flex items-center justify-between bg-neutral-secondary-medium border-2 border-default-medium text-heading text-sm rounded-base focus:ring-brand focus:border-brand w-full px-3 py-2.5 shadow-xs placeholder:text-body\"\n [class.border-default-medium]=\"!hasError()\"\n [class.border-red-500]=\"hasError()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-disabled]=\"disabled\"\n [disabled]=\"disabled\"\n (click)=\"toggleOpen()\"\n >\n <!-- Selected chips, or placeholder -->\n <div class=\"flex flex-wrap gap-1.5 items-center\" [class.text-fg-disabled]=\"disabled\">\n @if (selectedValues().length) {\n @for (val of selectedValues(); track val) {\n <span\n class=\"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-brand/10 text-fg-brand\"\n >\n {{ labelFor(val) }}\n\n @if (!disabled) {\n <span\n class=\"cursor-pointer hover:text-red-500\"\n (click)=\"removeValue(val, $event)\"\n role=\"button\"\n [attr.aria-label]=\"'Remove ' + labelFor(val)\"\n >\n ×\n </span>\n }\n </span>\n }\n } @else {\n <span class=\"text-body\">{{ placeholder }}</span>\n }\n </div>\n\n <svg\n class=\"w-4 h-4 ms-2 shrink-0 text-body transition-transform\"\n [class.rotate-180]=\"isOpen()\"\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <path\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"m19 9-7 7-7-7\"\n />\n </svg>\n </button>\n\n <!-- Dropdown panel -->\n @if (isOpen()) {\n <div\n class=\"absolute z-10 mt-1 w-full bg-neutral-primary-medium border border-default-medium rounded-base shadow-lg max-h-60 overflow-y-auto\"\n >\n <div class=\"flex items-center justify-between px-2 py-1.5 border-b border-default-medium\">\n <button\n type=\"button\"\n class=\"text-xs font-medium text-fg-brand hover:underline\"\n (click)=\"selectAll()\"\n >\n Select all\n </button>\n <button\n type=\"button\"\n class=\"text-xs font-medium text-body hover:underline\"\n (click)=\"clearAll()\"\n >\n Clear\n </button>\n </div>\n\n <ul class=\"p-1 text-sm text-body\" role=\"listbox\" aria-multiselectable=\"true\">\n @for (opt of options; track opt) {\n <li>\n <label\n class=\"flex items-center gap-2 w-full p-2 rounded-md cursor-pointer hover:bg-neutral-tertiary-medium text-sm font-medium text-heading\"\n >\n <input\n type=\"checkbox\"\n class=\"w-4 h-4 border border-default-medium rounded-xs bg-neutral-secondary-medium focus:ring-2 focus:ring-brand-soft\"\n [checked]=\"isSelected(opt.value)\"\n (change)=\"toggleValue(opt.value)\"\n />\n {{ opt.label }}\n </label>\n </li>\n }\n\n @if (!options.length) {\n <li class=\"p-2 text-body text-sm\">No options available</li>\n }\n </ul>\n </div>\n }\n\n @if (hasError() && errorMessage) {\n <p class=\"mt-1.5 text-sm text-red-500\">\n {{ errorMessage }}\n </p>\n }\n</div>\n", styles: [":host{display:block}:host ::ng-deep .rotate-180{transform:rotate(180deg)}ul::-webkit-scrollbar{width:6px}ul::-webkit-scrollbar-thumb{background-color:#9ca3af80;border-radius:9999px}ul::-webkit-scrollbar-track{background:transparent}\n"] }]
|
|
76
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { formField: [{
|
|
77
|
+
type: Input,
|
|
78
|
+
args: [{ required: true }]
|
|
79
|
+
}], options: [{
|
|
80
|
+
type: Input
|
|
81
|
+
}], placeholder: [{
|
|
82
|
+
type: Input
|
|
83
|
+
}], disabled: [{
|
|
84
|
+
type: Input
|
|
85
|
+
}], errorMessage: [{
|
|
86
|
+
type: Input
|
|
87
|
+
}], onDocumentClick: [{
|
|
88
|
+
type: HostListener,
|
|
89
|
+
args: ['document:click', ['$event']]
|
|
90
|
+
}] } });
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Generated bundle index. Do not edit.
|
|
94
|
+
*/
|
|
95
|
+
|
|
96
|
+
export { AdMultiSelect };
|
|
97
|
+
//# sourceMappingURL=ng-adflowtail-ad-multi-select.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-adflowtail-ad-multi-select.mjs","sources":["../../../projects/ng-adflowtail/ad-multi-select/src/lib/ad-multi-select.ts","../../../projects/ng-adflowtail/ad-multi-select/src/lib/ad-multi-select.html","../../../projects/ng-adflowtail/ad-multi-select/src/ng-adflowtail-ad-multi-select.ts"],"sourcesContent":["import { Component, computed, ElementRef, HostListener, Input, signal } from '@angular/core';\nimport { FieldTree } from '@angular/forms/signals';\nimport { AdPrimaryColorDirective } from 'ng-adflowtail';\n\nexport interface AdMultiSelectOption {\n label: string;\n value: string;\n}\n\n@Component({\n selector: 'ad-multi-select',\n imports: [],\n templateUrl: './ad-multi-select.html',\n styleUrl: './ad-multi-select.css',\n hostDirectives: [\n {\n directive: AdPrimaryColorDirective,\n inputs: ['primaryColor']\n }\n ]\n})\nexport class AdMultiSelect {\n /** Signal Forms field bound to a string[] value, e.g. userForm.settings.permissions */\n @Input({ required: true }) formField!: FieldTree<string[]>;\n\n @Input() options: AdMultiSelectOption[] = [];\n @Input() placeholder = 'Select options';\n @Input() disabled = false;\n @Input() errorMessage = '';\n\n protected isOpen = signal(false);\n\n constructor(private el: ElementRef<HTMLElement>) {}\n\n /** field() returns FieldState<string[]>; .value() is the actual array signal */\n protected selectedValues = computed<string[]>(() => this.formField().value() ?? []);\n\n protected hasError(): boolean {\n return this.formField().touched() && this.formField().invalid();\n }\n\n protected labelFor(value: string): string {\n return this.options.find((o) => o.value === value)?.label ?? value;\n }\n\n protected isSelected(value: string): boolean {\n return this.selectedValues().includes(value);\n }\n\n protected toggleOpen(): void {\n if (this.disabled) return;\n this.isOpen.update((v) => !v);\n }\n\n protected close(): void {\n this.isOpen.set(false);\n }\n\n protected toggleValue(value: string): void {\n const current = this.selectedValues();\n const next = current.includes(value) ? current.filter((v) => v !== value) : [...current, value];\n this.writeValue(next);\n }\n\n protected removeValue(value: string, event: Event): void {\n event.stopPropagation(); // don't reopen/close the dropdown when removing a chip\n this.writeValue(this.selectedValues().filter((v) => v !== value));\n }\n\n protected selectAll(): void {\n this.writeValue(this.options.map((o) => o.value));\n }\n\n protected clearAll(): void {\n this.writeValue([]);\n }\n\n private writeValue(next: string[]): void {\n // field() returns FieldState<string[]>; .value is a WritableSignal<string[]>\n this.formField().value.set(next);\n this.formField().markAsTouched();\n this.formField().markAsDirty();\n }\n\n @HostListener('document:click', ['$event'])\n onDocumentClick(event: MouseEvent): void {\n if (!this.el.nativeElement.contains(event.target as Node)) {\n this.close();\n }\n }\n}\n","<div class=\"relative w-full\" (keydown.escape)=\"close()\">\n <!-- Trigger -->\n <button\n type=\"button\"\n class=\"flex items-center justify-between bg-neutral-secondary-medium border-2 border-default-medium text-heading text-sm rounded-base focus:ring-brand focus:border-brand w-full px-3 py-2.5 shadow-xs placeholder:text-body\"\n [class.border-default-medium]=\"!hasError()\"\n [class.border-red-500]=\"hasError()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-disabled]=\"disabled\"\n [disabled]=\"disabled\"\n (click)=\"toggleOpen()\"\n >\n <!-- Selected chips, or placeholder -->\n <div class=\"flex flex-wrap gap-1.5 items-center\" [class.text-fg-disabled]=\"disabled\">\n @if (selectedValues().length) {\n @for (val of selectedValues(); track val) {\n <span\n class=\"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium bg-brand/10 text-fg-brand\"\n >\n {{ labelFor(val) }}\n\n @if (!disabled) {\n <span\n class=\"cursor-pointer hover:text-red-500\"\n (click)=\"removeValue(val, $event)\"\n role=\"button\"\n [attr.aria-label]=\"'Remove ' + labelFor(val)\"\n >\n ×\n </span>\n }\n </span>\n }\n } @else {\n <span class=\"text-body\">{{ placeholder }}</span>\n }\n </div>\n\n <svg\n class=\"w-4 h-4 ms-2 shrink-0 text-body transition-transform\"\n [class.rotate-180]=\"isOpen()\"\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <path\n stroke=\"currentColor\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"m19 9-7 7-7-7\"\n />\n </svg>\n </button>\n\n <!-- Dropdown panel -->\n @if (isOpen()) {\n <div\n class=\"absolute z-10 mt-1 w-full bg-neutral-primary-medium border border-default-medium rounded-base shadow-lg max-h-60 overflow-y-auto\"\n >\n <div class=\"flex items-center justify-between px-2 py-1.5 border-b border-default-medium\">\n <button\n type=\"button\"\n class=\"text-xs font-medium text-fg-brand hover:underline\"\n (click)=\"selectAll()\"\n >\n Select all\n </button>\n <button\n type=\"button\"\n class=\"text-xs font-medium text-body hover:underline\"\n (click)=\"clearAll()\"\n >\n Clear\n </button>\n </div>\n\n <ul class=\"p-1 text-sm text-body\" role=\"listbox\" aria-multiselectable=\"true\">\n @for (opt of options; track opt) {\n <li>\n <label\n class=\"flex items-center gap-2 w-full p-2 rounded-md cursor-pointer hover:bg-neutral-tertiary-medium text-sm font-medium text-heading\"\n >\n <input\n type=\"checkbox\"\n class=\"w-4 h-4 border border-default-medium rounded-xs bg-neutral-secondary-medium focus:ring-2 focus:ring-brand-soft\"\n [checked]=\"isSelected(opt.value)\"\n (change)=\"toggleValue(opt.value)\"\n />\n {{ opt.label }}\n </label>\n </li>\n }\n\n @if (!options.length) {\n <li class=\"p-2 text-body text-sm\">No options available</li>\n }\n </ul>\n </div>\n }\n\n @if (hasError() && errorMessage) {\n <p class=\"mt-1.5 text-sm text-red-500\">\n {{ errorMessage }}\n </p>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Input, Directive } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
class AdPrimaryColorDirective {
|
|
5
|
+
primaryColor;
|
|
6
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AdPrimaryColorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
7
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.5", type: AdPrimaryColorDirective, isStandalone: true, selector: "[adPrimaryColor]", inputs: { primaryColor: "primaryColor" }, host: { properties: { "style.--color-brand": "primaryColor || null", "style.--color-fg-brand": "primaryColor || null", "style.--color-brand-soft": "primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 10%, transparent)' : null", "style.--color-brand-softer": "primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 5%, transparent)' : null", "style.--color-brand-medium": "primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 20%, transparent)' : null", "style.--color-brand-strong": "primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 90%, black)' : null", "style.--color-brand-subtle": "primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 20%, transparent)' : null", "style.--color-brand-light": "primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 80%, white)' : null", "style.--color-fg-brand-subtle": "primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 30%, transparent)' : null", "style.--color-fg-brand-strong": "primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 80%, black)' : null" } }, ngImport: i0 });
|
|
8
|
+
}
|
|
9
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: AdPrimaryColorDirective, decorators: [{
|
|
10
|
+
type: Directive,
|
|
11
|
+
args: [{
|
|
12
|
+
selector: '[adPrimaryColor]',
|
|
13
|
+
standalone: true,
|
|
14
|
+
host: {
|
|
15
|
+
'[style.--color-brand]': 'primaryColor || null',
|
|
16
|
+
'[style.--color-fg-brand]': 'primaryColor || null',
|
|
17
|
+
'[style.--color-brand-soft]': "primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 10%, transparent)' : null",
|
|
18
|
+
'[style.--color-brand-softer]': "primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 5%, transparent)' : null",
|
|
19
|
+
'[style.--color-brand-medium]': "primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 20%, transparent)' : null",
|
|
20
|
+
'[style.--color-brand-strong]': "primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 90%, black)' : null",
|
|
21
|
+
'[style.--color-brand-subtle]': "primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 20%, transparent)' : null",
|
|
22
|
+
'[style.--color-brand-light]': "primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 80%, white)' : null",
|
|
23
|
+
'[style.--color-fg-brand-subtle]': "primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 30%, transparent)' : null",
|
|
24
|
+
'[style.--color-fg-brand-strong]': "primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 80%, black)' : null",
|
|
25
|
+
}
|
|
26
|
+
}]
|
|
27
|
+
}], propDecorators: { primaryColor: [{
|
|
28
|
+
type: Input
|
|
29
|
+
}] } });
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
* Public API Surface of ng-adflowtail
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Generated bundle index. Do not edit.
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
export { AdPrimaryColorDirective };
|
|
40
|
+
//# sourceMappingURL=ng-adflowtail.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-adflowtail.mjs","sources":["../../../projects/ng-adflowtail/src/lib/shared/ad-primary-color.directive.ts","../../../projects/ng-adflowtail/src/public-api.ts","../../../projects/ng-adflowtail/src/ng-adflowtail.ts"],"sourcesContent":["import { Directive, Input } from '@angular/core';\n\n@Directive({\n selector: '[adPrimaryColor]',\n standalone: true,\n host: {\n '[style.--color-brand]': 'primaryColor || null',\n '[style.--color-fg-brand]': 'primaryColor || null',\n '[style.--color-brand-soft]': \"primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 10%, transparent)' : null\",\n '[style.--color-brand-softer]': \"primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 5%, transparent)' : null\",\n '[style.--color-brand-medium]': \"primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 20%, transparent)' : null\",\n '[style.--color-brand-strong]': \"primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 90%, black)' : null\",\n '[style.--color-brand-subtle]': \"primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 20%, transparent)' : null\",\n '[style.--color-brand-light]': \"primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 80%, white)' : null\",\n '[style.--color-fg-brand-subtle]': \"primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 30%, transparent)' : null\",\n '[style.--color-fg-brand-strong]': \"primaryColor ? 'color-mix(in srgb, ' + primaryColor + ' 80%, black)' : null\",\n }\n})\nexport class AdPrimaryColorDirective {\n @Input() primaryColor?: string;\n}\n","/*\n * Public API Surface of ng-adflowtail\n */\n\nexport * from './lib/shared/ad-common.types';\nexport * from './lib/shared/ad-primary-color.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAkBa,uBAAuB,CAAA;AACzB,IAAA,YAAY;uGADV,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,EAAA,YAAA,EAAA,cAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,qBAAA,EAAA,sBAAA,EAAA,wBAAA,EAAA,sBAAA,EAAA,0BAAA,EAAA,mFAAA,EAAA,4BAAA,EAAA,kFAAA,EAAA,4BAAA,EAAA,mFAAA,EAAA,4BAAA,EAAA,6EAAA,EAAA,4BAAA,EAAA,mFAAA,EAAA,2BAAA,EAAA,6EAAA,EAAA,+BAAA,EAAA,mFAAA,EAAA,+BAAA,EAAA,6EAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAhBnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACJ,wBAAA,uBAAuB,EAAE,sBAAsB;AAC/C,wBAAA,0BAA0B,EAAE,sBAAsB;AAClD,wBAAA,4BAA4B,EAAE,mFAAmF;AACjH,wBAAA,8BAA8B,EAAE,kFAAkF;AAClH,wBAAA,8BAA8B,EAAE,mFAAmF;AACnH,wBAAA,8BAA8B,EAAE,6EAA6E;AAC7G,wBAAA,8BAA8B,EAAE,mFAAmF;AACnH,wBAAA,6BAA6B,EAAE,6EAA6E;AAC5G,wBAAA,iCAAiC,EAAE,mFAAmF;AACtH,wBAAA,iCAAiC,EAAE,6EAA6E;AACjH;AACF,iBAAA;;sBAEE;;;ACnBH;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ng-adflowtail",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^22.0.0",
|
|
6
|
+
"@angular/core": "^22.0.0",
|
|
7
|
+
"flowbite": "^4.0.0",
|
|
8
|
+
"tailwindcss": "^4.0.0"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"tslib": "^2.3.0"
|
|
12
|
+
},
|
|
13
|
+
"sideEffects": false,
|
|
14
|
+
"module": "fesm2022/ng-adflowtail.mjs",
|
|
15
|
+
"typings": "types/ng-adflowtail.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
"./package.json": {
|
|
18
|
+
"default": "./package.json"
|
|
19
|
+
},
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./types/ng-adflowtail.d.ts",
|
|
22
|
+
"default": "./fesm2022/ng-adflowtail.mjs"
|
|
23
|
+
},
|
|
24
|
+
"./ad-data-table": {
|
|
25
|
+
"types": "./types/ng-adflowtail-ad-data-table.d.ts",
|
|
26
|
+
"default": "./fesm2022/ng-adflowtail-ad-data-table.mjs"
|
|
27
|
+
},
|
|
28
|
+
"./ad-multi-select": {
|
|
29
|
+
"types": "./types/ng-adflowtail-ad-multi-select.d.ts",
|
|
30
|
+
"default": "./fesm2022/ng-adflowtail-ad-multi-select.mjs"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"type": "module"
|
|
34
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnInit, OnChanges, AfterViewInit, EventEmitter, SimpleChanges } from '@angular/core';
|
|
3
|
+
import * as i1 from 'ng-adflowtail';
|
|
4
|
+
|
|
5
|
+
type DataTableButtonAction = 'EDIT' | 'DELETE' | 'VIEW';
|
|
6
|
+
interface TableColumn {
|
|
7
|
+
field: string;
|
|
8
|
+
header: string;
|
|
9
|
+
type?: 'text' | 'number' | 'date' | 'currency' | 'status' | 'action' | 'template';
|
|
10
|
+
format?: string;
|
|
11
|
+
actionTemplate?: (item: any) => string;
|
|
12
|
+
statusColors?: {
|
|
13
|
+
[key: string]: string;
|
|
14
|
+
};
|
|
15
|
+
searchable?: boolean;
|
|
16
|
+
searchPlaceholder?: string;
|
|
17
|
+
searchType?: 'text' | 'select' | 'multiSelect' | 'date' | 'dateRange' | 'number' | 'autocomplete';
|
|
18
|
+
searchOptions?: Array<{
|
|
19
|
+
value: any;
|
|
20
|
+
label: string;
|
|
21
|
+
}>;
|
|
22
|
+
multiSelectConfig?: {
|
|
23
|
+
maxItems?: number;
|
|
24
|
+
showSelectAll?: boolean;
|
|
25
|
+
};
|
|
26
|
+
autocompleteConfig?: {
|
|
27
|
+
apiUrl?: string;
|
|
28
|
+
debounceTime?: number;
|
|
29
|
+
minChars?: number;
|
|
30
|
+
valueField?: string;
|
|
31
|
+
labelField?: string;
|
|
32
|
+
customSearchFn?: (searchTerm: string) => Promise<Array<{
|
|
33
|
+
value: any;
|
|
34
|
+
label: string;
|
|
35
|
+
}>>;
|
|
36
|
+
};
|
|
37
|
+
actions?: TableAction[];
|
|
38
|
+
}
|
|
39
|
+
interface TableAction {
|
|
40
|
+
id: DataTableButtonAction;
|
|
41
|
+
label: string;
|
|
42
|
+
icon?: string;
|
|
43
|
+
color?: 'primary' | 'success' | 'danger' | 'warning' | 'info' | 'secondary';
|
|
44
|
+
className?: string;
|
|
45
|
+
visible?: (item: any) => boolean;
|
|
46
|
+
disabled?: (item: any) => boolean;
|
|
47
|
+
tooltip?: string;
|
|
48
|
+
}
|
|
49
|
+
interface TableConfig {
|
|
50
|
+
columns: TableColumn[];
|
|
51
|
+
totalCount?: number;
|
|
52
|
+
currentPage?: number;
|
|
53
|
+
pageSize?: number;
|
|
54
|
+
itemsPerPage?: number;
|
|
55
|
+
showPagination?: boolean;
|
|
56
|
+
showPageSize?: boolean;
|
|
57
|
+
pageSizeOptions?: number[];
|
|
58
|
+
showSearch?: boolean;
|
|
59
|
+
searchPlaceholder?: string;
|
|
60
|
+
showActions?: boolean;
|
|
61
|
+
showColumnSearch?: boolean;
|
|
62
|
+
}
|
|
63
|
+
interface ColumnSearchEvent {
|
|
64
|
+
column: string;
|
|
65
|
+
value: any;
|
|
66
|
+
field: string;
|
|
67
|
+
searchType: string;
|
|
68
|
+
}
|
|
69
|
+
interface DateRangeValue {
|
|
70
|
+
start: Date | string | null;
|
|
71
|
+
end: Date | string | null;
|
|
72
|
+
}
|
|
73
|
+
interface SuggestionItem {
|
|
74
|
+
value: any;
|
|
75
|
+
label: string;
|
|
76
|
+
}
|
|
77
|
+
declare class AdDataTable implements OnInit, OnChanges, AfterViewInit {
|
|
78
|
+
title: string;
|
|
79
|
+
data: any[];
|
|
80
|
+
tableStyle?: string;
|
|
81
|
+
config: TableConfig;
|
|
82
|
+
pageChange: EventEmitter<number>;
|
|
83
|
+
pageSizeChange: EventEmitter<number>;
|
|
84
|
+
rowClick: EventEmitter<any>;
|
|
85
|
+
actionClick: EventEmitter<{
|
|
86
|
+
action: DataTableButtonAction;
|
|
87
|
+
item: any;
|
|
88
|
+
}>;
|
|
89
|
+
searchChange: EventEmitter<string>;
|
|
90
|
+
columnSearchChange: EventEmitter<ColumnSearchEvent>;
|
|
91
|
+
currentPage: number;
|
|
92
|
+
pageSize: number;
|
|
93
|
+
totalPages: number;
|
|
94
|
+
paginatedData: any[];
|
|
95
|
+
searchTerm: string;
|
|
96
|
+
columnSearchValues: {
|
|
97
|
+
[key: string]: string;
|
|
98
|
+
};
|
|
99
|
+
showColumnFilters: {
|
|
100
|
+
[key: string]: boolean;
|
|
101
|
+
};
|
|
102
|
+
dateRangeValues: {
|
|
103
|
+
[key: string]: DateRangeValue;
|
|
104
|
+
};
|
|
105
|
+
ngOnInit(): void;
|
|
106
|
+
ngAfterViewInit(): void;
|
|
107
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
108
|
+
initializeColumnSearch(): void;
|
|
109
|
+
onTextSearchKeyup(column: TableColumn, event: any): void;
|
|
110
|
+
onSelectSearchChange(column: TableColumn): void;
|
|
111
|
+
onMultiSelectSearchChange(column: TableColumn): void;
|
|
112
|
+
onDateSearchChange(column: TableColumn): void;
|
|
113
|
+
onDateRangeSearchChange(column: TableColumn): void;
|
|
114
|
+
updatePagination(): void;
|
|
115
|
+
getNestedValue(obj: any, path: string): any;
|
|
116
|
+
formatValue(item: any, column: TableColumn): any;
|
|
117
|
+
onSearch(event: any): void;
|
|
118
|
+
onColumnSearchSubmit(column: TableColumn): void;
|
|
119
|
+
onColumnSearchClear(column: TableColumn): void;
|
|
120
|
+
toggleColumnFilter(columnField: string): void;
|
|
121
|
+
onPageChange(page: number): void;
|
|
122
|
+
onPageSizeChange(event: any): void;
|
|
123
|
+
onRowClick(item: any): void;
|
|
124
|
+
onActionClick(actionId: DataTableButtonAction, item: any, event: Event): void;
|
|
125
|
+
getPageNumbers(): number[];
|
|
126
|
+
getStartIndex(): number;
|
|
127
|
+
getEndIndex(): number;
|
|
128
|
+
/**
|
|
129
|
+
* Get color classes for action button
|
|
130
|
+
*/
|
|
131
|
+
getActionColorClass(action: TableAction): string;
|
|
132
|
+
getActionsForItem(column: TableColumn, item: any): TableAction[];
|
|
133
|
+
isActionDisabled(action: TableAction, item: any): boolean;
|
|
134
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AdDataTable, never>;
|
|
135
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AdDataTable, "ad-data-table", never, { "title": { "alias": "title"; "required": false; }; "data": { "alias": "data"; "required": false; }; "tableStyle": { "alias": "tableStyle"; "required": false; }; "config": { "alias": "config"; "required": false; }; }, { "pageChange": "pageChange"; "pageSizeChange": "pageSizeChange"; "rowClick": "rowClick"; "actionClick": "actionClick"; "searchChange": "searchChange"; "columnSearchChange": "columnSearchChange"; }, never, never, true, [{ directive: typeof i1.AdPrimaryColorDirective; inputs: { "primaryColor": "primaryColor"; }; outputs: {}; }]>;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export { AdDataTable };
|
|
139
|
+
export type { ColumnSearchEvent, DataTableButtonAction, DateRangeValue, SuggestionItem, TableAction, TableColumn, TableConfig };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ElementRef } from '@angular/core';
|
|
3
|
+
import { FieldTree } from '@angular/forms/signals';
|
|
4
|
+
import * as i1 from 'ng-adflowtail';
|
|
5
|
+
|
|
6
|
+
interface AdMultiSelectOption {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
}
|
|
10
|
+
declare class AdMultiSelect {
|
|
11
|
+
private el;
|
|
12
|
+
/** Signal Forms field bound to a string[] value, e.g. userForm.settings.permissions */
|
|
13
|
+
formField: FieldTree<string[]>;
|
|
14
|
+
options: AdMultiSelectOption[];
|
|
15
|
+
placeholder: string;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
errorMessage: string;
|
|
18
|
+
protected isOpen: _angular_core.WritableSignal<boolean>;
|
|
19
|
+
constructor(el: ElementRef<HTMLElement>);
|
|
20
|
+
/** field() returns FieldState<string[]>; .value() is the actual array signal */
|
|
21
|
+
protected selectedValues: _angular_core.Signal<string[]>;
|
|
22
|
+
protected hasError(): boolean;
|
|
23
|
+
protected labelFor(value: string): string;
|
|
24
|
+
protected isSelected(value: string): boolean;
|
|
25
|
+
protected toggleOpen(): void;
|
|
26
|
+
protected close(): void;
|
|
27
|
+
protected toggleValue(value: string): void;
|
|
28
|
+
protected removeValue(value: string, event: Event): void;
|
|
29
|
+
protected selectAll(): void;
|
|
30
|
+
protected clearAll(): void;
|
|
31
|
+
private writeValue;
|
|
32
|
+
onDocumentClick(event: MouseEvent): void;
|
|
33
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AdMultiSelect, never>;
|
|
34
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AdMultiSelect, "ad-multi-select", never, { "formField": { "alias": "formField"; "required": true; }; "options": { "alias": "options"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.AdPrimaryColorDirective; inputs: { "primaryColor": "primaryColor"; }; outputs: {}; }]>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { AdMultiSelect };
|
|
38
|
+
export type { AdMultiSelectOption };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
|
|
3
|
+
interface AdColumn<T = unknown> {
|
|
4
|
+
key: keyof T & string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare class AdPrimaryColorDirective {
|
|
9
|
+
primaryColor?: string;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AdPrimaryColorDirective, never>;
|
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AdPrimaryColorDirective, "[adPrimaryColor]", never, { "primaryColor": { "alias": "primaryColor"; "required": false; }; }, {}, never, never, true, never>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { AdPrimaryColorDirective };
|
|
15
|
+
export type { AdColumn };
|