osl-base-extended 25.1.1 → 26.1.1
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.
|
@@ -2058,11 +2058,11 @@ class OslSelect {
|
|
|
2058
2058
|
return this.model !== null && this.model !== undefined && this.model !== '';
|
|
2059
2059
|
}
|
|
2060
2060
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OslSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2061
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: OslSelect, isStandalone: false, selector: "osl-select", inputs: { label: "label", required: "required", disabled: "disabled", model: "model", datasource: "datasource", displayField: "displayField", valueField: "valueField", placeholder: "placeholder", loading: "loading", clearable: "clearable", skeletonLoading: "skeletonLoading", skeletonTheme: "skeletonTheme" }, outputs: { modelChange: "modelChange", changeEv: "changeEv" }, ngImport: i0, template: "<div class=\"d-flex flex-column\">\r\n @if (label) {\r\n <div [oslSkeleton]=\"skeletonLoading\" [oslSkeletonTheme]=\"skeletonTheme\">\r\n <label class=\"label\" [class.txt-clr-red]=\"myField.touched && myField.invalid\">\r\n <span class=\"label-text\" [title]=\"label\">{{label}}</span><span class=\"txt-clr-red label-required\">{{required?'*':''}}</span>\r\n </label>\r\n \r\n </div>\r\n\r\n }\r\n\r\n <div class=\"select-wrapper\" [oslSkeleton]=\"skeletonLoading\" [oslSkeletonTheme]=\"skeletonTheme\" [class.error]=\"myField.touched && myField.invalid\" [class.select-disabled]=\"disabled || loading\">\r\n @if(loading) {\r\n <span class=\"select-spinner\"></span>\r\n }\r\n <select\r\n [ngModel]=\"model\"\r\n (ngModelChange)=\"onModelChange($event)\"\r\n (change)=\"onChange()\"\r\n [required]=\"required\"\r\n [disabled]=\"disabled || loading\"\r\n #myField=\"ngModel\"\r\n >\r\n <option value=\"\" [disabled]=\"required\" [hidden]=\"required\" selected>Select..</option>\r\n @for(item of datasource; track
|
|
2061
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: OslSelect, isStandalone: false, selector: "osl-select", inputs: { label: "label", required: "required", disabled: "disabled", model: "model", datasource: "datasource", displayField: "displayField", valueField: "valueField", placeholder: "placeholder", loading: "loading", clearable: "clearable", skeletonLoading: "skeletonLoading", skeletonTheme: "skeletonTheme" }, outputs: { modelChange: "modelChange", changeEv: "changeEv" }, ngImport: i0, template: "<div class=\"d-flex flex-column\">\r\n @if (label) {\r\n <div [oslSkeleton]=\"skeletonLoading\" [oslSkeletonTheme]=\"skeletonTheme\">\r\n <label class=\"label\" [class.txt-clr-red]=\"myField.touched && myField.invalid\">\r\n <span class=\"label-text\" [title]=\"label\">{{label}}</span><span class=\"txt-clr-red label-required\">{{required?'*':''}}</span>\r\n </label>\r\n \r\n </div>\r\n\r\n }\r\n\r\n <div class=\"select-wrapper\" [oslSkeleton]=\"skeletonLoading\" [oslSkeletonTheme]=\"skeletonTheme\" [class.error]=\"myField.touched && myField.invalid\" [class.select-disabled]=\"disabled || loading\">\r\n @if(loading) {\r\n <span class=\"select-spinner\"></span>\r\n }\r\n <select\r\n [ngModel]=\"model\"\r\n (ngModelChange)=\"onModelChange($event)\"\r\n (change)=\"onChange()\"\r\n [required]=\"required\"\r\n [disabled]=\"disabled || loading\"\r\n #myField=\"ngModel\"\r\n >\r\n <option value=\"\" [disabled]=\"required\" [hidden]=\"required\" selected>Select..</option>\r\n @for(item of datasource; track $index) {\r\n <option [value]=\"getValue(item)\">{{getDisplay(item)}}</option>\r\n }\r\n </select>\r\n @if(clearable && hasValue && !disabled && !loading) {\r\n <button type=\"button\" class=\"select-clear\" (click)=\"onClear($event)\" title=\"Clear\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n <mat-icon class=\"select-arrow\">expand_more</mat-icon>\r\n </div>\r\n\r\n @if(myField.touched && myField.invalid && required) {\r\n <mat-hint class=\"hint\">{{label}} is Required!</mat-hint>\r\n }\r\n</div>\r\n", styles: [".label{font-size:var(--osl-label-font-size);margin-bottom:var(--osl-label-gap, 3px);display:flex;align-items:center;overflow:hidden}.label-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.label-required{flex-shrink:0}.select-wrapper{position:relative;display:flex;align-items:center;height:var(--osl-control-height);width:100%;border-radius:var(--osl-border-radius);border:1px solid var(--osl-border-color);transition:border-color .5s}.select-wrapper:focus-within{border-color:var(--osl-focus-border-color)}.select-wrapper.error{border-color:var(--osl-error-color)}.select-wrapper.select-disabled{background:#f5f5f5;opacity:.7;cursor:not-allowed}.select-wrapper select{flex:1;height:100%;width:100%;font-size:var(--osl-text-font-size);border:none;outline:none;background:transparent;padding:0 32px 0 8px;cursor:pointer;appearance:none;-webkit-appearance:none}.select-wrapper select:disabled{cursor:not-allowed}.select-arrow{position:absolute;right:6px;font-size:18px;width:18px;height:18px;color:#888;pointer-events:none;-webkit-user-select:none;user-select:none}.select-clear{display:flex;align-items:center;justify-content:center;position:absolute;right:28px;background:none;border:none;padding:0;cursor:pointer;color:#aaa;z-index:1}.select-clear mat-icon{font-size:16px;width:16px;height:16px}.select-clear:hover{color:#333}.select-spinner{position:absolute;left:8px;width:14px;height:14px;border:2px solid var(--osl-border-color);border-top-color:var(--osl-focus-border-color);border-radius:50%;animation:select-spin .7s linear infinite;pointer-events:none}@keyframes select-spin{to{transform:rotate(360deg)}}.hint{color:var(--osl-error-color);margin-top:2px;font-size:var(--osl-hint-font-size)}.txt-clr-red{color:var(--osl-error-color)}\n"], dependencies: [{ kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: OslSkeletonDirective, selector: "[oslSkeleton]", inputs: ["oslSkeleton", "oslSkeletonType", "oslSkeletonAnimation", "oslSkeletonTheme", "oslSkeletonColor", "oslSkeletonHighlight", "oslSkeletonRadius", "oslSkeletonRows", "oslSkeletonRowGap", "oslSkeletonZIndex", "oslSkeletonDelay", "oslSkeletonDuration", "oslSkeletonMinHeight", "oslSkeletonForceReread", "oslSkeletonCircleSize", "oslSkeletonListItems", "oslSkeletonTableRows", "oslSkeletonTableCols", "oslSkeletonCardLines", "oslSkeletonBgColor"] }] });
|
|
2062
2062
|
}
|
|
2063
2063
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OslSelect, decorators: [{
|
|
2064
2064
|
type: Component,
|
|
2065
|
-
args: [{ selector: 'osl-select', standalone: false, template: "<div class=\"d-flex flex-column\">\r\n @if (label) {\r\n <div [oslSkeleton]=\"skeletonLoading\" [oslSkeletonTheme]=\"skeletonTheme\">\r\n <label class=\"label\" [class.txt-clr-red]=\"myField.touched && myField.invalid\">\r\n <span class=\"label-text\" [title]=\"label\">{{label}}</span><span class=\"txt-clr-red label-required\">{{required?'*':''}}</span>\r\n </label>\r\n \r\n </div>\r\n\r\n }\r\n\r\n <div class=\"select-wrapper\" [oslSkeleton]=\"skeletonLoading\" [oslSkeletonTheme]=\"skeletonTheme\" [class.error]=\"myField.touched && myField.invalid\" [class.select-disabled]=\"disabled || loading\">\r\n @if(loading) {\r\n <span class=\"select-spinner\"></span>\r\n }\r\n <select\r\n [ngModel]=\"model\"\r\n (ngModelChange)=\"onModelChange($event)\"\r\n (change)=\"onChange()\"\r\n [required]=\"required\"\r\n [disabled]=\"disabled || loading\"\r\n #myField=\"ngModel\"\r\n >\r\n <option value=\"\" [disabled]=\"required\" [hidden]=\"required\" selected>Select..</option>\r\n @for(item of datasource; track
|
|
2065
|
+
args: [{ selector: 'osl-select', standalone: false, template: "<div class=\"d-flex flex-column\">\r\n @if (label) {\r\n <div [oslSkeleton]=\"skeletonLoading\" [oslSkeletonTheme]=\"skeletonTheme\">\r\n <label class=\"label\" [class.txt-clr-red]=\"myField.touched && myField.invalid\">\r\n <span class=\"label-text\" [title]=\"label\">{{label}}</span><span class=\"txt-clr-red label-required\">{{required?'*':''}}</span>\r\n </label>\r\n \r\n </div>\r\n\r\n }\r\n\r\n <div class=\"select-wrapper\" [oslSkeleton]=\"skeletonLoading\" [oslSkeletonTheme]=\"skeletonTheme\" [class.error]=\"myField.touched && myField.invalid\" [class.select-disabled]=\"disabled || loading\">\r\n @if(loading) {\r\n <span class=\"select-spinner\"></span>\r\n }\r\n <select\r\n [ngModel]=\"model\"\r\n (ngModelChange)=\"onModelChange($event)\"\r\n (change)=\"onChange()\"\r\n [required]=\"required\"\r\n [disabled]=\"disabled || loading\"\r\n #myField=\"ngModel\"\r\n >\r\n <option value=\"\" [disabled]=\"required\" [hidden]=\"required\" selected>Select..</option>\r\n @for(item of datasource; track $index) {\r\n <option [value]=\"getValue(item)\">{{getDisplay(item)}}</option>\r\n }\r\n </select>\r\n @if(clearable && hasValue && !disabled && !loading) {\r\n <button type=\"button\" class=\"select-clear\" (click)=\"onClear($event)\" title=\"Clear\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n }\r\n <mat-icon class=\"select-arrow\">expand_more</mat-icon>\r\n </div>\r\n\r\n @if(myField.touched && myField.invalid && required) {\r\n <mat-hint class=\"hint\">{{label}} is Required!</mat-hint>\r\n }\r\n</div>\r\n", styles: [".label{font-size:var(--osl-label-font-size);margin-bottom:var(--osl-label-gap, 3px);display:flex;align-items:center;overflow:hidden}.label-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.label-required{flex-shrink:0}.select-wrapper{position:relative;display:flex;align-items:center;height:var(--osl-control-height);width:100%;border-radius:var(--osl-border-radius);border:1px solid var(--osl-border-color);transition:border-color .5s}.select-wrapper:focus-within{border-color:var(--osl-focus-border-color)}.select-wrapper.error{border-color:var(--osl-error-color)}.select-wrapper.select-disabled{background:#f5f5f5;opacity:.7;cursor:not-allowed}.select-wrapper select{flex:1;height:100%;width:100%;font-size:var(--osl-text-font-size);border:none;outline:none;background:transparent;padding:0 32px 0 8px;cursor:pointer;appearance:none;-webkit-appearance:none}.select-wrapper select:disabled{cursor:not-allowed}.select-arrow{position:absolute;right:6px;font-size:18px;width:18px;height:18px;color:#888;pointer-events:none;-webkit-user-select:none;user-select:none}.select-clear{display:flex;align-items:center;justify-content:center;position:absolute;right:28px;background:none;border:none;padding:0;cursor:pointer;color:#aaa;z-index:1}.select-clear mat-icon{font-size:16px;width:16px;height:16px}.select-clear:hover{color:#333}.select-spinner{position:absolute;left:8px;width:14px;height:14px;border:2px solid var(--osl-border-color);border-top-color:var(--osl-focus-border-color);border-radius:50%;animation:select-spin .7s linear infinite;pointer-events:none}@keyframes select-spin{to{transform:rotate(360deg)}}.hint{color:var(--osl-error-color);margin-top:2px;font-size:var(--osl-hint-font-size)}.txt-clr-red{color:var(--osl-error-color)}\n"] }]
|
|
2066
2066
|
}], propDecorators: { label: [{
|
|
2067
2067
|
type: Input,
|
|
2068
2068
|
args: ['label']
|
|
@@ -2135,11 +2135,11 @@ class OslRadio {
|
|
|
2135
2135
|
this.changeEv.emit(this.model);
|
|
2136
2136
|
}
|
|
2137
2137
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OslRadio, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2138
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: OslRadio, isStandalone: false, selector: "osl-radio", inputs: { label: "label", required: "required", disabled: "disabled", model: "model", datasource: "datasource", displayField: "displayField", valueField: "valueField", inline: "inline", skeletonLoading: "skeletonLoading", skeletonTheme: "skeletonTheme" }, outputs: { modelChange: "modelChange", changeEv: "changeEv" }, ngImport: i0, template: "<div class=\"d-flex flex-column\">\r\n @if(label){\r\n <div [oslSkeleton]=\"skeletonLoading\" [oslSkeletonTheme]=\"skeletonTheme\">\r\n <label class=\"label\"><span class=\"label-text\" [title]=\"label\">{{label}}</span><span class=\"txt-clr-red label-required\">{{required?'*':''}}</span></label>\r\n \r\n </div>\r\n\r\n }\r\n <div class=\"radio-group\" [oslSkeleton]=\"skeletonLoading\" [oslSkeletonTheme]=\"skeletonTheme\" [class.radio-inline]=\"inline\">\r\n @for(item of datasource; track
|
|
2138
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: OslRadio, isStandalone: false, selector: "osl-radio", inputs: { label: "label", required: "required", disabled: "disabled", model: "model", datasource: "datasource", displayField: "displayField", valueField: "valueField", inline: "inline", skeletonLoading: "skeletonLoading", skeletonTheme: "skeletonTheme" }, outputs: { modelChange: "modelChange", changeEv: "changeEv" }, ngImport: i0, template: "<div class=\"d-flex flex-column\">\r\n @if(label){\r\n <div [oslSkeleton]=\"skeletonLoading\" [oslSkeletonTheme]=\"skeletonTheme\">\r\n <label class=\"label\"><span class=\"label-text\" [title]=\"label\">{{label}}</span><span class=\"txt-clr-red label-required\">{{required?'*':''}}</span></label>\r\n \r\n </div>\r\n\r\n }\r\n <div class=\"radio-group\" [oslSkeleton]=\"skeletonLoading\" [oslSkeletonTheme]=\"skeletonTheme\" [class.radio-inline]=\"inline\">\r\n @for(item of datasource; track $index) {\r\n <label class=\"radio-item\" [class.disabled]=\"disabled\">\r\n <input\r\n type=\"radio\"\r\n [name]=\"groupName\"\r\n [checked]=\"isChecked(item)\"\r\n [disabled]=\"disabled\"\r\n (change)=\"onSelect(item)\"\r\n >\r\n <span>{{getDisplay(item)}}</span>\r\n </label>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".label{font-size:var(--osl-label-font-size);margin-bottom:var(--osl-label-gap, 3px);display:flex;align-items:center;overflow:hidden}.label-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.label-required{flex-shrink:0}.radio-group{display:flex;gap:10px;padding:4px 0}.radio-group.radio-inline{flex-direction:row;flex-wrap:wrap;gap:16px}.radio-item{display:flex;align-items:center;gap:6px;font-size:var(--osl-text-font-size);cursor:pointer}.radio-item input[type=radio]{width:15px;height:15px;cursor:pointer;accent-color:#333;flex-shrink:0}.radio-item.disabled{opacity:.6;cursor:not-allowed}.radio-item.disabled input[type=radio]{cursor:not-allowed}.txt-clr-red{color:var(--osl-error-color)}\n"], dependencies: [{ kind: "directive", type: OslSkeletonDirective, selector: "[oslSkeleton]", inputs: ["oslSkeleton", "oslSkeletonType", "oslSkeletonAnimation", "oslSkeletonTheme", "oslSkeletonColor", "oslSkeletonHighlight", "oslSkeletonRadius", "oslSkeletonRows", "oslSkeletonRowGap", "oslSkeletonZIndex", "oslSkeletonDelay", "oslSkeletonDuration", "oslSkeletonMinHeight", "oslSkeletonForceReread", "oslSkeletonCircleSize", "oslSkeletonListItems", "oslSkeletonTableRows", "oslSkeletonTableCols", "oslSkeletonCardLines", "oslSkeletonBgColor"] }] });
|
|
2139
2139
|
}
|
|
2140
2140
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OslRadio, decorators: [{
|
|
2141
2141
|
type: Component,
|
|
2142
|
-
args: [{ selector: 'osl-radio', standalone: false, template: "<div class=\"d-flex flex-column\">\r\n @if(label){\r\n <div [oslSkeleton]=\"skeletonLoading\" [oslSkeletonTheme]=\"skeletonTheme\">\r\n <label class=\"label\"><span class=\"label-text\" [title]=\"label\">{{label}}</span><span class=\"txt-clr-red label-required\">{{required?'*':''}}</span></label>\r\n \r\n </div>\r\n\r\n }\r\n <div class=\"radio-group\" [oslSkeleton]=\"skeletonLoading\" [oslSkeletonTheme]=\"skeletonTheme\" [class.radio-inline]=\"inline\">\r\n @for(item of datasource; track
|
|
2142
|
+
args: [{ selector: 'osl-radio', standalone: false, template: "<div class=\"d-flex flex-column\">\r\n @if(label){\r\n <div [oslSkeleton]=\"skeletonLoading\" [oslSkeletonTheme]=\"skeletonTheme\">\r\n <label class=\"label\"><span class=\"label-text\" [title]=\"label\">{{label}}</span><span class=\"txt-clr-red label-required\">{{required?'*':''}}</span></label>\r\n \r\n </div>\r\n\r\n }\r\n <div class=\"radio-group\" [oslSkeleton]=\"skeletonLoading\" [oslSkeletonTheme]=\"skeletonTheme\" [class.radio-inline]=\"inline\">\r\n @for(item of datasource; track $index) {\r\n <label class=\"radio-item\" [class.disabled]=\"disabled\">\r\n <input\r\n type=\"radio\"\r\n [name]=\"groupName\"\r\n [checked]=\"isChecked(item)\"\r\n [disabled]=\"disabled\"\r\n (change)=\"onSelect(item)\"\r\n >\r\n <span>{{getDisplay(item)}}</span>\r\n </label>\r\n }\r\n </div>\r\n</div>\r\n", styles: [".label{font-size:var(--osl-label-font-size);margin-bottom:var(--osl-label-gap, 3px);display:flex;align-items:center;overflow:hidden}.label-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.label-required{flex-shrink:0}.radio-group{display:flex;gap:10px;padding:4px 0}.radio-group.radio-inline{flex-direction:row;flex-wrap:wrap;gap:16px}.radio-item{display:flex;align-items:center;gap:6px;font-size:var(--osl-text-font-size);cursor:pointer}.radio-item input[type=radio]{width:15px;height:15px;cursor:pointer;accent-color:#333;flex-shrink:0}.radio-item.disabled{opacity:.6;cursor:not-allowed}.radio-item.disabled input[type=radio]{cursor:not-allowed}.txt-clr-red{color:var(--osl-error-color)}\n"] }]
|
|
2143
2143
|
}], propDecorators: { label: [{
|
|
2144
2144
|
type: Input,
|
|
2145
2145
|
args: ['label']
|
|
@@ -4136,12 +4136,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
4136
4136
|
/**
|
|
4137
4137
|
* Returns `prev` when `next` holds the same items in the same order, so a callback that
|
|
4138
4138
|
* filters into a new array each change-detection cycle doesn't re-trigger child inputs.
|
|
4139
|
+
* Items match when they are the same reference or shallow-equal objects, so callbacks
|
|
4140
|
+
* that build fresh objects (`.map(x => ({ ...x }))`) also keep a stable reference.
|
|
4139
4141
|
*/
|
|
4140
4142
|
function stableArray(prev, next) {
|
|
4141
|
-
if (prev
|
|
4143
|
+
if (prev === next)
|
|
4144
|
+
return prev;
|
|
4145
|
+
if (prev && prev.length === next.length && prev.every((item, i) => shallowEqual(item, next[i])))
|
|
4142
4146
|
return prev;
|
|
4143
4147
|
return next;
|
|
4144
4148
|
}
|
|
4149
|
+
function shallowEqual(a, b) {
|
|
4150
|
+
if (a === b)
|
|
4151
|
+
return true;
|
|
4152
|
+
if (!a || !b || typeof a !== 'object' || typeof b !== 'object')
|
|
4153
|
+
return false;
|
|
4154
|
+
if (Array.isArray(a) !== Array.isArray(b))
|
|
4155
|
+
return false;
|
|
4156
|
+
const aKeys = Object.keys(a);
|
|
4157
|
+
const bKeys = Object.keys(b);
|
|
4158
|
+
if (aKeys.length !== bKeys.length)
|
|
4159
|
+
return false;
|
|
4160
|
+
return aKeys.every(k => Object.prototype.hasOwnProperty.call(b, k) && a[k] === b[k]);
|
|
4161
|
+
}
|
|
4145
4162
|
|
|
4146
4163
|
class OslSetupStateService {
|
|
4147
4164
|
_map = new Map();
|