@updevs/components 1.0.0-alpha.18 → 1.0.0-alpha.19
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/esm2022/dropdown/dropdown.component.mjs +1 -1
- package/esm2022/form/components/dynamic-field/dynamic-field.component.mjs +18 -3
- package/esm2022/form/form.component.mjs +26 -6
- package/esm2022/form/models/file-upload-field.model.mjs +2 -0
- package/esm2022/form/models/form-config.mjs +2 -0
- package/esm2022/form/models/public-api.mjs +9 -1
- package/esm2022/form/upd-form.module.mjs +8 -4
- package/esm2022/form-controls/abstractions/base-control.mjs +8 -2
- package/esm2022/form-controls/checkbox/checkbox.component.mjs +2 -4
- package/esm2022/form-controls/date-picker/date-picker.component.mjs +1 -1
- package/esm2022/form-controls/file-upload/assets/i18n/en.json +15 -0
- package/esm2022/form-controls/file-upload/assets/i18n/pt.json +15 -0
- package/esm2022/form-controls/file-upload/file-upload-changed.event.mjs +2 -0
- package/esm2022/form-controls/file-upload/file-upload.component.mjs +169 -0
- package/esm2022/form-controls/file-upload/index.mjs +2 -0
- package/esm2022/form-controls/file-upload/public-api.mjs +4 -0
- package/esm2022/form-controls/file-upload/upd-file-upload.module.mjs +47 -0
- package/esm2022/form-controls/file-upload/updevs-components-form-controls-file-upload.mjs +5 -0
- package/esm2022/form-controls/input/input.component.mjs +5 -15
- package/esm2022/form-controls/radio/radio.component.mjs +3 -8
- package/esm2022/form-controls/select/components/multiple/select-multiple.component.mjs +1 -1
- package/esm2022/form-controls/select/components/single/select.component.mjs +1 -1
- package/esm2022/form-controls/select/models/abstractions/base-select.component.mjs +2 -8
- package/esm2022/form-controls/textarea/textarea.component.mjs +2 -4
- package/esm2022/form-controls/time-picker/time-picker.component.mjs +1 -1
- package/esm2022/list/list.component.mjs +1 -1
- package/esm2022/table/components/filter-row/filter-row.component.mjs +1 -1
- package/esm2022/table/components/search-section/search-section.component.mjs +1 -1
- package/esm2022/table/table.component.mjs +1 -1
- package/fesm2022/updevs-components-dropdown.mjs +1 -1
- package/fesm2022/updevs-components-dropdown.mjs.map +1 -1
- package/fesm2022/updevs-components-form-controls-abstractions.mjs +7 -1
- package/fesm2022/updevs-components-form-controls-abstractions.mjs.map +1 -1
- package/fesm2022/updevs-components-form-controls-checkbox.mjs +1 -3
- package/fesm2022/updevs-components-form-controls-checkbox.mjs.map +1 -1
- package/fesm2022/updevs-components-form-controls-date-picker.mjs +1 -1
- package/fesm2022/updevs-components-form-controls-date-picker.mjs.map +1 -1
- package/fesm2022/updevs-components-form-controls-file-upload.mjs +263 -0
- package/fesm2022/updevs-components-form-controls-file-upload.mjs.map +1 -0
- package/fesm2022/updevs-components-form-controls-input.mjs +4 -14
- package/fesm2022/updevs-components-form-controls-input.mjs.map +1 -1
- package/fesm2022/updevs-components-form-controls-radio.mjs +2 -7
- package/fesm2022/updevs-components-form-controls-radio.mjs.map +1 -1
- package/fesm2022/updevs-components-form-controls-select.mjs +3 -9
- package/fesm2022/updevs-components-form-controls-select.mjs.map +1 -1
- package/fesm2022/updevs-components-form-controls-textarea.mjs +1 -3
- package/fesm2022/updevs-components-form-controls-textarea.mjs.map +1 -1
- package/fesm2022/updevs-components-form-controls-time-picker.mjs +1 -1
- package/fesm2022/updevs-components-form-controls-time-picker.mjs.map +1 -1
- package/fesm2022/updevs-components-form.mjs +46 -8
- package/fesm2022/updevs-components-form.mjs.map +1 -1
- package/fesm2022/updevs-components-list.mjs +1 -1
- package/fesm2022/updevs-components-list.mjs.map +1 -1
- package/fesm2022/updevs-components-table.mjs +3 -3
- package/fesm2022/updevs-components-table.mjs.map +1 -1
- package/form/components/dynamic-field/dynamic-field.component.d.ts +5 -0
- package/form/form.component.d.ts +3 -3
- package/form/models/file-upload-field.model.d.ts +16 -0
- package/form/models/form-config.d.ts +2 -0
- package/form/models/public-api.d.ts +8 -0
- package/form/upd-form.module.d.ts +2 -1
- package/form-controls/abstractions/base-control.d.ts +15 -10
- package/form-controls/checkbox/checkbox.component.d.ts +1 -3
- package/form-controls/file-upload/file-upload-changed.event.d.ts +4 -0
- package/form-controls/file-upload/file-upload.component.d.ts +46 -0
- package/form-controls/file-upload/index.d.ts +1 -0
- package/form-controls/file-upload/public-api.d.ts +3 -0
- package/form-controls/file-upload/upd-file-upload.module.d.ts +14 -0
- package/form-controls/input/input.component.d.ts +2 -6
- package/form-controls/radio/radio.component.d.ts +1 -3
- package/form-controls/select/models/abstractions/base-select.component.d.ts +2 -8
- package/form-controls/textarea/textarea.component.d.ts +1 -3
- package/package.json +27 -20
|
@@ -9,10 +9,8 @@ export class TextareaComponent extends BaseControl {
|
|
|
9
9
|
this.value = model();
|
|
10
10
|
this.customClasses = input();
|
|
11
11
|
this.wrapperClasses = input();
|
|
12
|
-
this.name = input();
|
|
13
12
|
this.maxLength = input();
|
|
14
13
|
this.rows = input();
|
|
15
|
-
this.isDisabled = input(false);
|
|
16
14
|
this.displayCharactersCount = input(false);
|
|
17
15
|
this.classes = [];
|
|
18
16
|
}
|
|
@@ -34,7 +32,7 @@ export class TextareaComponent extends BaseControl {
|
|
|
34
32
|
this.classes = [...lClasses, ...(this.customClasses() || '').split(' ')];
|
|
35
33
|
}
|
|
36
34
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
37
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: TextareaComponent, selector: "upd-textarea", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, customClasses: { classPropertyName: "customClasses", publicName: "customClasses", isSignal: true, isRequired: false, transformFunction: null }, wrapperClasses: { classPropertyName: "wrapperClasses", publicName: "wrapperClasses", isSignal: true, isRequired: false, transformFunction: null },
|
|
35
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: TextareaComponent, selector: "upd-textarea", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, customClasses: { classPropertyName: "customClasses", publicName: "customClasses", isSignal: true, isRequired: false, transformFunction: null }, wrapperClasses: { classPropertyName: "wrapperClasses", publicName: "wrapperClasses", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: false, transformFunction: null }, displayCharactersCount: { classPropertyName: "displayCharactersCount", publicName: "displayCharactersCount", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class": "this.hostWrapperClasses" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if (!!labelText || displayCharactersCount()) {\n <label class=\"form-label\">\n {{ labelText }}\n @if (displayCharactersCount() && !!maxLength()) {\n <span class=\"form-label-description\">{{ value()?.length || 0 }}/{{ maxLength() }}</span>\n }\n </label>\n}\n\n<textarea [attr.maxlength]=\"maxLength()\" [disabled]=\"isDisabled()\" [ngClass]=\"classes\" [placeholder]=\"placeholderText\"\n [value]=\"value() || ''\" [attr.name]=\"name()\" [attr.readonly]=\"isDisabled() ? '' : undefined\" [attr.rows]=\"rows()\"\n (input)=\"updateValue($event)\">\n</textarea>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
38
36
|
}
|
|
39
37
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TextareaComponent, decorators: [{
|
|
40
38
|
type: Component,
|
|
@@ -43,4 +41,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImpor
|
|
|
43
41
|
type: HostBinding,
|
|
44
42
|
args: ['class']
|
|
45
43
|
}] } });
|
|
46
|
-
//# sourceMappingURL=data:application/json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5kZWZpbmVkXCIgW2F0dHIucm93c109XCJyb3dzKClcIlxuICAgIChpbnB1dCk9XCJ1cGRhdGVWYWx1ZSgkZXZlbnQpXCI+XG48L3RleHRhcmVhPlxuIl19
|
|
@@ -86,7 +86,7 @@ export class TimePickerComponent {
|
|
|
86
86
|
console.log('max w', this.maxWidth);
|
|
87
87
|
}
|
|
88
88
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TimePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
89
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: TimePickerComponent, selector: "upd-time-picker", inputs: { dropdownMaxHeight: "dropdownMaxHeight", showMask: "showMask", shouldSelectSeconds: "shouldSelectSeconds", shouldUse24hFormat: "shouldUse24hFormat", startingHour: "startingHour", endingHour: "endingHour", hourInterval: "hourInterval", startingMinute: "startingMinute", endingMinute: "endingMinute", minuteInterval: "minuteInterval", startingSecond: "startingSecond", endingSecond: "endingSecond", secondInterval: "secondInterval", customHours: "customHours", customMinutes: "customMinutes", customSeconds: "customSeconds" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: "<upd-input #input [mask]=\"inputMask\" [maskConfig]=\"{showMaskTyped:showMask}\" [isInputGroupFlat]=\"true\">\n <ng-template updInputAppend>\n <upd-button [shouldIgnoreBtnClass]=\"true\" (clicked)=\"openDropdown()\" customClasses=\"link-secondary ms-2\">\n <upd-icon tablerIcon=\"calendar-time\"></upd-icon>\n </upd-button>\n </ng-template>\n</upd-input>\n<upd-dropdown [isOpen]=\"isDropdownOpen\" [dropdownReference]=\"inputRef\" [maxHeight]=\"dropdownMaxHeight\" [maxWidth]=\"maxWidth\"\n wrapperClasses=\"overflow-x-hidden\">\n <div class=\"time-options-wrapper\" [style.max-width.px]=\"maxWidth\">\n <upd-time-selector [shouldSelectSeconds]=\"shouldSelectSeconds\" [shouldUse24hFormat]=\"shouldUse24hFormat\"\n [startingHour]=\"startingHour\" [endingHour]=\"endingHour\" [hourInterval]=\"hourInterval\"\n [startingMinute]=\"startingMinute\" [endingMinute]=\"endingMinute\" [minuteInterval]=\"minuteInterval\"\n [startingSecond]=\"startingSecond\" [endingSecond]=\"endingSecond\" [secondInterval]=\"secondInterval\"\n [customHours]=\"customHours\" [customMinutes]=\"customMinutes\" [customSeconds]=\"customSeconds\"></upd-time-selector>\n </div>\n</upd-dropdown>\n", styles: [".time-options-wrapper{padding:10px 20px 15px;width:100%;border-radius:6px;font-size:25px;font-weight:500;text-align:center;-webkit-user-select:none;user-select:none}\n"], dependencies: [{ kind: "component", type: i1.InputComponent, selector: "upd-input", inputs: ["type", "mask", "maskConfig", "value", "size", "customClasses", "wrapperClasses", "
|
|
89
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: TimePickerComponent, selector: "upd-time-picker", inputs: { dropdownMaxHeight: "dropdownMaxHeight", showMask: "showMask", shouldSelectSeconds: "shouldSelectSeconds", shouldUse24hFormat: "shouldUse24hFormat", startingHour: "startingHour", endingHour: "endingHour", hourInterval: "hourInterval", startingMinute: "startingMinute", endingMinute: "endingMinute", minuteInterval: "minuteInterval", startingSecond: "startingSecond", endingSecond: "endingSecond", secondInterval: "secondInterval", customHours: "customHours", customMinutes: "customMinutes", customSeconds: "customSeconds" }, viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: "<upd-input #input [mask]=\"inputMask\" [maskConfig]=\"{showMaskTyped:showMask}\" [isInputGroupFlat]=\"true\">\n <ng-template updInputAppend>\n <upd-button [shouldIgnoreBtnClass]=\"true\" (clicked)=\"openDropdown()\" customClasses=\"link-secondary ms-2\">\n <upd-icon tablerIcon=\"calendar-time\"></upd-icon>\n </upd-button>\n </ng-template>\n</upd-input>\n<upd-dropdown [isOpen]=\"isDropdownOpen\" [dropdownReference]=\"inputRef\" [maxHeight]=\"dropdownMaxHeight\" [maxWidth]=\"maxWidth\"\n wrapperClasses=\"overflow-x-hidden\">\n <div class=\"time-options-wrapper\" [style.max-width.px]=\"maxWidth\">\n <upd-time-selector [shouldSelectSeconds]=\"shouldSelectSeconds\" [shouldUse24hFormat]=\"shouldUse24hFormat\"\n [startingHour]=\"startingHour\" [endingHour]=\"endingHour\" [hourInterval]=\"hourInterval\"\n [startingMinute]=\"startingMinute\" [endingMinute]=\"endingMinute\" [minuteInterval]=\"minuteInterval\"\n [startingSecond]=\"startingSecond\" [endingSecond]=\"endingSecond\" [secondInterval]=\"secondInterval\"\n [customHours]=\"customHours\" [customMinutes]=\"customMinutes\" [customSeconds]=\"customSeconds\"></upd-time-selector>\n </div>\n</upd-dropdown>\n", styles: [".time-options-wrapper{padding:10px 20px 15px;width:100%;border-radius:6px;font-size:25px;font-weight:500;text-align:center;-webkit-user-select:none;user-select:none}\n"], dependencies: [{ kind: "component", type: i1.InputComponent, selector: "upd-input", inputs: ["type", "mask", "maskConfig", "value", "size", "customClasses", "wrapperClasses", "maxLength", "isPlainText", "isReadOnly", "isLoading", "isRound", "isFlush", "isInputGroupFlat", "isPrependButton", "isAppendButton", "isFloating", "loaderPosition", "prependIconModel", "appendIconModel", "isValidationStatusLight", "layout"], outputs: ["valueChange", "blurred", "keyDown", "keyDownEsc", "keyUpEnter"] }, { kind: "directive", type: i1.InputAppendDirective, selector: "ng-template[updInputAppend]" }, { kind: "component", type: i2.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "component", type: i3.ButtonComponent, selector: "upd-button", inputs: ["model", "text", "brandColorStyle", "customClasses", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "isLink", "shouldIgnoreBtnClass", "iconModel", "iconPosition", "isDisabled", "isActive", "badgeConfig", "colorStyle", "size", "title"], outputs: ["clicked"] }, { kind: "component", type: i4.DropdownComponent, selector: "upd-dropdown", inputs: ["items", "header", "isOpen", "shouldCloseOnOutsideClick", "arrowType", "wrapperClasses", "elementsExcludedFromOutsideClick", "minHeight", "maxHeight", "minWidth", "maxWidth", "dropdownReference", "dropdownReferencePosition", "textOverflowStrategy"], outputs: ["isOpenChange", "selectedItem", "checkboxChanged"] }, { kind: "component", type: i5.TimeSelectorComponent, selector: "upd-time-selector", inputs: ["shouldSelectSeconds", "shouldUse24hFormat", "startingHour", "endingHour", "hourInterval", "startingMinute", "endingMinute", "minuteInterval", "startingSecond", "endingSecond", "secondInterval", "customHours", "customMinutes", "customSeconds"] }] }); }
|
|
90
90
|
}
|
|
91
91
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TimePickerComponent, decorators: [{
|
|
92
92
|
type: Component,
|
|
@@ -81,7 +81,7 @@ export class ListComponent {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
84
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: ListComponent, selector: "upd-list", inputs: { items: "items", shouldOverflow: "shouldOverflow", isFlush: "isFlush", isVisible: "isVisible", isHoverable: "isHoverable", shouldDisplayItemsCounter: "shouldDisplayItemsCounter", wrapperClasses: "wrapperClasses", maxHeight: "maxHeight" }, outputs: { checkboxChanged: "checkboxChanged", selectedItem: "selectedItem" }, host: { properties: { "class": "this.localWrapperClasses" } }, usesOnChanges: true, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.List'\">\n @for (item of listItems; track item) {\n @if ((item.children?.length || 0) > 0) {\n <div class=\"list-group-header sticky-top\">{{ item.text }}</div>\n @for (child of item.children; track child) {\n <ng-container [ngTemplateOutlet]=\"listItemTpl\" [ngTemplateOutletContext]=\"{item:child}\"></ng-container>\n }\n } @else {\n <ng-container [ngTemplateOutlet]=\"listItemTpl\" [ngTemplateOutletContext]=\"{item:item}\"></ng-container>\n }\n } @empty {\n <div class=\"list-group-item\">\n <upd-icon tablerIcon=\"alert-triangle\" wrapperClasses=\"text-yellow\"></upd-icon>\n {{ t('NoRecordsFound') }}\n </div>\n }\n\n @if (shouldDisplayItemsCounter && listItems.length > 0) {\n <div class=\"list-items-counter bg-muted text-muted-fg\">\n {{ listItems.length }} {{ t(listItems.length === 1 ? 'Item' : 'Items') }}\n </div>\n }\n</ng-container>\n\n<ng-template #listItemTpl let-item=\"item\">\n <div class=\"list-group-item\" [class.list-group-item-action]=\"!item.hasLeftBox\" [class.active]=\"item.isActive\"\n [class.disabled]=\"item.isDisabled\" (click)=\"onSelectItem($event, item)\">\n @if (!item.hasLeftBox) {\n <span>{{ item.text }}</span>\n } @else {\n <div class=\"row\">\n <ng-container [ngTemplateOutlet]=\"leftBoxTpl\" [ngTemplateOutletContext]=\"{item:item}\"></ng-container>\n <div class=\"col text-truncate\">\n @if (!!item.text) {\n <div class=\"text-body d-block\">{{ item.text }}</div>\n }\n @if (!!item.description) {\n <div class=\"text-muted text-truncate mt-n1\">{{ item.description }}</div>\n }\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n<ng-template #leftBoxTpl let-item=\"item\">\n <div class=\"col-auto\">\n @if (!!item.icon) {\n <upd-icon [model]=\"item.icon\"></upd-icon>\n } @else if (item.hasCheckbox) {\n <upd-checkbox (changed)=\"onCheckboxChange(item, $event)\" [isChecked]=\"item.isChecked || false\"\n [isSwitch]=\"item.isSwitch || false\"></upd-checkbox>\n <!-- [wrapperClasses]=\"'dropdown-item' + (item.isDisabled ? ' disabled' : '') +(item.isActive ? ' active' : '')\"-->\n\n } @else if (item.hasLeftBadge) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n } @else if (!!item.leftBoxImage || !!item.leftBoxText) {\n <a href=\"#\"> <!-- TODO: change. -->\n <span class=\"avatar\" style=\"background-image: url({{item.leftBoxImage}})\">{{ item.leftBoxText }}\n @if (item.hasBottomRightBadge) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n }\n </span>\n </a>\n }\n </div>\n</ng-template>\n", styles: ["upd-list{width:100%}.list-group-item{cursor:pointer}.list-hidden{display:none!important}.list-items-counter{position:sticky;bottom:0;right:0;float:right;border-top-left-radius:2px;opacity:.6;padding:2px 12px;margin-top:-24px}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: i3.CheckboxComponent, selector: "upd-checkbox", inputs: ["wrapperClasses", "value", "customClasses", "
|
|
84
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: ListComponent, selector: "upd-list", inputs: { items: "items", shouldOverflow: "shouldOverflow", isFlush: "isFlush", isVisible: "isVisible", isHoverable: "isHoverable", shouldDisplayItemsCounter: "shouldDisplayItemsCounter", wrapperClasses: "wrapperClasses", maxHeight: "maxHeight" }, outputs: { checkboxChanged: "checkboxChanged", selectedItem: "selectedItem" }, host: { properties: { "class": "this.localWrapperClasses" } }, usesOnChanges: true, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.List'\">\n @for (item of listItems; track item) {\n @if ((item.children?.length || 0) > 0) {\n <div class=\"list-group-header sticky-top\">{{ item.text }}</div>\n @for (child of item.children; track child) {\n <ng-container [ngTemplateOutlet]=\"listItemTpl\" [ngTemplateOutletContext]=\"{item:child}\"></ng-container>\n }\n } @else {\n <ng-container [ngTemplateOutlet]=\"listItemTpl\" [ngTemplateOutletContext]=\"{item:item}\"></ng-container>\n }\n } @empty {\n <div class=\"list-group-item\">\n <upd-icon tablerIcon=\"alert-triangle\" wrapperClasses=\"text-yellow\"></upd-icon>\n {{ t('NoRecordsFound') }}\n </div>\n }\n\n @if (shouldDisplayItemsCounter && listItems.length > 0) {\n <div class=\"list-items-counter bg-muted text-muted-fg\">\n {{ listItems.length }} {{ t(listItems.length === 1 ? 'Item' : 'Items') }}\n </div>\n }\n</ng-container>\n\n<ng-template #listItemTpl let-item=\"item\">\n <div class=\"list-group-item\" [class.list-group-item-action]=\"!item.hasLeftBox\" [class.active]=\"item.isActive\"\n [class.disabled]=\"item.isDisabled\" (click)=\"onSelectItem($event, item)\">\n @if (!item.hasLeftBox) {\n <span>{{ item.text }}</span>\n } @else {\n <div class=\"row\">\n <ng-container [ngTemplateOutlet]=\"leftBoxTpl\" [ngTemplateOutletContext]=\"{item:item}\"></ng-container>\n <div class=\"col text-truncate\">\n @if (!!item.text) {\n <div class=\"text-body d-block\">{{ item.text }}</div>\n }\n @if (!!item.description) {\n <div class=\"text-muted text-truncate mt-n1\">{{ item.description }}</div>\n }\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n<ng-template #leftBoxTpl let-item=\"item\">\n <div class=\"col-auto\">\n @if (!!item.icon) {\n <upd-icon [model]=\"item.icon\"></upd-icon>\n } @else if (item.hasCheckbox) {\n <upd-checkbox (changed)=\"onCheckboxChange(item, $event)\" [isChecked]=\"item.isChecked || false\"\n [isSwitch]=\"item.isSwitch || false\"></upd-checkbox>\n <!-- [wrapperClasses]=\"'dropdown-item' + (item.isDisabled ? ' disabled' : '') +(item.isActive ? ' active' : '')\"-->\n\n } @else if (item.hasLeftBadge) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n } @else if (!!item.leftBoxImage || !!item.leftBoxText) {\n <a href=\"#\"> <!-- TODO: change. -->\n <span class=\"avatar\" style=\"background-image: url({{item.leftBoxImage}})\">{{ item.leftBoxText }}\n @if (item.hasBottomRightBadge) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n }\n </span>\n </a>\n }\n </div>\n</ng-template>\n", styles: ["upd-list{width:100%}.list-group-item{cursor:pointer}.list-hidden{display:none!important}.list-items-counter{position:sticky;bottom:0;right:0;float:right;border-top-left-radius:2px;opacity:.6;padding:2px 12px;margin-top:-24px}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: i3.CheckboxComponent, selector: "upd-checkbox", inputs: ["wrapperClasses", "value", "customClasses", "isChecked", "isInline", "isSwitch", "isIndeterminate"], outputs: ["changed", "isCheckedChange", "isIndeterminateChange"] }, { kind: "component", type: i4.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
85
85
|
}
|
|
86
86
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ListComponent, decorators: [{
|
|
87
87
|
type: Component,
|
|
@@ -100,7 +100,7 @@ export class FilterRowComponent extends BaseComponent {
|
|
|
100
100
|
this.removed.emit();
|
|
101
101
|
}
|
|
102
102
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: FilterRowComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
103
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: FilterRowComponent, selector: "upd-filter-row", inputs: { activeFilters: { classPropertyName: "activeFilters", publicName: "activeFilters", isSignal: true, isRequired: true, transformFunction: null }, rowIndex: { classPropertyName: "rowIndex", publicName: "rowIndex", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: true, transformFunction: null }, store: { classPropertyName: "store", publicName: "store", isSignal: true, isRequired: false, transformFunction: null }, currentFilter: { classPropertyName: "currentFilter", publicName: "currentFilter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { removed: "removed", activeFilters: "activeFiltersChange" }, host: { properties: { "class": "this.wrapperClasses" } }, usesInheritance: true, ngImport: i0, template: "<upd-select class=\"w-100\" [isDisabled]=\"isDisabled()\" [items]=\"fieldsOptions()\" (selectedItem)=\"onSelectField($event)\"\n [selected]=\"selectedField\">\n</upd-select>\n<upd-select class=\"w-100\" [isDisabled]=\"isDisabled()\" [items]=\"comparisonOperatorOptions()\" (selectedItem)=\"onSelectOperand($event)\"\n [selected]=\"selectedOperand\">\n</upd-select>\n\n@if (isValueSectionEnabled()) {\n @switch (fieldType) {\n @case (DataTypeEnum.Number) {\n <upd-input wrapperClasses=\"w-100\" customClasses=\"h-100\" type=\"number\" (valueChange)=\"updateValue($event)\"\n [value]=\"selectedValue\"></upd-input>\n }\n @case (DataTypeEnum.Date) {\n\n }\n @default {\n <upd-input wrapperClasses=\"w-100\" customClasses=\"h-100\" type=\"text\" (valueChange)=\"updateValue($event)\"\n [value]=\"selectedValue\"></upd-input>\n }\n }\n} @else {\n <div class=\"w-100\">\n <input type=\"text\" class=\"form-control h-100\" disabled>\n </div>\n}\n\n<upd-button class=\"flex-shrink-1\" colorStyle=\"danger\" [isDisabled]=\"isDisabled()\" [isOutline]=\"true\" [isIcon]=\"true\"\n [iconModel]=\"{tablerIcon:'x'}\" (clicked)=\"removeFilterItem()\"></upd-button>\n", styles: [""], dependencies: [{ kind: "component", type: i1.ButtonComponent, selector: "upd-button", inputs: ["model", "text", "brandColorStyle", "customClasses", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "isLink", "shouldIgnoreBtnClass", "iconModel", "iconPosition", "isDisabled", "isActive", "badgeConfig", "colorStyle", "size", "title"], outputs: ["clicked"] }, { kind: "component", type: i2.InputComponent, selector: "upd-input", inputs: ["type", "mask", "maskConfig", "value", "size", "customClasses", "wrapperClasses", "
|
|
103
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: FilterRowComponent, selector: "upd-filter-row", inputs: { activeFilters: { classPropertyName: "activeFilters", publicName: "activeFilters", isSignal: true, isRequired: true, transformFunction: null }, rowIndex: { classPropertyName: "rowIndex", publicName: "rowIndex", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: true, transformFunction: null }, store: { classPropertyName: "store", publicName: "store", isSignal: true, isRequired: false, transformFunction: null }, currentFilter: { classPropertyName: "currentFilter", publicName: "currentFilter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { removed: "removed", activeFilters: "activeFiltersChange" }, host: { properties: { "class": "this.wrapperClasses" } }, usesInheritance: true, ngImport: i0, template: "<upd-select class=\"w-100\" [isDisabled]=\"isDisabled()\" [items]=\"fieldsOptions()\" (selectedItem)=\"onSelectField($event)\"\n [selected]=\"selectedField\">\n</upd-select>\n<upd-select class=\"w-100\" [isDisabled]=\"isDisabled()\" [items]=\"comparisonOperatorOptions()\" (selectedItem)=\"onSelectOperand($event)\"\n [selected]=\"selectedOperand\">\n</upd-select>\n\n@if (isValueSectionEnabled()) {\n @switch (fieldType) {\n @case (DataTypeEnum.Number) {\n <upd-input wrapperClasses=\"w-100\" customClasses=\"h-100\" type=\"number\" (valueChange)=\"updateValue($event)\"\n [value]=\"selectedValue\"></upd-input>\n }\n @case (DataTypeEnum.Date) {\n\n }\n @default {\n <upd-input wrapperClasses=\"w-100\" customClasses=\"h-100\" type=\"text\" (valueChange)=\"updateValue($event)\"\n [value]=\"selectedValue\"></upd-input>\n }\n }\n} @else {\n <div class=\"w-100\">\n <input type=\"text\" class=\"form-control h-100\" disabled>\n </div>\n}\n\n<upd-button class=\"flex-shrink-1\" colorStyle=\"danger\" [isDisabled]=\"isDisabled()\" [isOutline]=\"true\" [isIcon]=\"true\"\n [iconModel]=\"{tablerIcon:'x'}\" (clicked)=\"removeFilterItem()\"></upd-button>\n", styles: [""], dependencies: [{ kind: "component", type: i1.ButtonComponent, selector: "upd-button", inputs: ["model", "text", "brandColorStyle", "customClasses", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "isLink", "shouldIgnoreBtnClass", "iconModel", "iconPosition", "isDisabled", "isActive", "badgeConfig", "colorStyle", "size", "title"], outputs: ["clicked"] }, { kind: "component", type: i2.InputComponent, selector: "upd-input", inputs: ["type", "mask", "maskConfig", "value", "size", "customClasses", "wrapperClasses", "maxLength", "isPlainText", "isReadOnly", "isLoading", "isRound", "isFlush", "isInputGroupFlat", "isPrependButton", "isAppendButton", "isFloating", "loaderPosition", "prependIconModel", "appendIconModel", "isValidationStatusLight", "layout"], outputs: ["valueChange", "blurred", "keyDown", "keyDownEsc", "keyUpEnter"] }, { kind: "component", type: i3.SelectComponent, selector: "upd-select", inputs: ["useSystemStyle", "shouldShowClearButton", "isCompact", "selected"], outputs: ["selectedItem"] }] }); }
|
|
104
104
|
}
|
|
105
105
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: FilterRowComponent, decorators: [{
|
|
106
106
|
type: Component,
|
|
@@ -81,7 +81,7 @@ export class SearchSectionComponent extends BaseComponent {
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SearchSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
84
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: SearchSectionComponent, selector: "upd-search-section", inputs: { searchRequest: { classPropertyName: "searchRequest", publicName: "searchRequest", isSignal: true, isRequired: true, transformFunction: null }, hasChanges: { classPropertyName: "hasChanges", publicName: "hasChanges", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, isSearching: { classPropertyName: "isSearching", publicName: "isSearching", isSignal: true, isRequired: true, transformFunction: null }, searchRequestSubject: { classPropertyName: "searchRequestSubject", publicName: "searchRequestSubject", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, actionsTpl: { classPropertyName: "actionsTpl", publicName: "actionsTpl", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchRequest: "searchRequestChange", hasChanges: "hasChangesChange" }, host: { properties: { "class": "this.wrapperClass" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Table'\">\n @if (!!actionsTpl()) {\n <ng-template [ngTemplateOutlet]=\"actionsTpl()!\"></ng-template>\n }\n\n <div class=\"d-flex align-items-center gap-2\">\n <upd-input wrapperClasses=\"w-100\" [placeholder]=\"{text:'UpDevs.Table.Search', isTranslated:false}\" [isAppendButton]=\"true\"\n (valueChange)=\"searchSubject.next($event)\" [value]=\"searchRequest().description\">\n <ng-template updInputAppend>\n <upd-button [isIcon]=\"true\" [colorStyle]=\"filterSectionBtnColor()\" (clicked)=\"toggleFilterSection()\"\n [badgeConfig]=\"badgeConfig()\">\n <upd-icon [tablerIcon]=\"isFilterSectionOpen() ? 'filter-up' : 'filter-down'\" [tablerIconSize]=\"20\"></upd-icon>\n </upd-button>\n </ng-template>\n </upd-input>\n </div>\n\n @if (isFilterSectionOpen()) {\n @for (row of activeFilters(); track row; let i = $index) {\n <upd-filter-row [store]=\"config().store\" [currentFilter]=\"row\" [(activeFilters)]=\"activeFilters\" [columns]=\"columns()\"\n [rowIndex]=\"i\" (removed)=\"onRowRemoved()\" [isDisabled]=\"isSearching()\">\n </upd-filter-row>\n }\n\n <div class=\"ms-auto d-flex gap-2\">\n <upd-button customClasses=\"gap-2\" colorStyle=\"primary\" [isOutline]=\"true\" (clicked)=\"addEmptyFilterRow()\"\n [isDisabled]=\"!canPerformActions()\">\n <upd-icon tablerIcon=\"plus\" tablerIconWeight=\"bold\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('AddNewFilter') }}\n </upd-button>\n <upd-button customClasses=\"gap-2\" colorStyle=\"success\" [isDisabled]=\"!canPerformActions()\" (clicked)=\"search()\">\n <upd-icon tablerIcon=\"checks\" tablerIconWeight=\"bold\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('ApplyFilters') }}\n </upd-button>\n </div>\n }\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: i3.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "component", type: i4.ButtonComponent, selector: "upd-button", inputs: ["model", "text", "brandColorStyle", "customClasses", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "isLink", "shouldIgnoreBtnClass", "iconModel", "iconPosition", "isDisabled", "isActive", "badgeConfig", "colorStyle", "size", "title"], outputs: ["clicked"] }, { kind: "component", type: i5.InputComponent, selector: "upd-input", inputs: ["type", "mask", "maskConfig", "value", "size", "customClasses", "wrapperClasses", "
|
|
84
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: SearchSectionComponent, selector: "upd-search-section", inputs: { searchRequest: { classPropertyName: "searchRequest", publicName: "searchRequest", isSignal: true, isRequired: true, transformFunction: null }, hasChanges: { classPropertyName: "hasChanges", publicName: "hasChanges", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, isSearching: { classPropertyName: "isSearching", publicName: "isSearching", isSignal: true, isRequired: true, transformFunction: null }, searchRequestSubject: { classPropertyName: "searchRequestSubject", publicName: "searchRequestSubject", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, actionsTpl: { classPropertyName: "actionsTpl", publicName: "actionsTpl", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchRequest: "searchRequestChange", hasChanges: "hasChangesChange" }, host: { properties: { "class": "this.wrapperClass" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Table'\">\n @if (!!actionsTpl()) {\n <ng-template [ngTemplateOutlet]=\"actionsTpl()!\"></ng-template>\n }\n\n <div class=\"d-flex align-items-center gap-2\">\n <upd-input wrapperClasses=\"w-100\" [placeholder]=\"{text:'UpDevs.Table.Search', isTranslated:false}\" [isAppendButton]=\"true\"\n (valueChange)=\"searchSubject.next($event)\" [value]=\"searchRequest().description\">\n <ng-template updInputAppend>\n <upd-button [isIcon]=\"true\" [colorStyle]=\"filterSectionBtnColor()\" (clicked)=\"toggleFilterSection()\"\n [badgeConfig]=\"badgeConfig()\">\n <upd-icon [tablerIcon]=\"isFilterSectionOpen() ? 'filter-up' : 'filter-down'\" [tablerIconSize]=\"20\"></upd-icon>\n </upd-button>\n </ng-template>\n </upd-input>\n </div>\n\n @if (isFilterSectionOpen()) {\n @for (row of activeFilters(); track row; let i = $index) {\n <upd-filter-row [store]=\"config().store\" [currentFilter]=\"row\" [(activeFilters)]=\"activeFilters\" [columns]=\"columns()\"\n [rowIndex]=\"i\" (removed)=\"onRowRemoved()\" [isDisabled]=\"isSearching()\">\n </upd-filter-row>\n }\n\n <div class=\"ms-auto d-flex gap-2\">\n <upd-button customClasses=\"gap-2\" colorStyle=\"primary\" [isOutline]=\"true\" (clicked)=\"addEmptyFilterRow()\"\n [isDisabled]=\"!canPerformActions()\">\n <upd-icon tablerIcon=\"plus\" tablerIconWeight=\"bold\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('AddNewFilter') }}\n </upd-button>\n <upd-button customClasses=\"gap-2\" colorStyle=\"success\" [isDisabled]=\"!canPerformActions()\" (clicked)=\"search()\">\n <upd-icon tablerIcon=\"checks\" tablerIconWeight=\"bold\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('ApplyFilters') }}\n </upd-button>\n </div>\n }\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: i3.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "component", type: i4.ButtonComponent, selector: "upd-button", inputs: ["model", "text", "brandColorStyle", "customClasses", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "isLink", "shouldIgnoreBtnClass", "iconModel", "iconPosition", "isDisabled", "isActive", "badgeConfig", "colorStyle", "size", "title"], outputs: ["clicked"] }, { kind: "component", type: i5.InputComponent, selector: "upd-input", inputs: ["type", "mask", "maskConfig", "value", "size", "customClasses", "wrapperClasses", "maxLength", "isPlainText", "isReadOnly", "isLoading", "isRound", "isFlush", "isInputGroupFlat", "isPrependButton", "isAppendButton", "isFloating", "loaderPosition", "prependIconModel", "appendIconModel", "isValidationStatusLight", "layout"], outputs: ["valueChange", "blurred", "keyDown", "keyDownEsc", "keyUpEnter"] }, { kind: "directive", type: i5.InputAppendDirective, selector: "ng-template[updInputAppend]" }, { kind: "component", type: i6.FilterRowComponent, selector: "upd-filter-row", inputs: ["activeFilters", "rowIndex", "columns", "isDisabled", "store", "currentFilter"], outputs: ["removed", "activeFiltersChange"] }] }); }
|
|
85
85
|
}
|
|
86
86
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SearchSectionComponent, decorators: [{
|
|
87
87
|
type: Component,
|
|
@@ -373,7 +373,7 @@ export class TableComponent extends BaseComponent {
|
|
|
373
373
|
};
|
|
374
374
|
}
|
|
375
375
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
376
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: TableComponent, selector: "upd-table", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, searchRequest: { classPropertyName: "searchRequest", publicName: "searchRequest", isSignal: true, isRequired: false, transformFunction: null }, activeFilters: { classPropertyName: "activeFilters", publicName: "activeFilters", isSignal: true, isRequired: false, transformFunction: null }, currentPage: { classPropertyName: "currentPage", publicName: "currentPage", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { config: "configChange", searchRequest: "searchRequestChange", activeFilters: "activeFiltersChange", currentPage: "currentPageChange", pageSize: "pageSizeChange" }, viewQueries: [{ propertyName: "savedViewsRef", first: true, predicate: ["savedViewsBtn"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Table'\">\n <div class=\"card\">\n @if (!!configModel().title || !configModel().canSearch) {\n <div class=\"card-header\">\n @if (!!configModel().title) {\n <h3 class=\"card-title\">{{ textService.getText(configModel().title) }}</h3>\n }\n <ng-template [ngTemplateOutlet]=\"actionsTpl\"></ng-template>\n </div>\n }\n\n @if (configModel().canSearch) {\n <upd-search-section [actionsTpl]=\"!configModel().title ? actionsTpl : undefined\" [isSearching]=\"isSearching()\"\n [(searchRequest)]=\"searchRequest\" [searchRequestSubject]=\"searchRequestSubject\" [config]=\"configModel()\"\n [(hasChanges)]=\"hasSearchChanged\" [columns]=\"columns()\">\n </upd-search-section>\n }\n\n <div [class.table-responsive]=\"configModel().isResponsive\">\n <!-- TODO: implement pixel sized table -->\n <table class=\"table card-table table-vcenter table-nowrap\" [class.fixed]=\"hasWidth\"\n [class.pixel-sized]=\"isWidthInPixels\">\n <thead [class.sticky-top]=\"configModel().hasStickyHeader\">\n <tr>\n @if (configModel().hasCheckboxColumn) {\n <th class=\"checkbox-selector\">\n <upd-checkbox customClasses=\"m-0 ps-0\" (changed)=\"toggleAllSelection($event)\"\n [(isChecked)]=\"isMainCheckboxChecked\"\n [(isIndeterminate)]=\"isMainCheckboxIndeterminate\"></upd-checkbox>\n </th>\n }\n\n @for (col of columns(); track col) {\n <th [ngClass]=\"col.widthClass\" [style.width.px]=\"col.pixelsSize\">\n {{ textService.getText(col.title) }}\n @if (canSortColumn(col.name)) {\n <upd-icon [tablerIcon]=\"getSortingIcon(col.name)\" tablerIconWeight=\"bold\" colorClass=\"text-body-tertiary\"\n [tablerIconSize]=\"16\" (click)=\"sortByColumn(col.name)\">\n </upd-icon>\n }\n </th>\n }\n\n @if (!!pendingWidthColClass) {\n <th [ngClass]=\"pendingWidthColClass\"></th>\n }\n </tr>\n </thead>\n\n <tbody>\n @if (isSearching()) {\n <tr>\n <td [colSpan]=\"numberOfColumns\">\n <div class=\"empty\">\n <h1 class=\"text-body-tertiary\">{{ t('Loading') }}...</h1>\n <div class=\"progress progress-sm w-25\">\n <div class=\"progress-bar progress-bar-indeterminate bg-body-tertiary\"></div>\n </div>\n </div>\n </td>\n </tr>\n } @else {\n @for (record of data(); track record) {\n <tr>\n @if (configModel().hasCheckboxColumn) {\n <td>\n <upd-checkbox customClasses=\"m-0 ps-0\" (changed)=\"toggleItemSelection(record)\"\n [isChecked]=\"selectionModel().isSelected(record)\"></upd-checkbox>\n </td>\n }\n\n @for (col of columns(); track col) {\n <td>\n <ng-container updTableColumn [record]=\"record\" [config]=\"col\"></ng-container>\n </td>\n }\n\n @if (!!pendingWidthColClass) {\n <td></td>\n }\n </tr>\n } @empty {\n <tr>\n <td [colSpan]=\"numberOfColumns\">\n <div class=\"empty\">\n <p class=\"empty-title\">{{ t('NoRecordsFoundTitle') }}</p>\n <p class=\"empty-subtitle text-secondary\">{{ t('NoRecordsFoundSubtitle') }}</p>\n </div>\n </td>\n </tr>\n }\n }\n </tbody>\n </table>\n </div>\n <upd-paginator wrapperClasses=\"card-footer\" [shouldDisplayPreviousText]=\"false\" [shouldDisplayNextText]=\"false\"\n [(pageSize)]=\"pageSize\" [shouldDisplayFirstText]=\"false\" [shouldDisplayLastText]=\"false\"\n [(currentPage)]=\"currentPage\"\n [totalRecords]=\"totalRecords()\" (changed)=\"onPageSettingsChanged()\">\n </upd-paginator>\n </div>\n\n <ng-template #actionsTpl>\n <div class=\"ms-auto d-flex gap-2\">\n @if (!!activeSavedView()) {\n @if (activeSavedView()!.isDefault) {\n <div class=\"ribbon ribbon-top ribbon-start\">\n <upd-icon tablerIcon=\"heart\" [tablerIconSize]=\"20\"></upd-icon>\n </div>\n }\n <div class=\"tag align-self-center py-3 text-primary bg-primary-lt border-primary\" updPopover=\"{{ t('CurrentSavedView') }}\"\n [updPopoverActAsTooltip]=\"true\">\n <upd-icon tablerIcon=\"list-details\" [tablerIconSize]=\"20\"></upd-icon>\n <span class=\"me-1\">{{ activeSavedView()!.name }}</span>\n </div>\n }\n @if (hiddenColumns() > 0) {\n <div class=\"tag align-self-center py-3 text-orange bg-orange-lt border-orange\" updPopover=\"{{ t('HiddenColumnsTooltip') }}\"\n [updPopoverActAsTooltip]=\"true\">\n <upd-icon tablerIcon=\"eye-off\" [tablerIconSize]=\"20\"></upd-icon>\n <span class=\"me-1\">{{ hiddenColumns() }}</span>\n </div>\n }\n @if (!!activeSavedView() || hiddenColumns() > 0) {\n <upd-button (clicked)=\"resetViewState()\" colorStyle=\"danger\" updPopover=\"{{ t('ResetView') }}\"\n [updPopoverActAsTooltip]=\"true\" [isIcon]=\"true\" [isOutline]=\"true\">\n <upd-icon tablerIcon=\"restore\" [tablerIconSize]=\"20\"></upd-icon>\n </upd-button>\n }\n @if (configModel().canSaveViews) {\n <upd-button customClasses=\"gap-2\" [isDisabled]=\"!hasSearchChanged()\" (clicked)=\"openSaveSearchModal()\"\n updPopover=\"{{ t('SaveCurrentView') }}\" [updPopoverActAsTooltip]=\"true\" [isIcon]=\"true\">\n <upd-icon tablerIcon=\"device-floppy\" [tablerIconSize]=\"20\"></upd-icon>\n </upd-button>\n }\n @if (configModel().canManageColumns) {\n <upd-button customClasses=\"gap-2\" (clicked)=\"openColumnsManagerModal()\">\n <upd-icon tablerIcon=\"columns\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('ColumnsManagerButton') }}\n </upd-button>\n }\n @if (configModel().canSaveViews || configModel().canLoadSavedViews) {\n <upd-button customClasses=\"gap-2\" (clicked)=\"isSavedViewsDropdownOpen = true\" #savedViewsBtn>\n <upd-icon tablerIcon=\"folders\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('SavedViews.ButtonTitle') }}\n </upd-button>\n <upd-dropdown wrapperClasses=\"overflow-x-hidden mt-1\" [isOpen]=\"isSavedViewsDropdownOpen\"\n [dropdownReference]=\"savedViewsRef()\" [items]=\"savedViewsOptions()\" [shouldCloseOnOutsideClick]=\"true\"\n (isOpenChange)=\"isSavedViewsDropdownOpen = $event\" [minWidth]=\"350\" (selectedItem)=\"selectSavedView($event)\">\n @if (savedViewsOptions().length < 1) {\n <span class=\"m-2\">{{ t('NoSavedViews') }}</span>\n }\n </upd-dropdown>\n }\n </div>\n </ng-template>\n</ng-container>\n", styles: [".fixed{table-layout:fixed!important}.fixed td,.fixed th{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.checkbox-selector{width:52px!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: i3.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "component", type: i4.ButtonComponent, selector: "upd-button", inputs: ["model", "text", "brandColorStyle", "customClasses", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "isLink", "shouldIgnoreBtnClass", "iconModel", "iconPosition", "isDisabled", "isActive", "badgeConfig", "colorStyle", "size", "title"], outputs: ["clicked"] }, { kind: "component", type: i5.PaginatorComponent, selector: "upd-paginator", inputs: ["startPageIndex", "currentPage", "wrapperClasses", "availablePageSizes", "defaultInitPageSize", "pageSize", "shouldDisplayFirstIcon", "shouldDisplayFirstText", "shouldDisplayPreviousIcon", "shouldDisplayPreviousText", "shouldDisplayNextIcon", "shouldDisplayNextText", "shouldDisplayLastIcon", "shouldDisplayLastText", "previousDescription", "nextDescription", "totalRecords"], outputs: ["changed", "currentPageChange", "pageSizeChange"] }, { kind: "component", type: i6.CheckboxComponent, selector: "upd-checkbox", inputs: ["wrapperClasses", "value", "customClasses", "name", "isDisabled", "isChecked", "isInline", "isSwitch", "isIndeterminate"], outputs: ["changed", "isCheckedChange", "isIndeterminateChange"] }, { kind: "component", type: i7.DropdownComponent, selector: "upd-dropdown", inputs: ["items", "header", "isOpen", "shouldCloseOnOutsideClick", "arrowType", "wrapperClasses", "elementsExcludedFromOutsideClick", "minHeight", "maxHeight", "minWidth", "maxWidth", "dropdownReference", "dropdownReferencePosition", "textOverflowStrategy"], outputs: ["isOpenChange", "selectedItem", "checkboxChanged"] }, { kind: "directive", type: i8.PopoverDirective, selector: "[updPopover]", inputs: ["updPopover", "updPopoverTitle", "updPopoverTitleTemplate", "updPopoverTemplate", "updPopoverPlacement", "updPopoverCustomClasses", "updPopoverActAsTooltip"] }, { kind: "component", type: i9.SearchSectionComponent, selector: "upd-search-section", inputs: ["searchRequest", "hasChanges", "columns", "isSearching", "searchRequestSubject", "config", "actionsTpl"], outputs: ["searchRequestChange", "hasChangesChange"] }, { kind: "directive", type: i10.TableColumnDirective, selector: "[updTableColumn]", inputs: ["record", "config"] }] }); }
|
|
376
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: TableComponent, selector: "upd-table", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, searchRequest: { classPropertyName: "searchRequest", publicName: "searchRequest", isSignal: true, isRequired: false, transformFunction: null }, activeFilters: { classPropertyName: "activeFilters", publicName: "activeFilters", isSignal: true, isRequired: false, transformFunction: null }, currentPage: { classPropertyName: "currentPage", publicName: "currentPage", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { config: "configChange", searchRequest: "searchRequestChange", activeFilters: "activeFiltersChange", currentPage: "currentPageChange", pageSize: "pageSizeChange" }, viewQueries: [{ propertyName: "savedViewsRef", first: true, predicate: ["savedViewsBtn"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Table'\">\n <div class=\"card\">\n @if (!!configModel().title || !configModel().canSearch) {\n <div class=\"card-header\">\n @if (!!configModel().title) {\n <h3 class=\"card-title\">{{ textService.getText(configModel().title) }}</h3>\n }\n <ng-template [ngTemplateOutlet]=\"actionsTpl\"></ng-template>\n </div>\n }\n\n @if (configModel().canSearch) {\n <upd-search-section [actionsTpl]=\"!configModel().title ? actionsTpl : undefined\" [isSearching]=\"isSearching()\"\n [(searchRequest)]=\"searchRequest\" [searchRequestSubject]=\"searchRequestSubject\" [config]=\"configModel()\"\n [(hasChanges)]=\"hasSearchChanged\" [columns]=\"columns()\">\n </upd-search-section>\n }\n\n <div [class.table-responsive]=\"configModel().isResponsive\">\n <!-- TODO: implement pixel sized table -->\n <table class=\"table card-table table-vcenter table-nowrap\" [class.fixed]=\"hasWidth\"\n [class.pixel-sized]=\"isWidthInPixels\">\n <thead [class.sticky-top]=\"configModel().hasStickyHeader\">\n <tr>\n @if (configModel().hasCheckboxColumn) {\n <th class=\"checkbox-selector\">\n <upd-checkbox customClasses=\"m-0 ps-0\" (changed)=\"toggleAllSelection($event)\"\n [(isChecked)]=\"isMainCheckboxChecked\"\n [(isIndeterminate)]=\"isMainCheckboxIndeterminate\"></upd-checkbox>\n </th>\n }\n\n @for (col of columns(); track col) {\n <th [ngClass]=\"col.widthClass\" [style.width.px]=\"col.pixelsSize\">\n {{ textService.getText(col.title) }}\n @if (canSortColumn(col.name)) {\n <upd-icon [tablerIcon]=\"getSortingIcon(col.name)\" tablerIconWeight=\"bold\" colorClass=\"text-body-tertiary\"\n [tablerIconSize]=\"16\" (click)=\"sortByColumn(col.name)\">\n </upd-icon>\n }\n </th>\n }\n\n @if (!!pendingWidthColClass) {\n <th [ngClass]=\"pendingWidthColClass\"></th>\n }\n </tr>\n </thead>\n\n <tbody>\n @if (isSearching()) {\n <tr>\n <td [colSpan]=\"numberOfColumns\">\n <div class=\"empty\">\n <h1 class=\"text-body-tertiary\">{{ t('Loading') }}...</h1>\n <div class=\"progress progress-sm w-25\">\n <div class=\"progress-bar progress-bar-indeterminate bg-body-tertiary\"></div>\n </div>\n </div>\n </td>\n </tr>\n } @else {\n @for (record of data(); track record) {\n <tr>\n @if (configModel().hasCheckboxColumn) {\n <td>\n <upd-checkbox customClasses=\"m-0 ps-0\" (changed)=\"toggleItemSelection(record)\"\n [isChecked]=\"selectionModel().isSelected(record)\"></upd-checkbox>\n </td>\n }\n\n @for (col of columns(); track col) {\n <td>\n <ng-container updTableColumn [record]=\"record\" [config]=\"col\"></ng-container>\n </td>\n }\n\n @if (!!pendingWidthColClass) {\n <td></td>\n }\n </tr>\n } @empty {\n <tr>\n <td [colSpan]=\"numberOfColumns\">\n <div class=\"empty\">\n <p class=\"empty-title\">{{ t('NoRecordsFoundTitle') }}</p>\n <p class=\"empty-subtitle text-secondary\">{{ t('NoRecordsFoundSubtitle') }}</p>\n </div>\n </td>\n </tr>\n }\n }\n </tbody>\n </table>\n </div>\n <upd-paginator wrapperClasses=\"card-footer\" [shouldDisplayPreviousText]=\"false\" [shouldDisplayNextText]=\"false\"\n [(pageSize)]=\"pageSize\" [shouldDisplayFirstText]=\"false\" [shouldDisplayLastText]=\"false\"\n [(currentPage)]=\"currentPage\"\n [totalRecords]=\"totalRecords()\" (changed)=\"onPageSettingsChanged()\">\n </upd-paginator>\n </div>\n\n <ng-template #actionsTpl>\n <div class=\"ms-auto d-flex gap-2\">\n @if (!!activeSavedView()) {\n @if (activeSavedView()!.isDefault) {\n <div class=\"ribbon ribbon-top ribbon-start\">\n <upd-icon tablerIcon=\"heart\" [tablerIconSize]=\"20\"></upd-icon>\n </div>\n }\n <div class=\"tag align-self-center py-3 text-primary bg-primary-lt border-primary\" updPopover=\"{{ t('CurrentSavedView') }}\"\n [updPopoverActAsTooltip]=\"true\">\n <upd-icon tablerIcon=\"list-details\" [tablerIconSize]=\"20\"></upd-icon>\n <span class=\"me-1\">{{ activeSavedView()!.name }}</span>\n </div>\n }\n @if (hiddenColumns() > 0) {\n <div class=\"tag align-self-center py-3 text-orange bg-orange-lt border-orange\" updPopover=\"{{ t('HiddenColumnsTooltip') }}\"\n [updPopoverActAsTooltip]=\"true\">\n <upd-icon tablerIcon=\"eye-off\" [tablerIconSize]=\"20\"></upd-icon>\n <span class=\"me-1\">{{ hiddenColumns() }}</span>\n </div>\n }\n @if (!!activeSavedView() || hiddenColumns() > 0) {\n <upd-button (clicked)=\"resetViewState()\" colorStyle=\"danger\" updPopover=\"{{ t('ResetView') }}\"\n [updPopoverActAsTooltip]=\"true\" [isIcon]=\"true\" [isOutline]=\"true\">\n <upd-icon tablerIcon=\"restore\" [tablerIconSize]=\"20\"></upd-icon>\n </upd-button>\n }\n @if (configModel().canSaveViews) {\n <upd-button customClasses=\"gap-2\" [isDisabled]=\"!hasSearchChanged()\" (clicked)=\"openSaveSearchModal()\"\n updPopover=\"{{ t('SaveCurrentView') }}\" [updPopoverActAsTooltip]=\"true\" [isIcon]=\"true\">\n <upd-icon tablerIcon=\"device-floppy\" [tablerIconSize]=\"20\"></upd-icon>\n </upd-button>\n }\n @if (configModel().canManageColumns) {\n <upd-button customClasses=\"gap-2\" (clicked)=\"openColumnsManagerModal()\">\n <upd-icon tablerIcon=\"columns\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('ColumnsManagerButton') }}\n </upd-button>\n }\n @if (configModel().canSaveViews || configModel().canLoadSavedViews) {\n <upd-button customClasses=\"gap-2\" (clicked)=\"isSavedViewsDropdownOpen = true\" #savedViewsBtn>\n <upd-icon tablerIcon=\"folders\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('SavedViews.ButtonTitle') }}\n </upd-button>\n <upd-dropdown wrapperClasses=\"overflow-x-hidden mt-1\" [isOpen]=\"isSavedViewsDropdownOpen\"\n [dropdownReference]=\"savedViewsRef()\" [items]=\"savedViewsOptions()\" [shouldCloseOnOutsideClick]=\"true\"\n (isOpenChange)=\"isSavedViewsDropdownOpen = $event\" [minWidth]=\"350\" (selectedItem)=\"selectSavedView($event)\">\n @if (savedViewsOptions().length < 1) {\n <span class=\"m-2\">{{ t('NoSavedViews') }}</span>\n }\n </upd-dropdown>\n }\n </div>\n </ng-template>\n</ng-container>\n", styles: [".fixed{table-layout:fixed!important}.fixed td,.fixed th{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.checkbox-selector{width:52px!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: i3.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "component", type: i4.ButtonComponent, selector: "upd-button", inputs: ["model", "text", "brandColorStyle", "customClasses", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "isLink", "shouldIgnoreBtnClass", "iconModel", "iconPosition", "isDisabled", "isActive", "badgeConfig", "colorStyle", "size", "title"], outputs: ["clicked"] }, { kind: "component", type: i5.PaginatorComponent, selector: "upd-paginator", inputs: ["startPageIndex", "currentPage", "wrapperClasses", "availablePageSizes", "defaultInitPageSize", "pageSize", "shouldDisplayFirstIcon", "shouldDisplayFirstText", "shouldDisplayPreviousIcon", "shouldDisplayPreviousText", "shouldDisplayNextIcon", "shouldDisplayNextText", "shouldDisplayLastIcon", "shouldDisplayLastText", "previousDescription", "nextDescription", "totalRecords"], outputs: ["changed", "currentPageChange", "pageSizeChange"] }, { kind: "component", type: i6.CheckboxComponent, selector: "upd-checkbox", inputs: ["wrapperClasses", "value", "customClasses", "isChecked", "isInline", "isSwitch", "isIndeterminate"], outputs: ["changed", "isCheckedChange", "isIndeterminateChange"] }, { kind: "component", type: i7.DropdownComponent, selector: "upd-dropdown", inputs: ["items", "header", "isOpen", "shouldCloseOnOutsideClick", "arrowType", "wrapperClasses", "elementsExcludedFromOutsideClick", "minHeight", "maxHeight", "minWidth", "maxWidth", "dropdownReference", "dropdownReferencePosition", "textOverflowStrategy"], outputs: ["isOpenChange", "selectedItem", "checkboxChanged"] }, { kind: "directive", type: i8.PopoverDirective, selector: "[updPopover]", inputs: ["updPopover", "updPopoverTitle", "updPopoverTitleTemplate", "updPopoverTemplate", "updPopoverPlacement", "updPopoverCustomClasses", "updPopoverActAsTooltip"] }, { kind: "component", type: i9.SearchSectionComponent, selector: "upd-search-section", inputs: ["searchRequest", "hasChanges", "columns", "isSearching", "searchRequestSubject", "config", "actionsTpl"], outputs: ["searchRequestChange", "hasChangesChange"] }, { kind: "directive", type: i10.TableColumnDirective, selector: "[updTableColumn]", inputs: ["record", "config"] }] }); }
|
|
377
377
|
}
|
|
378
378
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TableComponent, decorators: [{
|
|
379
379
|
type: Component,
|
|
@@ -144,7 +144,7 @@ class DropdownComponent extends BaseComponent {
|
|
|
144
144
|
this.renderer.setStyle(ddElement, 'top', `${result.y}px`, RendererStyleFlags2.Important);
|
|
145
145
|
}
|
|
146
146
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
147
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: DropdownComponent, selector: "upd-dropdown", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: false, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: false, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: false, isRequired: false, transformFunction: null }, shouldCloseOnOutsideClick: { classPropertyName: "shouldCloseOnOutsideClick", publicName: "shouldCloseOnOutsideClick", isSignal: false, isRequired: false, transformFunction: null }, arrowType: { classPropertyName: "arrowType", publicName: "arrowType", isSignal: false, isRequired: false, transformFunction: null }, wrapperClasses: { classPropertyName: "wrapperClasses", publicName: "wrapperClasses", isSignal: false, isRequired: false, transformFunction: null }, elementsExcludedFromOutsideClick: { classPropertyName: "elementsExcludedFromOutsideClick", publicName: "elementsExcludedFromOutsideClick", isSignal: false, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: false, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: false, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: false, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: false, isRequired: false, transformFunction: null }, dropdownReference: { classPropertyName: "dropdownReference", publicName: "dropdownReference", isSignal: false, isRequired: false, transformFunction: null }, dropdownReferencePosition: { classPropertyName: "dropdownReferencePosition", publicName: "dropdownReferencePosition", isSignal: false, isRequired: false, transformFunction: null }, textOverflowStrategy: { classPropertyName: "textOverflowStrategy", publicName: "textOverflowStrategy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOpenChange: "isOpenChange", selectedItem: "selectedItem", checkboxChanged: "checkboxChanged" }, host: { properties: { "class": "this.localWrapperClasses" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if (!!header) {\n <h6 class=\"dropdown-header\">{{ header }}</h6>\n}\n\n@for (item of items; track item) {\n @switch (item.type) {\n @case ('divider') {\n <div class=\"dropdown-divider\"></div>\n }\n @case ('default') {\n <upd-button [customClasses]=\"'dropdown-item' + (item.isDisabled ? ' disabled' : '') + (item.isActive ? ' active' : '')\"\n [shouldIgnoreBtnClass]=\"true\" (clicked)=\"onSelect(item)\">\n @if (!!item.icon) {\n <upd-icon [model]=\"item.icon\" customClasses=\"dropdown-item-icon\"></upd-icon>\n }\n\n @if (!!item.leftBoxText || !!item.leftBoxImage) {\n <span style=\"background-image: url({{item.leftBoxImage}})\"\n class=\"avatar avatar-xs rounded me-2\">{{ item.leftBoxText }}</span>\n }\n\n {{ textService.getText(item.text) }}\n\n @if (!!item.badgeColor) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n }\n </upd-button>\n }\n @case ('radio') {\n <upd-radio (selected)=\"onSelect(item)\" [label]=\"item.text\" [isChecked]=\"item.isChecked || false\"\n [wrapperClasses]=\"'dropdown-item' + (item.isDisabled ? ' disabled' : '') + (item.isActive ? ' active' : '')\"></upd-radio>\n }\n @case ('checkbox') {\n <upd-checkbox (changed)=\"onCheckboxChange(item, $event)\" [label]=\"item.text\" [isChecked]=\"item.isChecked || false\"\n [isSwitch]=\"item.isSwitch || false\"\n [wrapperClasses]=\"'dropdown-item' + (item.isDisabled ? ' disabled' : '') + (item.isActive ? ' active' : '')\"></upd-checkbox>\n }\n @case ('with-toolbar') {\n <div class=\"dropdown-item\" [class.disabled]=\"item.isDisabled\" [class.active]=\"item.isActive\" (click)=\"onSelect(item)\">\n @if (!!item.icon) {\n <upd-icon [model]=\"item.icon\" customClasses=\"dropdown-item-icon\"></upd-icon>\n }\n\n @if (!!item.leftBoxText || !!item.leftBoxImage) {\n <span style=\"background-image: url({{item.leftBoxImage}})\"\n class=\"avatar avatar-xs rounded me-2\">{{ item.leftBoxText }}</span>\n }\n\n <span [ngClass]=\"overflowClass\">\n {{ textService.getText(item.text) }}\n </span>\n\n @if ((item.actionButtons?.length || 0) > 0) {\n <div class=\"ms-auto d-flex\" [class.btn-group]=\"item.toolbarType === 'grouped'\"\n [class.gap-1]=\"item.toolbarType === 'spaced'\">\n @for (btn of item.actionButtons; track btn) {\n <upd-button [model]=\"adaptAction(btn, item)\"></upd-button>\n }\n </div>\n }\n\n @if (!!item.badgeColor) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n }\n </div>\n }\n }\n}\n\n<ng-content></ng-content>\n", styles: [".dropdown-show{display:inline-block!important;width:100%!important;position:relative;top:0!important;margin-bottom:1rem!important}.dropdown-item>.form-check{margin-bottom:0!important}.dropdown-item{cursor:pointer!important}.dropdown-overflow{overflow-y:auto!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "component", type: i3.RadioComponent, selector: "upd-radio", inputs: ["wrapperClasses", "value", "customClasses", "
|
|
147
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: DropdownComponent, selector: "upd-dropdown", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: false, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: false, isRequired: false, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: false, isRequired: false, transformFunction: null }, shouldCloseOnOutsideClick: { classPropertyName: "shouldCloseOnOutsideClick", publicName: "shouldCloseOnOutsideClick", isSignal: false, isRequired: false, transformFunction: null }, arrowType: { classPropertyName: "arrowType", publicName: "arrowType", isSignal: false, isRequired: false, transformFunction: null }, wrapperClasses: { classPropertyName: "wrapperClasses", publicName: "wrapperClasses", isSignal: false, isRequired: false, transformFunction: null }, elementsExcludedFromOutsideClick: { classPropertyName: "elementsExcludedFromOutsideClick", publicName: "elementsExcludedFromOutsideClick", isSignal: false, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: false, isRequired: false, transformFunction: null }, maxHeight: { classPropertyName: "maxHeight", publicName: "maxHeight", isSignal: false, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: false, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: false, isRequired: false, transformFunction: null }, dropdownReference: { classPropertyName: "dropdownReference", publicName: "dropdownReference", isSignal: false, isRequired: false, transformFunction: null }, dropdownReferencePosition: { classPropertyName: "dropdownReferencePosition", publicName: "dropdownReferencePosition", isSignal: false, isRequired: false, transformFunction: null }, textOverflowStrategy: { classPropertyName: "textOverflowStrategy", publicName: "textOverflowStrategy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOpenChange: "isOpenChange", selectedItem: "selectedItem", checkboxChanged: "checkboxChanged" }, host: { properties: { "class": "this.localWrapperClasses" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if (!!header) {\n <h6 class=\"dropdown-header\">{{ header }}</h6>\n}\n\n@for (item of items; track item) {\n @switch (item.type) {\n @case ('divider') {\n <div class=\"dropdown-divider\"></div>\n }\n @case ('default') {\n <upd-button [customClasses]=\"'dropdown-item' + (item.isDisabled ? ' disabled' : '') + (item.isActive ? ' active' : '')\"\n [shouldIgnoreBtnClass]=\"true\" (clicked)=\"onSelect(item)\">\n @if (!!item.icon) {\n <upd-icon [model]=\"item.icon\" customClasses=\"dropdown-item-icon\"></upd-icon>\n }\n\n @if (!!item.leftBoxText || !!item.leftBoxImage) {\n <span style=\"background-image: url({{item.leftBoxImage}})\"\n class=\"avatar avatar-xs rounded me-2\">{{ item.leftBoxText }}</span>\n }\n\n {{ textService.getText(item.text) }}\n\n @if (!!item.badgeColor) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n }\n </upd-button>\n }\n @case ('radio') {\n <upd-radio (selected)=\"onSelect(item)\" [label]=\"item.text\" [isChecked]=\"item.isChecked || false\"\n [wrapperClasses]=\"'dropdown-item' + (item.isDisabled ? ' disabled' : '') + (item.isActive ? ' active' : '')\"></upd-radio>\n }\n @case ('checkbox') {\n <upd-checkbox (changed)=\"onCheckboxChange(item, $event)\" [label]=\"item.text\" [isChecked]=\"item.isChecked || false\"\n [isSwitch]=\"item.isSwitch || false\"\n [wrapperClasses]=\"'dropdown-item' + (item.isDisabled ? ' disabled' : '') + (item.isActive ? ' active' : '')\"></upd-checkbox>\n }\n @case ('with-toolbar') {\n <div class=\"dropdown-item\" [class.disabled]=\"item.isDisabled\" [class.active]=\"item.isActive\" (click)=\"onSelect(item)\">\n @if (!!item.icon) {\n <upd-icon [model]=\"item.icon\" customClasses=\"dropdown-item-icon\"></upd-icon>\n }\n\n @if (!!item.leftBoxText || !!item.leftBoxImage) {\n <span style=\"background-image: url({{item.leftBoxImage}})\"\n class=\"avatar avatar-xs rounded me-2\">{{ item.leftBoxText }}</span>\n }\n\n <span [ngClass]=\"overflowClass\">\n {{ textService.getText(item.text) }}\n </span>\n\n @if ((item.actionButtons?.length || 0) > 0) {\n <div class=\"ms-auto d-flex\" [class.btn-group]=\"item.toolbarType === 'grouped'\"\n [class.gap-1]=\"item.toolbarType === 'spaced'\">\n @for (btn of item.actionButtons; track btn) {\n <upd-button [model]=\"adaptAction(btn, item)\"></upd-button>\n }\n </div>\n }\n\n @if (!!item.badgeColor) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n }\n </div>\n }\n }\n}\n\n<ng-content></ng-content>\n", styles: [".dropdown-show{display:inline-block!important;width:100%!important;position:relative;top:0!important;margin-bottom:1rem!important}.dropdown-item>.form-check{margin-bottom:0!important}.dropdown-item{cursor:pointer!important}.dropdown-overflow{overflow-y:auto!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "component", type: i3.RadioComponent, selector: "upd-radio", inputs: ["wrapperClasses", "value", "customClasses", "isChecked", "isInline"], outputs: ["selected"] }, { kind: "component", type: i4.CheckboxComponent, selector: "upd-checkbox", inputs: ["wrapperClasses", "value", "customClasses", "isChecked", "isInline", "isSwitch", "isIndeterminate"], outputs: ["changed", "isCheckedChange", "isIndeterminateChange"] }, { kind: "component", type: i5.ButtonComponent, selector: "upd-button", inputs: ["model", "text", "brandColorStyle", "customClasses", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "isLink", "shouldIgnoreBtnClass", "iconModel", "iconPosition", "isDisabled", "isActive", "badgeConfig", "colorStyle", "size", "title"], outputs: ["clicked"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
148
148
|
}
|
|
149
149
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
150
150
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updevs-components-dropdown.mjs","sources":["../../../../libs/components/dropdown/src/dropdown.component.ts","../../../../libs/components/dropdown/src/dropdown.component.html","../../../../libs/components/dropdown/src/upd-dropdown.module.ts","../../../../libs/components/dropdown/src/updevs-components-dropdown.ts"],"sourcesContent":["import {\n Component,\n HostBinding,\n ViewEncapsulation,\n Input,\n OnInit,\n OnChanges,\n Output,\n EventEmitter,\n NgZone,\n ElementRef,\n Renderer2,\n RendererStyleFlags2,\n inject, input\n} from '@angular/core';\nimport { BaseComponent, PositioningService, ComputePositionResult, DomEventsService, ButtonModel } from '@updevs/sdk/layout';\nimport { TopBottomLeftRightType, LeftRightType, OverflowStrategyType } from '@updevs/sdk/types';\nimport { TextService } from '@updevs/sdk';\n\nimport { DropdownItem } from './models/dropdown-item';\nimport { DropdownActionClickedModel } from './models/dropdown-action-clicked.model';\n\n@Component({\n selector: 'upd-dropdown',\n templateUrl: './dropdown.component.html',\n styleUrls: ['./dropdown.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class DropdownComponent extends BaseComponent implements OnInit, OnChanges {\n @HostBinding('class') localWrapperClasses = '';\n\n @Input() items: DropdownItem[] = [];\n @Input() header?: string;\n\n @Input()\n set isOpen(value: boolean) {\n this.updateOpenState(value);\n\n if (this.shouldCloseOnOutsideClick) {\n this.closeOnOutsideClick();\n }\n }\n\n @Input() shouldCloseOnOutsideClick = false;\n @Input() arrowType?: LeftRightType;\n @Input() wrapperClasses = '';\n /**\n * Elements that won't trigger the close of the dropdown if clicked upon.\n * Only works when `shouldCloseOnOutsideClick` is set to true.\n */\n @Input() elementsExcludedFromOutsideClick?: HTMLElement[];\n /**\n * Minimum height of the component.\n */\n @Input() minHeight?: number;\n /**\n * Maximum height of the component.\n * If set, scroll bars will be used when the content's size is bigger than the component's.\n */\n @Input() maxHeight?: number;\n /**\n * Minimum width of the component.\n */\n @Input() minWidth?: number;\n /**\n * Maximum width of the component.\n * If set, scroll bars will be used when the content's size is bigger than the component's.\n */\n @Input() maxWidth?: number;\n /**\n * If set, the position of the dropdown will be set according to this element.\n */\n @Input() dropdownReference?: ElementRef;\n /**\n * If a reference is provided, this will be the position of the dropdown in relation to that reference.\n */\n @Input() dropdownReferencePosition: TopBottomLeftRightType = 'bottom';\n\n @Output() readonly isOpenChange = new EventEmitter<boolean>();\n @Output() readonly selectedItem = new EventEmitter<DropdownItem>();\n @Output() readonly checkboxChanged = new EventEmitter<DropdownItem>();\n\n textOverflowStrategy = input<OverflowStrategyType>('wrap');\n\n readonly textService = inject(TextService);\n\n get isOpen(): boolean {\n return this._isOpen;\n }\n\n get overflowClass(): string {\n switch (this.textOverflowStrategy()) {\n case 'no-wrap':\n return 'text-nowrap';\n case 'wrap':\n return 'text-wrap';\n case 'word-break':\n return 'text-break';\n default:\n return 'text-truncate';\n }\n }\n\n private baseWrapperClasses = 'dropdown-menu';\n private _isOpen = false;\n private readonly dropdownElement: HTMLElement;\n private readonly ngZone = inject(NgZone);\n private readonly elementRef = inject(ElementRef);\n private readonly renderer = inject(Renderer2);\n private readonly positioningService = inject(PositioningService);\n private readonly domEventsService = inject(DomEventsService);\n\n constructor() {\n super();\n this.dropdownElement = this.elementRef.nativeElement;\n }\n\n ngOnInit(): void {\n this.updateStyle();\n }\n\n ngOnChanges(): void {\n this.updateStyle();\n }\n\n onSelect(item: DropdownItem): void {\n this.selectedItem.emit(item);\n }\n\n onCheckboxChange(item: DropdownItem, isChecked: boolean): void {\n item.isChecked = isChecked;\n this.checkboxChanged.emit(item);\n }\n\n adaptAction(btn: ButtonModel, item: DropdownItem): ButtonModel {\n const defaultFunction = btn.clickFunction;\n btn.clickFunction = (evt) => {\n evt.event?.preventDefault();\n evt.event?.stopPropagation();\n\n if (!!defaultFunction) {\n defaultFunction({ event: evt.event, data: { item, button: btn } as DropdownActionClickedModel });\n }\n };\n return btn;\n }\n\n private closeOnOutsideClick(): void {\n const excludedElements = [];\n\n if (!!this.dropdownReference) {\n excludedElements.push(this.dropdownReference.nativeElement);\n }\n\n const outsideClickSub = this.domEventsService.startOutsideClickListener(\n () => this.ngZone.run(() => {\n this.updateOpenState(false);\n this.ngZone.run(() => this.updateWrapperClasses());\n }),\n this.dropdownElement,\n true,\n ...excludedElements\n );\n this.addSubscriptions(outsideClickSub);\n }\n\n private updateStyle(): void {\n this.updateWrapperClasses();\n this.updateMaxHeight();\n this.startPositionUpdate();\n }\n\n private updateWrapperClasses(): void {\n this.localWrapperClasses = this.baseWrapperClasses + ' ' + this.wrapperClasses;\n\n if (this.isOpen) {\n this.localWrapperClasses += ' dropdown-show';\n }\n\n if (!!this.arrowType) {\n this.localWrapperClasses += ' dropdown-menu-arrow' + (this.arrowType === 'right' ? ' dropdown-menu-end' : '');\n }\n\n if (!!this.maxHeight) {\n this.localWrapperClasses += ' dropdown-overflow';\n }\n }\n\n private updateOpenState(isOpen: boolean): void {\n this._isOpen = isOpen;\n this.isOpenChange.emit(isOpen);\n }\n\n private updateMaxHeight(): void {\n this.renderer.setStyle(this.dropdownElement, 'max-height', `${this.maxHeight}px`, RendererStyleFlags2.Important);\n }\n\n private startPositionUpdate(): void {\n if (!this.dropdownReference) {\n return;\n }\n\n this.ngZone.runOutsideAngular(() =>\n this.positioningService\n .computePosition(\n this.dropdownReference!,\n this.elementRef,\n { placement: this.dropdownReferencePosition },\n undefined,\n undefined,\n true\n )\n .subscribe(resp => this.updatePosition(resp))\n );\n }\n\n private updatePosition(result: ComputePositionResult): void {\n const reference = this.dropdownReference!.nativeElement.getBoundingClientRect();\n const ddElement = this.dropdownElement;\n const width = Math.abs(reference.width);\n let widthOffset = 0;\n\n if (!!this.maxWidth) {\n this.renderer.setStyle(ddElement, 'max-width', `${this.maxWidth}px`, RendererStyleFlags2.Important);\n }\n\n if (!!this.minWidth) {\n this.renderer.setStyle(ddElement, 'min-width', `${this.minWidth}px`, RendererStyleFlags2.Important);\n widthOffset = (this.minWidth > width ? this.minWidth - width : 0) / 2; // TODO: check logic\n }\n\n this.renderer.setStyle(ddElement, 'position', result.strategy, RendererStyleFlags2.Important);\n this.renderer.setStyle(ddElement, 'width', `${width}px`, RendererStyleFlags2.Important);\n this.renderer.setStyle(ddElement, 'left', `${result.x - widthOffset}px`, RendererStyleFlags2.Important);\n this.renderer.setStyle(ddElement, 'top', `${result.y}px`, RendererStyleFlags2.Important);\n }\n}\n","@if (!!header) {\n <h6 class=\"dropdown-header\">{{ header }}</h6>\n}\n\n@for (item of items; track item) {\n @switch (item.type) {\n @case ('divider') {\n <div class=\"dropdown-divider\"></div>\n }\n @case ('default') {\n <upd-button [customClasses]=\"'dropdown-item' + (item.isDisabled ? ' disabled' : '') + (item.isActive ? ' active' : '')\"\n [shouldIgnoreBtnClass]=\"true\" (clicked)=\"onSelect(item)\">\n @if (!!item.icon) {\n <upd-icon [model]=\"item.icon\" customClasses=\"dropdown-item-icon\"></upd-icon>\n }\n\n @if (!!item.leftBoxText || !!item.leftBoxImage) {\n <span style=\"background-image: url({{item.leftBoxImage}})\"\n class=\"avatar avatar-xs rounded me-2\">{{ item.leftBoxText }}</span>\n }\n\n {{ textService.getText(item.text) }}\n\n @if (!!item.badgeColor) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n }\n </upd-button>\n }\n @case ('radio') {\n <upd-radio (selected)=\"onSelect(item)\" [label]=\"item.text\" [isChecked]=\"item.isChecked || false\"\n [wrapperClasses]=\"'dropdown-item' + (item.isDisabled ? ' disabled' : '') + (item.isActive ? ' active' : '')\"></upd-radio>\n }\n @case ('checkbox') {\n <upd-checkbox (changed)=\"onCheckboxChange(item, $event)\" [label]=\"item.text\" [isChecked]=\"item.isChecked || false\"\n [isSwitch]=\"item.isSwitch || false\"\n [wrapperClasses]=\"'dropdown-item' + (item.isDisabled ? ' disabled' : '') + (item.isActive ? ' active' : '')\"></upd-checkbox>\n }\n @case ('with-toolbar') {\n <div class=\"dropdown-item\" [class.disabled]=\"item.isDisabled\" [class.active]=\"item.isActive\" (click)=\"onSelect(item)\">\n @if (!!item.icon) {\n <upd-icon [model]=\"item.icon\" customClasses=\"dropdown-item-icon\"></upd-icon>\n }\n\n @if (!!item.leftBoxText || !!item.leftBoxImage) {\n <span style=\"background-image: url({{item.leftBoxImage}})\"\n class=\"avatar avatar-xs rounded me-2\">{{ item.leftBoxText }}</span>\n }\n\n <span [ngClass]=\"overflowClass\">\n {{ textService.getText(item.text) }}\n </span>\n\n @if ((item.actionButtons?.length || 0) > 0) {\n <div class=\"ms-auto d-flex\" [class.btn-group]=\"item.toolbarType === 'grouped'\"\n [class.gap-1]=\"item.toolbarType === 'spaced'\">\n @for (btn of item.actionButtons; track btn) {\n <upd-button [model]=\"adaptAction(btn, item)\"></upd-button>\n }\n </div>\n }\n\n @if (!!item.badgeColor) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n }\n </div>\n }\n }\n}\n\n<ng-content></ng-content>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { UpdIconsModule } from '@updevs/icons';\nimport { UpdButtonModule } from '@updevs/components/button';\nimport { UpdRadioModule } from '@updevs/components/form-controls/radio';\nimport { UpdCheckboxModule } from '@updevs/components/form-controls/checkbox';\n\nimport { DropdownComponent } from './dropdown.component';\n\n@NgModule({\n imports: [\n CommonModule,\n UpdIconsModule,\n UpdRadioModule,\n UpdCheckboxModule,\n UpdButtonModule\n ],\n declarations: [\n DropdownComponent\n ],\n exports: [\n DropdownComponent\n ]\n})\nexport class UpdDropdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AA4BM,MAAO,iBAAkB,SAAQ,aAAa,CAAA;IAMhD,IACI,MAAM,CAAC,KAAc,EAAA;AACrB,QAAA,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;AAE5B,QAAA,IAAI,IAAI,CAAC,yBAAyB,EAAE;YAChC,IAAI,CAAC,mBAAmB,EAAE,CAAC;SAC9B;KACJ;AA6CD,IAAA,IAAI,MAAM,GAAA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eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAjB,iBAAiB,EAAA,YAAA,EAAA,CANtB,iBAAiB,CAAA,EAAA,OAAA,EAAA,CAPjB,YAAY;YACZ,cAAc;YACd,cAAc;YACd,iBAAiB;AACjB,YAAA,eAAe,aAMf,iBAAiB,CAAA,EAAA,CAAA,CAAA,EAAA;AAGZ,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAbtB,YAAY;YACZ,cAAc;YACd,cAAc;YACd,iBAAiB;YACjB,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;2FASV,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAf7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,cAAc;wBACd,cAAc;wBACd,iBAAiB;wBACjB,eAAe;AAClB,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV,iBAAiB;AACpB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,iBAAiB;AACpB,qBAAA;AACJ,iBAAA,CAAA;;;ACvBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"updevs-components-dropdown.mjs","sources":["../../../../libs/components/dropdown/src/dropdown.component.ts","../../../../libs/components/dropdown/src/dropdown.component.html","../../../../libs/components/dropdown/src/upd-dropdown.module.ts","../../../../libs/components/dropdown/src/updevs-components-dropdown.ts"],"sourcesContent":["import {\n Component,\n HostBinding,\n ViewEncapsulation,\n Input,\n OnInit,\n OnChanges,\n Output,\n EventEmitter,\n NgZone,\n ElementRef,\n Renderer2,\n RendererStyleFlags2,\n inject, input\n} from '@angular/core';\nimport { BaseComponent, PositioningService, ComputePositionResult, DomEventsService, ButtonModel } from '@updevs/sdk/layout';\nimport { TopBottomLeftRightType, LeftRightType, OverflowStrategyType } from '@updevs/sdk/types';\nimport { TextService } from '@updevs/sdk';\n\nimport { DropdownItem } from './models/dropdown-item';\nimport { DropdownActionClickedModel } from './models/dropdown-action-clicked.model';\n\n@Component({\n selector: 'upd-dropdown',\n templateUrl: './dropdown.component.html',\n styleUrls: ['./dropdown.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class DropdownComponent extends BaseComponent implements OnInit, OnChanges {\n @HostBinding('class') localWrapperClasses = '';\n\n @Input() items: DropdownItem[] = [];\n @Input() header?: string;\n\n @Input()\n set isOpen(value: boolean) {\n this.updateOpenState(value);\n\n if (this.shouldCloseOnOutsideClick) {\n this.closeOnOutsideClick();\n }\n }\n\n @Input() shouldCloseOnOutsideClick = false;\n @Input() arrowType?: LeftRightType;\n @Input() wrapperClasses = '';\n /**\n * Elements that won't trigger the close of the dropdown if clicked upon.\n * Only works when `shouldCloseOnOutsideClick` is set to true.\n */\n @Input() elementsExcludedFromOutsideClick?: HTMLElement[];\n /**\n * Minimum height of the component.\n */\n @Input() minHeight?: number;\n /**\n * Maximum height of the component.\n * If set, scroll bars will be used when the content's size is bigger than the component's.\n */\n @Input() maxHeight?: number;\n /**\n * Minimum width of the component.\n */\n @Input() minWidth?: number;\n /**\n * Maximum width of the component.\n * If set, scroll bars will be used when the content's size is bigger than the component's.\n */\n @Input() maxWidth?: number;\n /**\n * If set, the position of the dropdown will be set according to this element.\n */\n @Input() dropdownReference?: ElementRef;\n /**\n * If a reference is provided, this will be the position of the dropdown in relation to that reference.\n */\n @Input() dropdownReferencePosition: TopBottomLeftRightType = 'bottom';\n\n @Output() readonly isOpenChange = new EventEmitter<boolean>();\n @Output() readonly selectedItem = new EventEmitter<DropdownItem>();\n @Output() readonly checkboxChanged = new EventEmitter<DropdownItem>();\n\n textOverflowStrategy = input<OverflowStrategyType>('wrap');\n\n readonly textService = inject(TextService);\n\n get isOpen(): boolean {\n return this._isOpen;\n }\n\n get overflowClass(): string {\n switch (this.textOverflowStrategy()) {\n case 'no-wrap':\n return 'text-nowrap';\n case 'wrap':\n return 'text-wrap';\n case 'word-break':\n return 'text-break';\n default:\n return 'text-truncate';\n }\n }\n\n private baseWrapperClasses = 'dropdown-menu';\n private _isOpen = false;\n private readonly dropdownElement: HTMLElement;\n private readonly ngZone = inject(NgZone);\n private readonly elementRef = inject(ElementRef);\n private readonly renderer = inject(Renderer2);\n private readonly positioningService = inject(PositioningService);\n private readonly domEventsService = inject(DomEventsService);\n\n constructor() {\n super();\n this.dropdownElement = this.elementRef.nativeElement;\n }\n\n ngOnInit(): void {\n this.updateStyle();\n }\n\n ngOnChanges(): void {\n this.updateStyle();\n }\n\n onSelect(item: DropdownItem): void {\n this.selectedItem.emit(item);\n }\n\n onCheckboxChange(item: DropdownItem, isChecked: boolean): void {\n item.isChecked = isChecked;\n this.checkboxChanged.emit(item);\n }\n\n adaptAction(btn: ButtonModel, item: DropdownItem): ButtonModel {\n const defaultFunction = btn.clickFunction;\n btn.clickFunction = (evt) => {\n evt.event?.preventDefault();\n evt.event?.stopPropagation();\n\n if (!!defaultFunction) {\n defaultFunction({ event: evt.event, data: { item, button: btn } as DropdownActionClickedModel });\n }\n };\n return btn;\n }\n\n private closeOnOutsideClick(): void {\n const excludedElements = [];\n\n if (!!this.dropdownReference) {\n excludedElements.push(this.dropdownReference.nativeElement);\n }\n\n const outsideClickSub = this.domEventsService.startOutsideClickListener(\n () => this.ngZone.run(() => {\n this.updateOpenState(false);\n this.ngZone.run(() => this.updateWrapperClasses());\n }),\n this.dropdownElement,\n true,\n ...excludedElements\n );\n this.addSubscriptions(outsideClickSub);\n }\n\n private updateStyle(): void {\n this.updateWrapperClasses();\n this.updateMaxHeight();\n this.startPositionUpdate();\n }\n\n private updateWrapperClasses(): void {\n this.localWrapperClasses = this.baseWrapperClasses + ' ' + this.wrapperClasses;\n\n if (this.isOpen) {\n this.localWrapperClasses += ' dropdown-show';\n }\n\n if (!!this.arrowType) {\n this.localWrapperClasses += ' dropdown-menu-arrow' + (this.arrowType === 'right' ? ' dropdown-menu-end' : '');\n }\n\n if (!!this.maxHeight) {\n this.localWrapperClasses += ' dropdown-overflow';\n }\n }\n\n private updateOpenState(isOpen: boolean): void {\n this._isOpen = isOpen;\n this.isOpenChange.emit(isOpen);\n }\n\n private updateMaxHeight(): void {\n this.renderer.setStyle(this.dropdownElement, 'max-height', `${this.maxHeight}px`, RendererStyleFlags2.Important);\n }\n\n private startPositionUpdate(): void {\n if (!this.dropdownReference) {\n return;\n }\n\n this.ngZone.runOutsideAngular(() =>\n this.positioningService\n .computePosition(\n this.dropdownReference!,\n this.elementRef,\n { placement: this.dropdownReferencePosition },\n undefined,\n undefined,\n true\n )\n .subscribe(resp => this.updatePosition(resp))\n );\n }\n\n private updatePosition(result: ComputePositionResult): void {\n const reference = this.dropdownReference!.nativeElement.getBoundingClientRect();\n const ddElement = this.dropdownElement;\n const width = Math.abs(reference.width);\n let widthOffset = 0;\n\n if (!!this.maxWidth) {\n this.renderer.setStyle(ddElement, 'max-width', `${this.maxWidth}px`, RendererStyleFlags2.Important);\n }\n\n if (!!this.minWidth) {\n this.renderer.setStyle(ddElement, 'min-width', `${this.minWidth}px`, RendererStyleFlags2.Important);\n widthOffset = (this.minWidth > width ? this.minWidth - width : 0) / 2; // TODO: check logic\n }\n\n this.renderer.setStyle(ddElement, 'position', result.strategy, RendererStyleFlags2.Important);\n this.renderer.setStyle(ddElement, 'width', `${width}px`, RendererStyleFlags2.Important);\n this.renderer.setStyle(ddElement, 'left', `${result.x - widthOffset}px`, RendererStyleFlags2.Important);\n this.renderer.setStyle(ddElement, 'top', `${result.y}px`, RendererStyleFlags2.Important);\n }\n}\n","@if (!!header) {\n <h6 class=\"dropdown-header\">{{ header }}</h6>\n}\n\n@for (item of items; track item) {\n @switch (item.type) {\n @case ('divider') {\n <div class=\"dropdown-divider\"></div>\n }\n @case ('default') {\n <upd-button [customClasses]=\"'dropdown-item' + (item.isDisabled ? ' disabled' : '') + (item.isActive ? ' active' : '')\"\n [shouldIgnoreBtnClass]=\"true\" (clicked)=\"onSelect(item)\">\n @if (!!item.icon) {\n <upd-icon [model]=\"item.icon\" customClasses=\"dropdown-item-icon\"></upd-icon>\n }\n\n @if (!!item.leftBoxText || !!item.leftBoxImage) {\n <span style=\"background-image: url({{item.leftBoxImage}})\"\n class=\"avatar avatar-xs rounded me-2\">{{ item.leftBoxText }}</span>\n }\n\n {{ textService.getText(item.text) }}\n\n @if (!!item.badgeColor) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n }\n </upd-button>\n }\n @case ('radio') {\n <upd-radio (selected)=\"onSelect(item)\" [label]=\"item.text\" [isChecked]=\"item.isChecked || false\"\n [wrapperClasses]=\"'dropdown-item' + (item.isDisabled ? ' disabled' : '') + (item.isActive ? ' active' : '')\"></upd-radio>\n }\n @case ('checkbox') {\n <upd-checkbox (changed)=\"onCheckboxChange(item, $event)\" [label]=\"item.text\" [isChecked]=\"item.isChecked || false\"\n [isSwitch]=\"item.isSwitch || false\"\n [wrapperClasses]=\"'dropdown-item' + (item.isDisabled ? ' disabled' : '') + (item.isActive ? ' active' : '')\"></upd-checkbox>\n }\n @case ('with-toolbar') {\n <div class=\"dropdown-item\" [class.disabled]=\"item.isDisabled\" [class.active]=\"item.isActive\" (click)=\"onSelect(item)\">\n @if (!!item.icon) {\n <upd-icon [model]=\"item.icon\" customClasses=\"dropdown-item-icon\"></upd-icon>\n }\n\n @if (!!item.leftBoxText || !!item.leftBoxImage) {\n <span style=\"background-image: url({{item.leftBoxImage}})\"\n class=\"avatar avatar-xs rounded me-2\">{{ item.leftBoxText }}</span>\n }\n\n <span [ngClass]=\"overflowClass\">\n {{ textService.getText(item.text) }}\n </span>\n\n @if ((item.actionButtons?.length || 0) > 0) {\n <div class=\"ms-auto d-flex\" [class.btn-group]=\"item.toolbarType === 'grouped'\"\n [class.gap-1]=\"item.toolbarType === 'spaced'\">\n @for (btn of item.actionButtons; track btn) {\n <upd-button [model]=\"adaptAction(btn, item)\"></upd-button>\n }\n </div>\n }\n\n @if (!!item.badgeColor) {\n <span class=\"badge bg-{{item.badgeColor}} ms-auto\">{{ item.badgeText }}</span>\n }\n </div>\n }\n }\n}\n\n<ng-content></ng-content>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { UpdIconsModule } from '@updevs/icons';\nimport { UpdButtonModule } from '@updevs/components/button';\nimport { UpdRadioModule } from '@updevs/components/form-controls/radio';\nimport { UpdCheckboxModule } from '@updevs/components/form-controls/checkbox';\n\nimport { DropdownComponent } from './dropdown.component';\n\n@NgModule({\n imports: [\n CommonModule,\n UpdIconsModule,\n UpdRadioModule,\n UpdCheckboxModule,\n UpdButtonModule\n ],\n declarations: [\n DropdownComponent\n ],\n exports: [\n DropdownComponent\n ]\n})\nexport class UpdDropdownModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AA4BM,MAAO,iBAAkB,SAAQ,aAAa,CAAA;IAMhD,IACI,MAAM,CAAC,KAAc,EAAA;AACrB,QAAA,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;AAE5B,QAAA,IAAI,IAAI,CAAC,yBAAyB,EAAE;YAChC,IAAI,CAAC,mBAAmB,EAAE,CAAC;SAC9B;KACJ;AA6CD,IAAA,IAAI,MAAM,GAAA;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;KACvB;AAED,IAAA,IAAI,aAAa,GAAA;AACb,QAAA,QAAQ,IAAI,CAAC,oBAAoB,EAAE;AAC/B,YAAA,KAAK,SAAS;AACV,gBAAA,OAAO,aAAa,CAAC;AACzB,YAAA,KAAK,MAAM;AACP,gBAAA,OAAO,WAAW,CAAC;AACvB,YAAA,KAAK,YAAY;AACb,gBAAA,OAAO,YAAY,CAAC;AACxB,YAAA;AACI,gBAAA,OAAO,eAAe,CAAC;SAC9B;KACJ;AAWD,IAAA,WAAA,GAAA;AACI,QAAA,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c;YACd,cAAc;YACd,iBAAiB;YACjB,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;2FASV,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAf7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,cAAc;wBACd,cAAc;wBACd,iBAAiB;wBACjB,eAAe;AAClB,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACV,iBAAiB;AACpB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,iBAAiB;AACpB,qBAAA;AACJ,iBAAA,CAAA;;;ACvBD;;AAEG;;;;"}
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { input, inject, Directive } from '@angular/core';
|
|
3
3
|
import { TextService } from '@updevs/sdk';
|
|
4
|
+
import { Tools } from '@updevs/sdk/core';
|
|
4
5
|
import { BaseComponent } from '@updevs/sdk/layout';
|
|
5
6
|
|
|
6
7
|
class BaseControl extends BaseComponent {
|
|
7
8
|
constructor() {
|
|
8
9
|
super(...arguments);
|
|
10
|
+
this.name = input(Tools.Guid.generate());
|
|
9
11
|
this.placeholder = input();
|
|
10
12
|
this.label = input();
|
|
11
13
|
this.description = input();
|
|
12
14
|
this.validationStatusDescriptions = input([]);
|
|
15
|
+
this.labelColSize = input();
|
|
16
|
+
this.showValidStatus = input(false);
|
|
17
|
+
this.isRequired = input(false);
|
|
18
|
+
this.isDisabled = input(false);
|
|
13
19
|
this.hint = input();
|
|
14
20
|
this.hintTemplate = input();
|
|
15
21
|
this.hintAsTooltip = input(false);
|
|
@@ -32,7 +38,7 @@ class BaseControl extends BaseComponent {
|
|
|
32
38
|
return this._textService.getText(this.hint());
|
|
33
39
|
}
|
|
34
40
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: BaseControl, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
35
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.1.0", type: BaseControl, inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, validationStatusDescriptions: { classPropertyName: "validationStatusDescriptions", publicName: "validationStatusDescriptions", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, hintTemplate: { classPropertyName: "hintTemplate", publicName: "hintTemplate", isSignal: true, isRequired: false, transformFunction: null }, hintAsTooltip: { classPropertyName: "hintAsTooltip", publicName: "hintAsTooltip", isSignal: true, isRequired: false, transformFunction: null }, validationStatus: { classPropertyName: "validationStatus", publicName: "validationStatus", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
|
|
41
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.1.0", type: BaseControl, inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, validationStatusDescriptions: { classPropertyName: "validationStatusDescriptions", publicName: "validationStatusDescriptions", isSignal: true, isRequired: false, transformFunction: null }, labelColSize: { classPropertyName: "labelColSize", publicName: "labelColSize", isSignal: true, isRequired: false, transformFunction: null }, showValidStatus: { classPropertyName: "showValidStatus", publicName: "showValidStatus", isSignal: true, isRequired: false, transformFunction: null }, isRequired: { classPropertyName: "isRequired", publicName: "isRequired", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, hintTemplate: { classPropertyName: "hintTemplate", publicName: "hintTemplate", isSignal: true, isRequired: false, transformFunction: null }, hintAsTooltip: { classPropertyName: "hintAsTooltip", publicName: "hintAsTooltip", isSignal: true, isRequired: false, transformFunction: null }, validationStatus: { classPropertyName: "validationStatus", publicName: "validationStatus", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0 }); }
|
|
36
42
|
}
|
|
37
43
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: BaseControl, decorators: [{
|
|
38
44
|
type: Directive,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updevs-components-form-controls-abstractions.mjs","sources":["../../../../libs/components/form-controls/abstractions/src/base-control.ts","../../../../libs/components/form-controls/abstractions/src/updevs-components-form-controls-abstractions.ts"],"sourcesContent":["import { Directive, inject, TemplateRef, input } from '@angular/core';\nimport { TextModel, TextService } from '@updevs/sdk';\nimport { BaseComponent } from '@updevs/sdk/layout';\nimport { ValidationStatusType } from '@updevs/components';\n\n@Directive({})\nexport abstract class BaseControl extends BaseComponent {\n placeholder = input<TextModel>();\n label = input<TextModel>();\n description = input<TextModel>();\n validationStatusDescriptions = input<TextModel[]>([]);\n hint = input<TextModel>();\n hintTemplate = input<TemplateRef<any>>();\n hintAsTooltip = input(false);\n validationStatus = input<ValidationStatusType>();\n\n get placeholderText(): string {\n return this._textService.getText(this.placeholder());\n }\n get labelText(): string {\n return this._textService.getText(this.label());\n }\n get descriptionText(): string {\n return this._textService.getText(this.description());\n }\n get validationStatusTexts(): string[] {\n return this.validationStatusDescriptions().map(desc => this._textService.getText(desc));\n }\n get hintText(): string {\n return this._textService.getText(this.hint());\n }\n\n protected readonly _textService = inject(TextService);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"updevs-components-form-controls-abstractions.mjs","sources":["../../../../libs/components/form-controls/abstractions/src/base-control.ts","../../../../libs/components/form-controls/abstractions/src/updevs-components-form-controls-abstractions.ts"],"sourcesContent":["import { Directive, inject, TemplateRef, input } from '@angular/core';\nimport { TextModel, TextService } from '@updevs/sdk';\nimport { Tools } from '@updevs/sdk/core';\nimport { BaseComponent } from '@updevs/sdk/layout';\nimport { RowColumnSize, ValidationStatusType } from '@updevs/components';\n\n@Directive({})\nexport abstract class BaseControl extends BaseComponent {\n readonly name = input<string>(Tools.Guid.generate());\n readonly placeholder = input<TextModel>();\n readonly label = input<TextModel>();\n readonly description = input<TextModel>();\n readonly validationStatusDescriptions = input<TextModel[]>([]);\n readonly labelColSize = input<RowColumnSize>();\n readonly showValidStatus = input(false);\n readonly isRequired = input(false);\n readonly isDisabled = input(false);\n readonly hint = input<TextModel>();\n readonly hintTemplate = input<TemplateRef<any>>();\n readonly hintAsTooltip = input(false);\n readonly validationStatus = input<ValidationStatusType>();\n\n get placeholderText(): string {\n return this._textService.getText(this.placeholder());\n }\n\n get labelText(): string {\n return this._textService.getText(this.label());\n }\n\n get descriptionText(): string {\n return this._textService.getText(this.description());\n }\n\n get validationStatusTexts(): string[] {\n return this.validationStatusDescriptions().map(desc => this._textService.getText(desc));\n }\n\n get hintText(): string {\n return this._textService.getText(this.hint());\n }\n\n protected readonly _textService = inject(TextService);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAOM,MAAgB,WAAY,SAAQ,aAAa,CAAA;AADvD,IAAA,WAAA,GAAA;;QAEa,IAAI,CAAA,IAAA,GAAG,KAAK,CAAS,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC5C,IAAW,CAAA,WAAA,GAAG,KAAK,EAAa,CAAC;QACjC,IAAK,CAAA,KAAA,GAAG,KAAK,EAAa,CAAC;Q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A,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,YAAA,EAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,UAAA,EAAA,cAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,aAAA,EAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,UAAA,EAAA,eAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,gBAAA,EAAA,EAAA,iBAAA,EAAA,kBAAA,EAAA,UAAA,EAAA,kBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA,EAAA;;2FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBADhC,SAAS;mBAAC,EAAE,CAAA;;;ACNb;;AAEG;;;;"}
|
|
@@ -15,8 +15,6 @@ class CheckboxComponent extends BaseControl {
|
|
|
15
15
|
this.changed = new EventEmitter();
|
|
16
16
|
this.value = input();
|
|
17
17
|
this.customClasses = input();
|
|
18
|
-
this.name = input();
|
|
19
|
-
this.isDisabled = input(false);
|
|
20
18
|
this.isChecked = model(false);
|
|
21
19
|
this.isInline = input(false);
|
|
22
20
|
this.isSwitch = input(false);
|
|
@@ -38,7 +36,7 @@ class CheckboxComponent extends BaseControl {
|
|
|
38
36
|
this.changed.emit(event.target.checked);
|
|
39
37
|
}
|
|
40
38
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
41
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: CheckboxComponent, selector: "upd-checkbox", inputs: { wrapperClasses: { classPropertyName: "wrapperClasses", publicName: "wrapperClasses", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, customClasses: { classPropertyName: "customClasses", publicName: "customClasses", isSignal: true, isRequired: false, transformFunction: null },
|
|
39
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: CheckboxComponent, selector: "upd-checkbox", inputs: { wrapperClasses: { classPropertyName: "wrapperClasses", publicName: "wrapperClasses", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, customClasses: { classPropertyName: "customClasses", publicName: "customClasses", isSignal: true, isRequired: false, transformFunction: null }, isChecked: { classPropertyName: "isChecked", publicName: "isChecked", isSignal: true, isRequired: false, transformFunction: null }, isInline: { classPropertyName: "isInline", publicName: "isInline", isSignal: true, isRequired: false, transformFunction: null }, isSwitch: { classPropertyName: "isSwitch", publicName: "isSwitch", isSignal: true, isRequired: false, transformFunction: null }, isIndeterminate: { classPropertyName: "isIndeterminate", publicName: "isIndeterminate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed", isChecked: "isCheckedChange", isIndeterminate: "isIndeterminateChange" }, host: { properties: { "class": "this.wrapperClasses" } }, viewQueries: [{ propertyName: "checkboxInput", first: true, predicate: ["checkboxInput"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<label class=\"form-check\" [class.form-check-inline]=\"isInline()\" [class.form-switch]=\"isSwitch()\" [ngClass]=\"customClasses()\">\n @if (!!hintText || !!hintTemplate()) {\n <div class=\"row g-2\">\n <div class=\"col-auto\">\n <ng-template [ngTemplateOutlet]=\"contentTpl\"></ng-template>\n </div>\n <div class=\"col-auto align-self-center\">\n <span class=\"form-help\" [updPopover]=\"hintText\" [updPopoverTemplate]=\"hintTemplate()\"\n [updPopoverActAsTooltip]=\"hintAsTooltip()\">\n ?\n </span>\n </div>\n </div>\n } @else {\n <ng-template [ngTemplateOutlet]=\"contentTpl\"></ng-template>\n }\n</label>\n\n<ng-template #contentTpl>\n <input #checkboxInput type=\"checkbox\" [disabled]=\"isDisabled()\" [ngClass]=\"classes()\" [value]=\"value()\" [attr.name]=\"name()\"\n [attr.readonly]=\"isDisabled() ? '' : undefined\" [(ngModel)]=\"isChecked\" (change)=\"onSelectChange($event)\">\n\n @if (!!labelText) {\n <span class=\"form-check-label\">{{ labelText }}</span>\n }\n\n @if (!!descriptionText) {\n <span class=\"form-check-description\">{{ descriptionText }}</span>\n }\n\n @if (validationStatus() === 'invalid' && !!validationStatusTexts) {\n <div class=\"invalid-feedback\">{{ validationStatusTexts }}</div>\n }\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { 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: "directive", type: i3.PopoverDirective, selector: "[updPopover]", inputs: ["updPopover", "updPopoverTitle", "updPopoverTitleTemplate", "updPopoverTemplate", "updPopoverPlacement", "updPopoverCustomClasses", "updPopoverActAsTooltip"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
42
40
|
}
|
|
43
41
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
44
42
|
type: Component,
|