@winexist/ngp 0.2.0 → 0.3.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/fesm2022/winexist-ngp.mjs +83 -5
- package/fesm2022/winexist-ngp.mjs.map +1 -1
- package/index.d.ts +28 -2
- package/package.json +1 -1
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, Component, output, signal, effect, ViewChild, ContentChild, Input } from '@angular/core';
|
|
3
|
-
import * as
|
|
2
|
+
import { input, Component, output, signal, effect, ViewChild, ContentChild, Input, forwardRef } from '@angular/core';
|
|
3
|
+
import * as i3 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1 from 'primeng/fileupload';
|
|
6
6
|
import { FileUploadModule } from 'primeng/fileupload';
|
|
7
|
-
import
|
|
7
|
+
import * as i2 from '@angular/forms';
|
|
8
|
+
import { NgControl, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
8
9
|
import * as i1$1 from 'primeng/message';
|
|
9
10
|
import { MessageModule } from 'primeng/message';
|
|
11
|
+
import * as i1$2 from '@ng-select/ng-select';
|
|
12
|
+
import { NgSelectModule } from '@ng-select/ng-select';
|
|
13
|
+
import * as i4 from 'primeng/floatlabel';
|
|
14
|
+
import { FloatLabelModule } from 'primeng/floatlabel';
|
|
15
|
+
import * as i5 from 'primeng/progressspinner';
|
|
16
|
+
import { ProgressSpinnerModule } from 'primeng/progressspinner';
|
|
10
17
|
|
|
11
18
|
class EmptyComponent {
|
|
12
19
|
title = input('Section is empty.', ...(ngDevMode ? [{ debugName: "title" }] : []));
|
|
@@ -105,7 +112,7 @@ class FileUploadComponent {
|
|
|
105
112
|
return typedFile;
|
|
106
113
|
}
|
|
107
114
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FileUploadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
108
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: FileUploadComponent, isStandalone: true, selector: "ngp-file-upload", inputs: { files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, showUploadButton: { classPropertyName: "showUploadButton", publicName: "showUploadButton", isSignal: true, isRequired: false, transformFunction: null }, cancelLabel: { classPropertyName: "cancelLabel", publicName: "cancelLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filesSelected: "filesSelected", filesCleared: "filesCleared" }, viewQueries: [{ propertyName: "fileUploader", first: true, predicate: ["fileUploader"], descendants: true }], ngImport: i0, template: "<p-fileupload #fileUploader [multiple]=\"multiple()\" [showUploadButton]=\"showUploadButton()\"\n [cancelLabel]=\"cancelLabel()\" [accept]=\"accept()\" auto=\"false\" [maxFileSize]=\"maxFileSize()\" mode=\"advanced\"\n [customUpload]=\"true\" styleClass=\"!bg-gray-50\" (onSelect)=\"onFileSelect($event)\" (onClear)=\"onClear()\">\n <ng-template #content>\n @if (uploadedFiles().length) {\n <ul class=\"space-y-2\">\n @for (file of uploadedFiles(); track $index) {\n <li class=\"flex justify-between gap-4 p-2 bg-gray-100 rounded\">\n <div class=\"flex gap-2\">\n <ng-container [ngTemplateOutlet]=\"iconTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: file.fileType }\"></ng-container>\n <span class=\"text-sm\"> {{ file.name }} - {{ formatFileSize(file.size) }} </span>\n </div>\n <button type=\"button\" (click)=\"removeFile($index)\" class=\"text-red-500 hover:text-red-700 text-sm\">\n <span class=\"material-icons !text-base\"> cancel </span>\n </button>\n </li>\n }\n </ul>\n } @else {\n <div class=\"flex flex-col items-center gap-3\">\n <img src=\"assets/images/file-upload.svg\" alt=\"File Upload\" class=\"w-28 mx-auto\" />\n <span class=\"font-semibold text-center text-gray-400 text-sm\">\n Drag & drop or<br />\n click the \"Choose\" button to add new files\n </span>\n </div>\n }\n </ng-template>\n <ng-template #file></ng-template>\n</p-fileupload>\n\n<ng-template #iconTemplate let-type>\n @if (type === 'image') {\n <span class=\"material-icons\"> image </span>\n } @else if (type === 'pdf') {\n <span class=\"material-icons\"> picture_as_pdf </span>\n } @else {\n <span class=\"material-icons\"> insert_drive_file </span>\n }\n</ng-template>", styles: [""], dependencies: [{ kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i1.FileUpload, selector: "p-fileupload, p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "chooseButtonProps", "uploadButtonProps", "cancelButtonProps", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
115
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: FileUploadComponent, isStandalone: true, selector: "ngp-file-upload", inputs: { files: { classPropertyName: "files", publicName: "files", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, maxFileSize: { classPropertyName: "maxFileSize", publicName: "maxFileSize", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, showUploadButton: { classPropertyName: "showUploadButton", publicName: "showUploadButton", isSignal: true, isRequired: false, transformFunction: null }, cancelLabel: { classPropertyName: "cancelLabel", publicName: "cancelLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filesSelected: "filesSelected", filesCleared: "filesCleared" }, viewQueries: [{ propertyName: "fileUploader", first: true, predicate: ["fileUploader"], descendants: true }], ngImport: i0, template: "<p-fileupload #fileUploader [multiple]=\"multiple()\" [showUploadButton]=\"showUploadButton()\"\n [cancelLabel]=\"cancelLabel()\" [accept]=\"accept()\" auto=\"false\" [maxFileSize]=\"maxFileSize()\" mode=\"advanced\"\n [customUpload]=\"true\" styleClass=\"!bg-gray-50\" (onSelect)=\"onFileSelect($event)\" (onClear)=\"onClear()\">\n <ng-template #content>\n @if (uploadedFiles().length) {\n <ul class=\"space-y-2\">\n @for (file of uploadedFiles(); track $index) {\n <li class=\"flex justify-between gap-4 p-2 bg-gray-100 rounded\">\n <div class=\"flex gap-2\">\n <ng-container [ngTemplateOutlet]=\"iconTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: file.fileType }\"></ng-container>\n <span class=\"text-sm\"> {{ file.name }} - {{ formatFileSize(file.size) }} </span>\n </div>\n <button type=\"button\" (click)=\"removeFile($index)\" class=\"text-red-500 hover:text-red-700 text-sm\">\n <span class=\"material-icons !text-base\"> cancel </span>\n </button>\n </li>\n }\n </ul>\n } @else {\n <div class=\"flex flex-col items-center gap-3\">\n <img src=\"assets/images/file-upload.svg\" alt=\"File Upload\" class=\"w-28 mx-auto\" />\n <span class=\"font-semibold text-center text-gray-400 text-sm\">\n Drag & drop or<br />\n click the \"Choose\" button to add new files\n </span>\n </div>\n }\n </ng-template>\n <ng-template #file></ng-template>\n</p-fileupload>\n\n<ng-template #iconTemplate let-type>\n @if (type === 'image') {\n <span class=\"material-icons\"> image </span>\n } @else if (type === 'pdf') {\n <span class=\"material-icons\"> picture_as_pdf </span>\n } @else {\n <span class=\"material-icons\"> insert_drive_file </span>\n }\n</ng-template>", styles: [""], dependencies: [{ kind: "ngmodule", type: FileUploadModule }, { kind: "component", type: i1.FileUpload, selector: "p-fileupload, p-fileUpload", inputs: ["name", "url", "method", "multiple", "accept", "disabled", "auto", "withCredentials", "maxFileSize", "invalidFileSizeMessageSummary", "invalidFileSizeMessageDetail", "invalidFileTypeMessageSummary", "invalidFileTypeMessageDetail", "invalidFileLimitMessageDetail", "invalidFileLimitMessageSummary", "style", "styleClass", "previewWidth", "chooseLabel", "uploadLabel", "cancelLabel", "chooseIcon", "uploadIcon", "cancelIcon", "showUploadButton", "showCancelButton", "mode", "headers", "customUpload", "fileLimit", "uploadStyleClass", "cancelStyleClass", "removeStyleClass", "chooseStyleClass", "chooseButtonProps", "uploadButtonProps", "cancelButtonProps", "files"], outputs: ["onBeforeUpload", "onSend", "onUpload", "onError", "onClear", "onRemove", "onSelect", "onProgress", "uploadHandler", "onImageError", "onRemoveUploadedFile"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
109
116
|
}
|
|
110
117
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: FileUploadComponent, decorators: [{
|
|
111
118
|
type: Component,
|
|
@@ -168,11 +175,82 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
168
175
|
args: [NgControl]
|
|
169
176
|
}] } });
|
|
170
177
|
|
|
178
|
+
class BasicNgSelectComponent {
|
|
179
|
+
options = input([], ...(ngDevMode ? [{ debugName: "options" }] : []));
|
|
180
|
+
bindLabel = input('', ...(ngDevMode ? [{ debugName: "bindLabel" }] : []));
|
|
181
|
+
bindValue = input('', ...(ngDevMode ? [{ debugName: "bindValue" }] : []));
|
|
182
|
+
placeholder = input('Select an option', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
183
|
+
clearable = input(true, ...(ngDevMode ? [{ debugName: "clearable" }] : []));
|
|
184
|
+
searchable = input(true, ...(ngDevMode ? [{ debugName: "searchable" }] : []));
|
|
185
|
+
loading = input(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
186
|
+
label = input(null, ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
187
|
+
required = input(true, ...(ngDevMode ? [{ debugName: "required" }] : []));
|
|
188
|
+
// Internal state
|
|
189
|
+
value = null;
|
|
190
|
+
disabled = false;
|
|
191
|
+
// ControlValueAccessor callbacks
|
|
192
|
+
onChange = () => { };
|
|
193
|
+
onTouched = () => { };
|
|
194
|
+
// Handle value changes from ng-select
|
|
195
|
+
onValueChange(value) {
|
|
196
|
+
this.value = value;
|
|
197
|
+
this.onChange(value);
|
|
198
|
+
}
|
|
199
|
+
writeValue(val) {
|
|
200
|
+
this.value = val;
|
|
201
|
+
}
|
|
202
|
+
registerOnChange(fn) {
|
|
203
|
+
this.onChange = fn;
|
|
204
|
+
}
|
|
205
|
+
registerOnTouched(fn) {
|
|
206
|
+
this.onTouched = fn;
|
|
207
|
+
}
|
|
208
|
+
setDisabledState(isDisabled) {
|
|
209
|
+
this.disabled = isDisabled;
|
|
210
|
+
}
|
|
211
|
+
// Compare function for ng-select
|
|
212
|
+
compareWith = (item, selected) => {
|
|
213
|
+
const bindValueKey = this.bindValue();
|
|
214
|
+
// If no bindValue is set, compare entire objects
|
|
215
|
+
if (!bindValueKey) {
|
|
216
|
+
return item === selected;
|
|
217
|
+
}
|
|
218
|
+
// Handle null/undefined cases
|
|
219
|
+
if (!item || !selected) {
|
|
220
|
+
return item === selected;
|
|
221
|
+
}
|
|
222
|
+
// If selected is a primitive (just the id), compare with item's property
|
|
223
|
+
if (typeof selected !== 'object') {
|
|
224
|
+
return item[bindValueKey] === selected;
|
|
225
|
+
}
|
|
226
|
+
// If both are objects, compare the bindValue property
|
|
227
|
+
return item[bindValueKey] === selected[bindValueKey];
|
|
228
|
+
};
|
|
229
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BasicNgSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
230
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: BasicNgSelectComponent, isStandalone: true, selector: "ngp-basic-select", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, bindLabel: { classPropertyName: "bindLabel", publicName: "bindLabel", isSignal: true, isRequired: false, transformFunction: null }, bindValue: { classPropertyName: "bindValue", publicName: "bindValue", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
231
|
+
{
|
|
232
|
+
provide: NG_VALUE_ACCESSOR,
|
|
233
|
+
useExisting: forwardRef(() => BasicNgSelectComponent),
|
|
234
|
+
multi: true
|
|
235
|
+
}
|
|
236
|
+
], ngImport: i0, template: "<ngp-form-field-wrapper>\n <p-floatlabel variant=\"in\">\n <ng-select [(ngModel)]=\"value\" [bindLabel]=\"bindLabel()\" [bindValue]=\"bindValue()\" [items]=\"options()\"\n [compareWith]=\"compareWith\" [clearable]=\"clearable()\" (change)=\"onValueChange($event)\">\n <ng-template ng-loadingspinner-tmp>\n <ng-container [ngTemplateOutlet]=\"spinner\" />\n </ng-template>\n </ng-select>\n\n @if (label()) {\n <label class=\"block mb-2\" [ngClass]=\"{'required-label': required() }\">{{ label() }}</label>\n }\n </p-floatlabel>\n</ngp-form-field-wrapper>\n\n<ng-template #spinner>\n <p-progress-spinner ariaLabel=\"loading\" styleClass=\"text-gray-400\" />\n</ng-template>", styles: [""], dependencies: [{ kind: "ngmodule", type: NgSelectModule }, { kind: "component", type: i1$2.NgSelectComponent, selector: "ng-select", inputs: ["ariaLabelDropdown", "ariaLabel", "markFirst", "placeholder", "fixedPlaceholder", "notFoundText", "typeToSearchText", "preventToggleOnRightClick", "addTagText", "loadingText", "clearAllText", "dropdownPosition", "appendTo", "outsideClickEvent", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "tabFocusOnClearButton", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "ngClass", "typeahead", "multiple", "addTag", "searchable", "clearable", "deselectOnClick", "clearSearchOnAdd", "compareWith", "keyDownFn", "bindLabel", "bindValue", "appearance", "isOpen", "items"], outputs: ["bindLabelChange", "bindValueChange", "appearanceChange", "isOpenChange", "itemsChange", "blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"], exportAs: ["ngSelect"] }, { kind: "directive", type: i1$2.NgLoadingSpinnerTemplateDirective, selector: "[ng-loadingspinner-tmp]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: FormFieldWrapperComponent, selector: "ngp-form-field-wrapper", inputs: ["validationMessages"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i4.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "ngmodule", type: ProgressSpinnerModule }, { kind: "component", type: i5.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }] });
|
|
237
|
+
}
|
|
238
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: BasicNgSelectComponent, decorators: [{
|
|
239
|
+
type: Component,
|
|
240
|
+
args: [{ selector: 'ngp-basic-select', imports: [NgSelectModule, FormsModule, CommonModule, FormFieldWrapperComponent, FloatLabelModule, ProgressSpinnerModule], providers: [
|
|
241
|
+
{
|
|
242
|
+
provide: NG_VALUE_ACCESSOR,
|
|
243
|
+
useExisting: forwardRef(() => BasicNgSelectComponent),
|
|
244
|
+
multi: true
|
|
245
|
+
}
|
|
246
|
+
], template: "<ngp-form-field-wrapper>\n <p-floatlabel variant=\"in\">\n <ng-select [(ngModel)]=\"value\" [bindLabel]=\"bindLabel()\" [bindValue]=\"bindValue()\" [items]=\"options()\"\n [compareWith]=\"compareWith\" [clearable]=\"clearable()\" (change)=\"onValueChange($event)\">\n <ng-template ng-loadingspinner-tmp>\n <ng-container [ngTemplateOutlet]=\"spinner\" />\n </ng-template>\n </ng-select>\n\n @if (label()) {\n <label class=\"block mb-2\" [ngClass]=\"{'required-label': required() }\">{{ label() }}</label>\n }\n </p-floatlabel>\n</ngp-form-field-wrapper>\n\n<ng-template #spinner>\n <p-progress-spinner ariaLabel=\"loading\" styleClass=\"text-gray-400\" />\n</ng-template>" }]
|
|
247
|
+
}], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], bindLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "bindLabel", required: false }] }], bindValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "bindValue", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }] } });
|
|
248
|
+
|
|
171
249
|
// export * from './lib/components/components';
|
|
172
250
|
|
|
173
251
|
/**
|
|
174
252
|
* Generated bundle index. Do not edit.
|
|
175
253
|
*/
|
|
176
254
|
|
|
177
|
-
export { EmptyComponent, FileUploadComponent, FormFieldWrapperComponent };
|
|
255
|
+
export { BasicNgSelectComponent, EmptyComponent, FileUploadComponent, FormFieldWrapperComponent };
|
|
178
256
|
//# sourceMappingURL=winexist-ngp.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"winexist-ngp.mjs","sources":["../../../packages/src/lib/components/empty/empty.component.ts","../../../packages/src/lib/components/empty/empty.component.html","../../../packages/src/lib/components/file-upload/file-upload.component.ts","../../../packages/src/lib/components/file-upload/file-upload.component.html","../../../packages/src/lib/components/form-field-wrapper/form-field-wrapper.component.ts","../../../packages/src/lib/components/form-field-wrapper/form-field-wrapper.component.html","../../../packages/src/index.ts","../../../packages/src/winexist-ngp.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\n\n@Component({\n\tselector: 'ngp-empty',\n\timports: [],\n\ttemplateUrl: './empty.component.html',\n\tstyleUrl: './empty.component.css'\n})\nexport class EmptyComponent {\n\ttitle = input<string>('Section is empty.');\n\tmessage = input<string>('No data available.');\n\timgSrc = input<string>();\n\n}\n","<div class=\"w-full flex justify-center items-center p-5 h-full\">\n <div class=\"flex items-center gap-3\">\n @if (imgSrc()) {\n <img alt=\"Empty\" [src]=\"imgSrc()\" class=\"w-[80px]\" />\n } @else {\n <div class=\"!rounded-md p-5 !bg-slate-100 mb-6\">\n <span class=\"material-icons !text-gray-400 !text-7xl\"> search_off </span>\n </div>\n }\n\n <div class=\"flex flex-col\">\n <span class=\"!text-gray-900 !text-2xl !font-bold\">{{ title() }}</span>\n @if (message()) {\n <span class=\"!text-gray-400 !text-base\">{{ message() }}</span>\n }\n </div>\n </div>\n</div>","import { CommonModule } from '@angular/common';\nimport { Component, effect, ElementRef, input, output, signal, ViewChild } from '@angular/core';\nimport { FileSelectEvent, FileUploadModule } from 'primeng/fileupload';\n\n// Add interface for typed files\ninterface TypedFile extends File {\n\tfileType?: 'image' | 'pdf' | 'other';\n}\n\n@Component({\n\tselector: 'ngp-file-upload',\n\timports: [FileUploadModule, CommonModule],\n\ttemplateUrl: './file-upload.component.html',\n\tstyleUrl: './file-upload.component.css',\n})\nexport class FileUploadComponent {\n\t@ViewChild('fileUploader') fileUploader!: ElementRef;\n\n\t// Signal-based inputs with defaults\n\tfiles = input<File[]>([]);\n\tmultiple = input(true);\n\taccept = input('.pdf,.png,.jpg,.jpeg,.doc,.docx,.csv,.xls,.xlsx');\n\tmaxFileSize = input(2097152); // 2MB in bytes\n\tplaceholder = input('Drag and drop new files here to upload.');\n\tshowUploadButton = input<boolean>(false);\n\tcancelLabel = input('Clear');\n\n\t// Signal-based outputs\n\tfilesSelected = output<File[]>();\n\tfilesCleared = output<void>();\n\n\t// Internal state\n\tuploadedFiles = signal<TypedFile[]>([]);\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst _files = this.files();\n\t\t\tif (_files.length) {\n\t\t\t\tthis.uploadedFiles.set(_files.map((file) => this.addFileType(file)));\n\t\t\t}\n\t\t});\n\t}\n\n\tonFileSelect(event: FileSelectEvent) {\n\t\tconst validFiles = event.currentFiles.filter(\n\t\t\t(file) => file.size <= this.maxFileSize() && this.isValidFileType(file)\n\t\t);\n\n\t\tif (validFiles.length) {\n\t\t\t// Add type to files before adding to uploadedFiles\n\t\t\tconst typedFiles = validFiles.map((file) => this.addFileType(file));\n\n\t\t\tif (this.multiple()) {\n\t\t\t\tthis.uploadedFiles.update((files) => Array.from(new Set([...files, ...typedFiles])));\n\t\t\t} else {\n\t\t\t\tthis.uploadedFiles.set(typedFiles);\n\t\t\t}\n\t\t\tthis.filesSelected.emit(typedFiles);\n\t\t}\n\t}\n\n\tonClear() {\n\t\tthis.uploadedFiles.set([]);\n\t\tthis.filesCleared.emit();\n\t}\n\n\tremoveFile(index: number) {\n\t\tthis.uploadedFiles.update((files) => files.filter((_, i) => i !== index));\n\t\tthis.filesSelected.emit(this.uploadedFiles());\n\t}\n\n\tisValidFileType(file: File): boolean {\n\t\tconst acceptedTypes = this.accept().split(',');\n\t\treturn acceptedTypes.some((type) =>\n\t\t\tfile.name.toLowerCase().endsWith(type.trim().toLowerCase())\n\t\t);\n\t}\n\n\tformatFileSize(bytes: number): string {\n\t\tif (bytes === 0) return '0 Bytes';\n\t\tconst k = 1024;\n\t\tconst sizes = ['Bytes', 'KB', 'MB', 'GB'];\n\t\tconst i = Math.floor(Math.log(bytes) / Math.log(k));\n\t\treturn parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];\n\t}\n\n\tclear() {\n\t\tthis.uploadedFiles.set([]);\n\t\tif (this.fileUploader?.nativeElement?.clear) {\n\t\t\tthis.fileUploader.nativeElement.clear();\n\t\t}\n\t}\n\n\t// Function to determine file type based on extension\n\tgetFileTypeByExtension(file: File): 'image' | 'pdf' | 'other' {\n\t\tconst fileName = file.name.toLowerCase();\n\t\tconst imageExtensions = ['.png', '.jpg', '.jpeg', '.gif', '.bmp', '.svg', '.webp'];\n\t\tconst pdfExtension = '.pdf';\n\n\t\tif (imageExtensions.some((ext) => fileName.endsWith(ext))) {\n\t\t\treturn 'image';\n\t\t} else if (fileName.endsWith(pdfExtension)) {\n\t\t\treturn 'pdf';\n\t\t} else {\n\t\t\treturn 'other';\n\t\t}\n\t}\n\n\t// Function to add type property to file\n\taddFileType(file: File): TypedFile {\n\t\tconst typedFile = file as TypedFile;\n\t\ttypedFile.fileType = this.getFileTypeByExtension(file);\n\t\treturn typedFile;\n\t}\n}\n","<p-fileupload #fileUploader [multiple]=\"multiple()\" [showUploadButton]=\"showUploadButton()\"\n [cancelLabel]=\"cancelLabel()\" [accept]=\"accept()\" auto=\"false\" [maxFileSize]=\"maxFileSize()\" mode=\"advanced\"\n [customUpload]=\"true\" styleClass=\"!bg-gray-50\" (onSelect)=\"onFileSelect($event)\" (onClear)=\"onClear()\">\n <ng-template #content>\n @if (uploadedFiles().length) {\n <ul class=\"space-y-2\">\n @for (file of uploadedFiles(); track $index) {\n <li class=\"flex justify-between gap-4 p-2 bg-gray-100 rounded\">\n <div class=\"flex gap-2\">\n <ng-container [ngTemplateOutlet]=\"iconTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: file.fileType }\"></ng-container>\n <span class=\"text-sm\"> {{ file.name }} - {{ formatFileSize(file.size) }} </span>\n </div>\n <button type=\"button\" (click)=\"removeFile($index)\" class=\"text-red-500 hover:text-red-700 text-sm\">\n <span class=\"material-icons !text-base\"> cancel </span>\n </button>\n </li>\n }\n </ul>\n } @else {\n <div class=\"flex flex-col items-center gap-3\">\n <img src=\"assets/images/file-upload.svg\" alt=\"File Upload\" class=\"w-28 mx-auto\" />\n <span class=\"font-semibold text-center text-gray-400 text-sm\">\n Drag & drop or<br />\n click the \"Choose\" button to add new files\n </span>\n </div>\n }\n </ng-template>\n <ng-template #file></ng-template>\n</p-fileupload>\n\n<ng-template #iconTemplate let-type>\n @if (type === 'image') {\n <span class=\"material-icons\"> image </span>\n } @else if (type === 'pdf') {\n <span class=\"material-icons\"> picture_as_pdf </span>\n } @else {\n <span class=\"material-icons\"> insert_drive_file </span>\n }\n</ng-template>","// form-field-wrapper.component.ts\nimport { CommonModule } from '@angular/common';\nimport { Component, ContentChild, Input, AfterContentInit, OnDestroy } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { MessageModule } from 'primeng/message';\n\n@Component({\n\tselector: 'ngp-form-field-wrapper',\n\tstandalone: true,\n\timports: [CommonModule, MessageModule],\n\ttemplateUrl: './form-field-wrapper.component.html',\n\tstyleUrls: ['./form-field-wrapper.component.scss']\n})\nexport class FormFieldWrapperComponent implements AfterContentInit, OnDestroy {\n\t@Input() validationMessages: { [key: string]: string } = {\n\t\trequired: 'This field is required',\n\t\temail: 'Please enter a valid email',\n\t\tminlength: 'Input does not meet minimum length',\n\t\tmaxlength: 'Input exceeds maximum length',\n\t\tpattern: 'Input format is invalid',\n\t\tendTimeBeforeStartTime: 'End time must not be before start time',\n\t\tbreakStartBeforeEarliestStart: 'Break start time cannot be before the earliest start time'\n\t};\n\n\t@ContentChild(NgControl) control?: NgControl;\n\n\tprivate subscription?: Subscription;\n\n\tngAfterContentInit(): void {\n\t\tif (this.control) {\n\t\t\tthis.subscription = this.control.statusChanges?.subscribe(() => { });\n\t\t}\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.subscription?.unsubscribe();\n\t}\n\n\tshouldShowError(): boolean {\n\t\treturn (\n\t\t\t!!this.control &&\n\t\t\tthis.control.invalid === true &&\n\t\t\t(this.control.dirty === true || this.control.touched === true)\n\t\t);\n\t}\n\n\tgetErrorMessage(): string {\n\t\tif (!this.control?.errors) {\n\t\t\treturn '';\n\t\t}\n\n\t\tconst firstErrorKey = Object.keys(this.control.errors)[0];\n\t\tconst error = this.control.errors[firstErrorKey];\n\n\t\tif (this.control.errors['message']) {\n\t\t\treturn this.control.errors['message'];\n\t\t}\n\t\tif (error?.message) {\n\t\t\treturn error.message;\n\t\t}\n\n\t\treturn this.validationMessages[firstErrorKey] || `Invalid input: ${firstErrorKey}`;\n\t}\n}\n","<div class=\"form-field-container\">\n <ng-content></ng-content>\n @if (shouldShowError()) {\n <p-message severity=\"error\" variant=\"simple\" size=\"small\" [text]=\"getErrorMessage()\">\n </p-message>\n }\n</div>","// export * from './lib/components/components';\nexport * from './lib/components/empty/empty.component'\nexport * from './lib/components/file-upload/file-upload.component'\nexport * from './lib/components/form-field-wrapper/form-field-wrapper.component'","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;MAQa,cAAc,CAAA;AAC1B,IAAA,KAAK,GAAG,KAAK,CAAS,mBAAmB,iDAAC;AAC1C,IAAA,OAAO,GAAG,KAAK,CAAS,oBAAoB,mDAAC;IAC7C,MAAM,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,QAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;wGAHZ,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,cAAc,kcCR3B,gnBAiBM,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FDTO,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,WACZ,EAAE,EAAA,QAAA,EAAA,gnBAAA,EAAA;;;MEWC,mBAAmB,CAAA;AACJ,IAAA,YAAY;;AAGvC,IAAA,KAAK,GAAG,K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AA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,yBAAyB,6KAWvB,SAAS,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECzBxB,8NAMM,EAAA,MAAA,EAAA,CAAA,mkBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDIK,YAAY,8BAAE,aAAa,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAAA,IAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,OAAA,EAAA,YAAA,EAAA,UAAA,EAAA,MAAA,EAAA,WAAA,EAAA,MAAA,EAAA,uBAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAIzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAPrC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,wBAAwB,cACtB,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,8NAAA,EAAA,MAAA,EAAA,CAAA,mkBAAA,CAAA,EAAA;;sBAKrC;;sBAUA,YAAY;uBAAC,SAAS;;;AEzBxB;;ACAA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"winexist-ngp.mjs","sources":["../../../packages/src/lib/components/empty/empty.component.ts","../../../packages/src/lib/components/empty/empty.component.html","../../../packages/src/lib/components/file-upload/file-upload.component.ts","../../../packages/src/lib/components/file-upload/file-upload.component.html","../../../packages/src/lib/components/form-field-wrapper/form-field-wrapper.component.ts","../../../packages/src/lib/components/form-field-wrapper/form-field-wrapper.component.html","../../../packages/src/lib/components/select/ng-select/basic/basic-ng-select.component.ts","../../../packages/src/lib/components/select/ng-select/basic/basic-ng-select.component.html","../../../packages/src/index.ts","../../../packages/src/winexist-ngp.ts"],"sourcesContent":["import { Component, input } from '@angular/core';\n\n@Component({\n\tselector: 'ngp-empty',\n\timports: [],\n\ttemplateUrl: './empty.component.html',\n\tstyleUrl: './empty.component.css'\n})\nexport class EmptyComponent {\n\ttitle = input<string>('Section is empty.');\n\tmessage = input<string>('No data available.');\n\timgSrc = input<string>();\n\n}\n","<div class=\"w-full flex justify-center items-center p-5 h-full\">\n <div class=\"flex items-center gap-3\">\n @if (imgSrc()) {\n <img alt=\"Empty\" [src]=\"imgSrc()\" class=\"w-[80px]\" />\n } @else {\n <div class=\"!rounded-md p-5 !bg-slate-100 mb-6\">\n <span class=\"material-icons !text-gray-400 !text-7xl\"> search_off </span>\n </div>\n }\n\n <div class=\"flex flex-col\">\n <span class=\"!text-gray-900 !text-2xl !font-bold\">{{ title() }}</span>\n @if (message()) {\n <span class=\"!text-gray-400 !text-base\">{{ message() }}</span>\n }\n </div>\n </div>\n</div>","import { CommonModule } from '@angular/common';\nimport { Component, effect, ElementRef, input, output, signal, ViewChild } from '@angular/core';\nimport { FileSelectEvent, FileUploadModule } from 'primeng/fileupload';\n\n// Add interface for typed files\ninterface TypedFile extends File {\n\tfileType?: 'image' | 'pdf' | 'other';\n}\n\n@Component({\n\tselector: 'ngp-file-upload',\n\timports: [FileUploadModule, CommonModule],\n\ttemplateUrl: './file-upload.component.html',\n\tstyleUrl: './file-upload.component.css',\n})\nexport class FileUploadComponent {\n\t@ViewChild('fileUploader') fileUploader!: ElementRef;\n\n\t// Signal-based inputs with defaults\n\tfiles = input<File[]>([]);\n\tmultiple = input(true);\n\taccept = input('.pdf,.png,.jpg,.jpeg,.doc,.docx,.csv,.xls,.xlsx');\n\tmaxFileSize = input(2097152); // 2MB in bytes\n\tplaceholder = input('Drag and drop new files here to upload.');\n\tshowUploadButton = input<boolean>(false);\n\tcancelLabel = input('Clear');\n\n\t// Signal-based outputs\n\tfilesSelected = output<File[]>();\n\tfilesCleared = output<void>();\n\n\t// Internal state\n\tuploadedFiles = signal<TypedFile[]>([]);\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst _files = this.files();\n\t\t\tif (_files.length) {\n\t\t\t\tthis.uploadedFiles.set(_files.map((file) => this.addFileType(file)));\n\t\t\t}\n\t\t});\n\t}\n\n\tonFileSelect(event: FileSelectEvent) {\n\t\tconst validFiles = event.currentFiles.filter(\n\t\t\t(file) => file.size <= this.maxFileSize() && this.isValidFileType(file)\n\t\t);\n\n\t\tif (validFiles.length) {\n\t\t\t// Add type to files before adding to uploadedFiles\n\t\t\tconst typedFiles = validFiles.map((file) => this.addFileType(file));\n\n\t\t\tif (this.multiple()) {\n\t\t\t\tthis.uploadedFiles.update((files) => Array.from(new Set([...files, ...typedFiles])));\n\t\t\t} else {\n\t\t\t\tthis.uploadedFiles.set(typedFiles);\n\t\t\t}\n\t\t\tthis.filesSelected.emit(typedFiles);\n\t\t}\n\t}\n\n\tonClear() {\n\t\tthis.uploadedFiles.set([]);\n\t\tthis.filesCleared.emit();\n\t}\n\n\tremoveFile(index: number) {\n\t\tthis.uploadedFiles.update((files) => files.filter((_, i) => i !== index));\n\t\tthis.filesSelected.emit(this.uploadedFiles());\n\t}\n\n\tisValidFileType(file: File): boolean {\n\t\tconst acceptedTypes = this.accept().split(',');\n\t\treturn acceptedTypes.some((type) =>\n\t\t\tfile.name.toLowerCase().endsWith(type.trim().toLowerCase())\n\t\t);\n\t}\n\n\tformatFileSize(bytes: number): string {\n\t\tif (bytes === 0) return '0 Bytes';\n\t\tconst k = 1024;\n\t\tconst sizes = ['Bytes', 'KB', 'MB', 'GB'];\n\t\tconst i = Math.floor(Math.log(bytes) / Math.log(k));\n\t\treturn parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];\n\t}\n\n\tclear() {\n\t\tthis.uploadedFiles.set([]);\n\t\tif (this.fileUploader?.nativeElement?.clear) {\n\t\t\tthis.fileUploader.nativeElement.clear();\n\t\t}\n\t}\n\n\t// Function to determine file type based on extension\n\tgetFileTypeByExtension(file: File): 'image' | 'pdf' | 'other' {\n\t\tconst fileName = file.name.toLowerCase();\n\t\tconst imageExtensions = ['.png', '.jpg', '.jpeg', '.gif', '.bmp', '.svg', '.webp'];\n\t\tconst pdfExtension = '.pdf';\n\n\t\tif (imageExtensions.some((ext) => fileName.endsWith(ext))) {\n\t\t\treturn 'image';\n\t\t} else if (fileName.endsWith(pdfExtension)) {\n\t\t\treturn 'pdf';\n\t\t} else {\n\t\t\treturn 'other';\n\t\t}\n\t}\n\n\t// Function to add type property to file\n\taddFileType(file: File): TypedFile {\n\t\tconst typedFile = file as TypedFile;\n\t\ttypedFile.fileType = this.getFileTypeByExtension(file);\n\t\treturn typedFile;\n\t}\n}\n","<p-fileupload #fileUploader [multiple]=\"multiple()\" [showUploadButton]=\"showUploadButton()\"\n [cancelLabel]=\"cancelLabel()\" [accept]=\"accept()\" auto=\"false\" [maxFileSize]=\"maxFileSize()\" mode=\"advanced\"\n [customUpload]=\"true\" styleClass=\"!bg-gray-50\" (onSelect)=\"onFileSelect($event)\" (onClear)=\"onClear()\">\n <ng-template #content>\n @if (uploadedFiles().length) {\n <ul class=\"space-y-2\">\n @for (file of uploadedFiles(); track $index) {\n <li class=\"flex justify-between gap-4 p-2 bg-gray-100 rounded\">\n <div class=\"flex gap-2\">\n <ng-container [ngTemplateOutlet]=\"iconTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: file.fileType }\"></ng-container>\n <span class=\"text-sm\"> {{ file.name }} - {{ formatFileSize(file.size) }} </span>\n </div>\n <button type=\"button\" (click)=\"removeFile($index)\" class=\"text-red-500 hover:text-red-700 text-sm\">\n <span class=\"material-icons !text-base\"> cancel </span>\n </button>\n </li>\n }\n </ul>\n } @else {\n <div class=\"flex flex-col items-center gap-3\">\n <img src=\"assets/images/file-upload.svg\" alt=\"File Upload\" class=\"w-28 mx-auto\" />\n <span class=\"font-semibold text-center text-gray-400 text-sm\">\n Drag & drop or<br />\n click the \"Choose\" button to add new files\n </span>\n </div>\n }\n </ng-template>\n <ng-template #file></ng-template>\n</p-fileupload>\n\n<ng-template #iconTemplate let-type>\n @if (type === 'image') {\n <span class=\"material-icons\"> image </span>\n } @else if (type === 'pdf') {\n <span class=\"material-icons\"> picture_as_pdf </span>\n } @else {\n <span class=\"material-icons\"> insert_drive_file </span>\n }\n</ng-template>","// form-field-wrapper.component.ts\nimport { CommonModule } from '@angular/common';\nimport { Component, ContentChild, Input, AfterContentInit, OnDestroy } from '@angular/core';\nimport { NgControl } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { MessageModule } from 'primeng/message';\n\n@Component({\n\tselector: 'ngp-form-field-wrapper',\n\tstandalone: true,\n\timports: [CommonModule, MessageModule],\n\ttemplateUrl: './form-field-wrapper.component.html',\n\tstyleUrls: ['./form-field-wrapper.component.scss']\n})\nexport class FormFieldWrapperComponent implements AfterContentInit, OnDestroy {\n\t@Input() validationMessages: { [key: string]: string } = {\n\t\trequired: 'This field is required',\n\t\temail: 'Please enter a valid email',\n\t\tminlength: 'Input does not meet minimum length',\n\t\tmaxlength: 'Input exceeds maximum length',\n\t\tpattern: 'Input format is invalid',\n\t\tendTimeBeforeStartTime: 'End time must not be before start time',\n\t\tbreakStartBeforeEarliestStart: 'Break start time cannot be before the earliest start time'\n\t};\n\n\t@ContentChild(NgControl) control?: NgControl;\n\n\tprivate subscription?: Subscription;\n\n\tngAfterContentInit(): void {\n\t\tif (this.control) {\n\t\t\tthis.subscription = this.control.statusChanges?.subscribe(() => { });\n\t\t}\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis.subscription?.unsubscribe();\n\t}\n\n\tshouldShowError(): boolean {\n\t\treturn (\n\t\t\t!!this.control &&\n\t\t\tthis.control.invalid === true &&\n\t\t\t(this.control.dirty === true || this.control.touched === true)\n\t\t);\n\t}\n\n\tgetErrorMessage(): string {\n\t\tif (!this.control?.errors) {\n\t\t\treturn '';\n\t\t}\n\n\t\tconst firstErrorKey = Object.keys(this.control.errors)[0];\n\t\tconst error = this.control.errors[firstErrorKey];\n\n\t\tif (this.control.errors['message']) {\n\t\t\treturn this.control.errors['message'];\n\t\t}\n\t\tif (error?.message) {\n\t\t\treturn error.message;\n\t\t}\n\n\t\treturn this.validationMessages[firstErrorKey] || `Invalid input: ${firstErrorKey}`;\n\t}\n}\n","<div class=\"form-field-container\">\n <ng-content></ng-content>\n @if (shouldShowError()) {\n <p-message severity=\"error\" variant=\"simple\" size=\"small\" [text]=\"getErrorMessage()\">\n </p-message>\n }\n</div>","import { CommonModule } from '@angular/common';\nimport { Component, forwardRef, input } from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { NgSelectModule } from '@ng-select/ng-select';\nimport { FormFieldWrapperComponent } from '../../../form-field-wrapper/form-field-wrapper.component';\nimport { FloatLabelModule } from 'primeng/floatlabel'\nimport { ProgressSpinnerModule } from 'primeng/progressspinner'\n\ntype SelectValue<T> = T | T[];\ntype SelectValueOrNull<T> = SelectValue<T> | null;\n\n@Component({\n\tselector: 'ngp-basic-select',\n\timports: [NgSelectModule, FormsModule, CommonModule, FormFieldWrapperComponent, FloatLabelModule, ProgressSpinnerModule],\n\ttemplateUrl: './basic-ng-select.component.html',\n\tstyleUrl: './basic-ng-select.component.scss',\n\tproviders: [\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: forwardRef(() => BasicNgSelectComponent),\n\t\t\tmulti: true\n\t\t}\n\t]\n})\nexport class BasicNgSelectComponent<T = any> implements ControlValueAccessor {\n\toptions = input<T[]>([]);\n\tbindLabel = input<string>('');\n\tbindValue = input<string>('');\n\tplaceholder = input<string>('Select an option');\n\tclearable = input<boolean>(true);\n\tsearchable = input<boolean>(true);\n\tloading = input<boolean>(false);\n\tlabel = input<string | null>(null);\n\trequired = input<boolean>(true);\n\n\t// Internal state\n\tvalue: SelectValueOrNull<T> = null;\n\tdisabled = false;\n\n\t// ControlValueAccessor callbacks\n\tprivate onChange: (value: SelectValueOrNull<T>) => void = () => { };\n\tonTouched: () => void = () => { };\n\n\t// Handle value changes from ng-select\n\tonValueChange(value: SelectValueOrNull<T>): void {\n\t\tthis.value = value;\n\t\tthis.onChange(value);\n\t}\n\n\twriteValue(val: SelectValueOrNull<T>): void {\n\t\tthis.value = val;\n\t}\n\n\tregisterOnChange(fn: (val: SelectValueOrNull<T>) => void): void {\n\t\tthis.onChange = fn;\n\t}\n\n\tregisterOnTouched(fn: () => void): void {\n\t\tthis.onTouched = fn;\n\t}\n\n\tsetDisabledState?(isDisabled: boolean): void {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\t// Compare function for ng-select\n\tcompareWith = (item: any, selected: any) => {\n\t\tconst bindValueKey = this.bindValue();\n\n\t\t// If no bindValue is set, compare entire objects\n\t\tif (!bindValueKey) {\n\t\t\treturn item === selected;\n\t\t}\n\n\t\t// Handle null/undefined cases\n\t\tif (!item || !selected) {\n\t\t\treturn item === selected;\n\t\t}\n\n\t\t// If selected is a primitive (just the id), compare with item's property\n\t\tif (typeof selected !== 'object') {\n\t\t\treturn item[bindValueKey] === selected;\n\t\t}\n\n\t\t// If both are objects, compare the bindValue property\n\t\treturn item[bindValueKey] === selected[bindValueKey];\n\t};\n}\n","<ngp-form-field-wrapper>\n <p-floatlabel variant=\"in\">\n <ng-select [(ngModel)]=\"value\" [bindLabel]=\"bindLabel()\" [bindValue]=\"bindValue()\" [items]=\"options()\"\n [compareWith]=\"compareWith\" [clearable]=\"clearable()\" (change)=\"onValueChange($event)\">\n <ng-template ng-loadingspinner-tmp>\n <ng-container [ngTemplateOutlet]=\"spinner\" />\n </ng-template>\n </ng-select>\n\n @if (label()) {\n <label class=\"block mb-2\" [ngClass]=\"{'required-label': required() }\">{{ label() }}</label>\n }\n </p-floatlabel>\n</ngp-form-field-wrapper>\n\n<ng-template #spinner>\n <p-progress-spinner ariaLabel=\"loading\" styleClass=\"text-gray-400\" />\n</ng-template>","// export * from './lib/components/components';\nexport * from './lib/components/empty/empty.component'\nexport * from './lib/components/file-upload/file-upload.component'\nexport * from './lib/components/form-field-wrapper/form-field-wrapper.component'\nexport * from './lib/components/select/ng-select/basic/basic-ng-select.component'","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2","i1"],"mappings":";;;;;;;;;;;;;;;;;MAQa,cAAc,CAAA;AAC1B,IAAA,KAAK,GAAG,KAAK,CAAS,mBAAmB,iDAAC;AAC1C,IAAA,OAAO,GAAG,KAAK,CAAS,oBAAoB,mDAAC;IAC7C,MAAM,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,QAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;wGAHZ,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,cAAc,kcCR3B,gnBAiBM,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FDTO,cAAc,EAAA,UAAA,EAAA,CAAA;kBAN1B,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,WACZ,EAAE,EAAA,QAAA,EAAA,gnBAAA,EAAA;;;MEWC,mBAAmB,CAAA;AACJ,IAAA,YAAY;;AAGvC,IAAA,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC;AACzB,IAAA,QAAQ,GAAG,KAAK,CAAC,IAAI,oDAAC;AACtB,IAAA,MAAM,GAAG,KAAK,CAAC,iDAAiD,kDAAC;AACjE,IAAA,WAAW,GAAG,KAAK,CAAC,OAAO,EAAA,IAAA,SAAA,GAAA,CAAA,E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A,EAAA,WAAA,EAAA,IAAA,EAAE,yBAAyB,EAAA,QAAA,EAAA,wBAAA,EAAA,MAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,gBAAgB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,qBAAqB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,0DAAA,EAAA,MAAA,EAAA,CAAA,YAAA,EAAA,aAAA,EAAA,MAAA,EAAA,mBAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAW3G,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAblC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,EAAA,OAAA,EACnB,CAAC,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,qBAAqB,CAAC,EAAA,SAAA,EAG7G;AACV,wBAAA;AACC,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,4BAA4B,CAAC;AACrD,4BAAA,KAAK,EAAE;AACP;AACD,qBAAA,EAAA,QAAA,EAAA,wsBAAA,EAAA;;;AEtBF;;ACAA;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { ElementRef, AfterContentInit, OnDestroy } from '@angular/core';
|
|
3
3
|
import { FileSelectEvent } from 'primeng/fileupload';
|
|
4
|
-
import { NgControl } from '@angular/forms';
|
|
4
|
+
import { NgControl, ControlValueAccessor } from '@angular/forms';
|
|
5
5
|
|
|
6
6
|
declare class EmptyComponent {
|
|
7
7
|
title: _angular_core.InputSignal<string>;
|
|
@@ -53,4 +53,30 @@ declare class FormFieldWrapperComponent implements AfterContentInit, OnDestroy {
|
|
|
53
53
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormFieldWrapperComponent, "ngp-form-field-wrapper", never, { "validationMessages": { "alias": "validationMessages"; "required": false; }; }, {}, ["control"], ["*"], true, never>;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
type SelectValue<T> = T | T[];
|
|
57
|
+
type SelectValueOrNull<T> = SelectValue<T> | null;
|
|
58
|
+
declare class BasicNgSelectComponent<T = any> implements ControlValueAccessor {
|
|
59
|
+
options: _angular_core.InputSignal<T[]>;
|
|
60
|
+
bindLabel: _angular_core.InputSignal<string>;
|
|
61
|
+
bindValue: _angular_core.InputSignal<string>;
|
|
62
|
+
placeholder: _angular_core.InputSignal<string>;
|
|
63
|
+
clearable: _angular_core.InputSignal<boolean>;
|
|
64
|
+
searchable: _angular_core.InputSignal<boolean>;
|
|
65
|
+
loading: _angular_core.InputSignal<boolean>;
|
|
66
|
+
label: _angular_core.InputSignal<string | null>;
|
|
67
|
+
required: _angular_core.InputSignal<boolean>;
|
|
68
|
+
value: SelectValueOrNull<T>;
|
|
69
|
+
disabled: boolean;
|
|
70
|
+
private onChange;
|
|
71
|
+
onTouched: () => void;
|
|
72
|
+
onValueChange(value: SelectValueOrNull<T>): void;
|
|
73
|
+
writeValue(val: SelectValueOrNull<T>): void;
|
|
74
|
+
registerOnChange(fn: (val: SelectValueOrNull<T>) => void): void;
|
|
75
|
+
registerOnTouched(fn: () => void): void;
|
|
76
|
+
setDisabledState?(isDisabled: boolean): void;
|
|
77
|
+
compareWith: (item: any, selected: any) => boolean;
|
|
78
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BasicNgSelectComponent<any>, never>;
|
|
79
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BasicNgSelectComponent<any>, "ngp-basic-select", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "bindLabel": { "alias": "bindLabel"; "required": false; "isSignal": true; }; "bindValue": { "alias": "bindValue"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export { BasicNgSelectComponent, EmptyComponent, FileUploadComponent, FormFieldWrapperComponent };
|