@wavemaker/app-ng-runtime 11.7.4-rc.5640 → 11.7.5-1.5655
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.
- app-ng-runtime/build-task/bundles/index.umd.js +13 -1
- app-ng-runtime/build-task/esm2022/navigation/menu/menu.build.mjs +14 -2
- app-ng-runtime/build-task/fesm2022/index.mjs +13 -1
- app-ng-runtime/build-task/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/basic/default/audio/audio.component.d.ts +1 -0
- app-ng-runtime/components/basic/default/bundles/index.umd.js +5 -4
- app-ng-runtime/components/basic/default/esm2022/audio/audio.component.mjs +6 -5
- app-ng-runtime/components/basic/default/fesm2022/index.mjs +5 -4
- app-ng-runtime/components/basic/default/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/basic/progress/bundles/index.umd.js +3 -2
- app-ng-runtime/components/basic/progress/esm2022/progress-circle/progress-circle.component.mjs +4 -3
- app-ng-runtime/components/basic/progress/fesm2022/index.mjs +3 -2
- app-ng-runtime/components/basic/progress/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/basic/progress/progress-circle/progress-circle.component.d.ts +1 -0
- app-ng-runtime/components/data/form/bundles/index.umd.js +4 -3
- app-ng-runtime/components/data/form/esm2022/form-field/form-field.directive.mjs +1 -2
- app-ng-runtime/components/data/form/esm2022/live-form/live-form.directive.mjs +5 -3
- app-ng-runtime/components/data/form/fesm2022/index.mjs +4 -3
- app-ng-runtime/components/data/form/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/input/default/bundles/index.umd.js +43 -53
- app-ng-runtime/components/input/default/esm2022/caption-position.directive.mjs +2 -3
- app-ng-runtime/components/input/default/esm2022/select/select.component.mjs +44 -53
- app-ng-runtime/components/input/default/fesm2022/index.mjs +44 -54
- app-ng-runtime/components/input/default/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/input/default/select/select.component.d.ts +1 -2
- app-ng-runtime/components/input/epoch/bundles/index.umd.js +19 -7
- app-ng-runtime/components/input/epoch/date/date.component.d.ts +1 -0
- app-ng-runtime/components/input/epoch/esm2022/date/date.component.mjs +9 -3
- app-ng-runtime/components/input/epoch/esm2022/date/imaskUtil.mjs +8 -2
- app-ng-runtime/components/input/epoch/esm2022/date-time/date-time.component.mjs +3 -3
- app-ng-runtime/components/input/epoch/esm2022/time/time.component.mjs +3 -3
- app-ng-runtime/components/input/epoch/fesm2022/index.mjs +19 -7
- app-ng-runtime/components/input/epoch/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/package.json +1 -1
- app-ng-runtime/scripts/datatable/datatable.js +1 -0
|
@@ -9,7 +9,7 @@ import { IMaskDirective, IMaskModule } from 'angular-imask';
|
|
|
9
9
|
import * as i2 from '@wm/components/base';
|
|
10
10
|
import { register, PROP_STRING, PROP_ANY, PROP_BOOLEAN, PROP_NUMBER, DISPLAY_TYPE, StylableComponent, styler, provideAsWidgetRef, APPLY_STYLES_TYPE, WidgetConfig, registerFormWidget, provideAs, extractDataAsArray, ToDatePipe, ALLFIELDS, getOrderedDataset, convertDataToObject, transformDataWithKeys, transformFormData, getUniqObjsByDataField, groupData, handleHeaderClick, toggleAllHeaders, WidgetRef, INPUTMODE, WmComponentsModule } from '@wm/components/base';
|
|
11
11
|
import * as i1$1 from '@wm/core';
|
|
12
|
-
import { DataSource, FormWidgetType, isDefined, toggleClass, AppDefaults, debounce, $appDigest, noop, isEqualWithFields, toBoolean, setListClass, switchClass, addForIdAttributes, addClass, setAttr, removeAttr,
|
|
12
|
+
import { DataSource, FormWidgetType, isDefined, toggleClass, AppDefaults, debounce, $appDigest, noop, isEqualWithFields, toBoolean, setListClass, switchClass, addForIdAttributes, addClass, setAttr, removeAttr, setCSS } from '@wm/core';
|
|
13
13
|
import { Subject } from 'rxjs';
|
|
14
14
|
|
|
15
15
|
const registerProps$e = () => {
|
|
@@ -2064,51 +2064,45 @@ const registerProps$7 = () => {
|
|
|
2064
2064
|
};
|
|
2065
2065
|
|
|
2066
2066
|
const _c0$7 = ["select"];
|
|
2067
|
-
function SelectComponent_option_2_Template(rf, ctx) { if (rf & 1) {
|
|
2068
|
-
i0.ɵɵelement(0, "option", 4);
|
|
2069
|
-
} if (rf & 2) {
|
|
2070
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
2071
|
-
i0.ɵɵproperty("textContent", ctx_r1.placeholder)("hidden", !ctx_r1.placeholder);
|
|
2072
|
-
} }
|
|
2073
2067
|
function SelectComponent_ng_container_3_optgroup_1_option_1_Template(rf, ctx) { if (rf & 1) {
|
|
2074
|
-
i0.ɵɵelement(0, "option",
|
|
2068
|
+
i0.ɵɵelement(0, "option", 7);
|
|
2075
2069
|
} if (rf & 2) {
|
|
2076
|
-
const
|
|
2077
|
-
i0.ɵɵproperty("value",
|
|
2070
|
+
const item_r6 = ctx.$implicit;
|
|
2071
|
+
i0.ɵɵproperty("value", item_r6.key)("selected", item_r6.selected)("textContent", item_r6.label);
|
|
2078
2072
|
} }
|
|
2079
2073
|
function SelectComponent_ng_container_3_optgroup_1_Template(rf, ctx) { if (rf & 1) {
|
|
2080
|
-
i0.ɵɵelementStart(0, "optgroup",
|
|
2081
|
-
i0.ɵɵtemplate(1, SelectComponent_ng_container_3_optgroup_1_option_1_Template, 1, 3, "option",
|
|
2074
|
+
i0.ɵɵelementStart(0, "optgroup", 5);
|
|
2075
|
+
i0.ɵɵtemplate(1, SelectComponent_ng_container_3_optgroup_1_option_1_Template, 1, 3, "option", 6);
|
|
2082
2076
|
i0.ɵɵelementEnd();
|
|
2083
2077
|
} if (rf & 2) {
|
|
2084
|
-
const
|
|
2085
|
-
i0.ɵɵproperty("label",
|
|
2078
|
+
const groupObj_r4 = ctx.$implicit;
|
|
2079
|
+
i0.ɵɵproperty("label", groupObj_r4.key);
|
|
2086
2080
|
i0.ɵɵadvance(1);
|
|
2087
|
-
i0.ɵɵproperty("ngForOf",
|
|
2081
|
+
i0.ɵɵproperty("ngForOf", groupObj_r4.data);
|
|
2088
2082
|
} }
|
|
2089
2083
|
function SelectComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) {
|
|
2090
2084
|
i0.ɵɵelementContainerStart(0);
|
|
2091
|
-
i0.ɵɵtemplate(1, SelectComponent_ng_container_3_optgroup_1_Template, 2, 2, "optgroup",
|
|
2085
|
+
i0.ɵɵtemplate(1, SelectComponent_ng_container_3_optgroup_1_Template, 2, 2, "optgroup", 4);
|
|
2092
2086
|
i0.ɵɵelementContainerEnd();
|
|
2093
2087
|
} if (rf & 2) {
|
|
2094
|
-
const
|
|
2088
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
2095
2089
|
i0.ɵɵadvance(1);
|
|
2096
|
-
i0.ɵɵproperty("ngForOf",
|
|
2090
|
+
i0.ɵɵproperty("ngForOf", ctx_r1.groupedData);
|
|
2097
2091
|
} }
|
|
2098
2092
|
function SelectComponent_ng_container_4_option_1_Template(rf, ctx) { if (rf & 1) {
|
|
2099
|
-
i0.ɵɵelement(0, "option",
|
|
2093
|
+
i0.ɵɵelement(0, "option", 7);
|
|
2100
2094
|
} if (rf & 2) {
|
|
2101
|
-
const
|
|
2102
|
-
i0.ɵɵproperty("value",
|
|
2095
|
+
const item_r8 = ctx.$implicit;
|
|
2096
|
+
i0.ɵɵproperty("value", item_r8.key)("selected", item_r8.selected)("textContent", item_r8.label);
|
|
2103
2097
|
} }
|
|
2104
2098
|
function SelectComponent_ng_container_4_Template(rf, ctx) { if (rf & 1) {
|
|
2105
2099
|
i0.ɵɵelementContainerStart(0);
|
|
2106
|
-
i0.ɵɵtemplate(1, SelectComponent_ng_container_4_option_1_Template, 1, 3, "option",
|
|
2100
|
+
i0.ɵɵtemplate(1, SelectComponent_ng_container_4_option_1_Template, 1, 3, "option", 6);
|
|
2107
2101
|
i0.ɵɵelementContainerEnd();
|
|
2108
2102
|
} if (rf & 2) {
|
|
2109
|
-
const
|
|
2103
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
2110
2104
|
i0.ɵɵadvance(1);
|
|
2111
|
-
i0.ɵɵproperty("ngForOf",
|
|
2105
|
+
i0.ɵɵproperty("ngForOf", ctx_r2.datasetItems);
|
|
2112
2106
|
} }
|
|
2113
2107
|
const _c1$6 = function (a1) { return ["app-select form-control", a1]; };
|
|
2114
2108
|
const WIDGET_CONFIG$7 = { widgetType: 'wm-select', hostClass: 'app-select-wrapper' };
|
|
@@ -2127,9 +2121,6 @@ class SelectComponent extends DatasetAwareFormComponent {
|
|
|
2127
2121
|
ngAfterViewInit() {
|
|
2128
2122
|
super.ngAfterViewInit();
|
|
2129
2123
|
styler(this.selectEl.nativeElement, this);
|
|
2130
|
-
setTimeout(() => {
|
|
2131
|
-
this.checkForFloatingLabel(null);
|
|
2132
|
-
}, 10);
|
|
2133
2124
|
}
|
|
2134
2125
|
// Change event is registered from the template, Prevent the framework from registering one more event
|
|
2135
2126
|
handleEvent(node, eventName, eventCallback, locals) {
|
|
@@ -2176,16 +2167,6 @@ class SelectComponent extends DatasetAwareFormComponent {
|
|
|
2176
2167
|
}
|
|
2177
2168
|
super.onPropertyChange(key, nv, ov);
|
|
2178
2169
|
}
|
|
2179
|
-
isSafariBrowser() {
|
|
2180
|
-
var reg = {
|
|
2181
|
-
MAC: /Mac/i,
|
|
2182
|
-
MACINTEL: /MacIntel/i
|
|
2183
|
-
};
|
|
2184
|
-
return reg.MAC.test(window.navigator.platform) || reg.MACINTEL.test(window.navigator.platform);
|
|
2185
|
-
}
|
|
2186
|
-
isIosPlatform() {
|
|
2187
|
-
return isIos() || this.isSafariBrowser();
|
|
2188
|
-
}
|
|
2189
2170
|
/**
|
|
2190
2171
|
* When caption floating is enabled and placeholder is given, do not show placeholder until user focuses on the field
|
|
2191
2172
|
* When focused add the placeholder to the option which is selected
|
|
@@ -2195,23 +2176,33 @@ class SelectComponent extends DatasetAwareFormComponent {
|
|
|
2195
2176
|
checkForFloatingLabel($event) {
|
|
2196
2177
|
const captionEl = $(this.selectEl.nativeElement).closest('.app-composite-widget.caption-floating');
|
|
2197
2178
|
if (captionEl.length > 0) {
|
|
2198
|
-
if (
|
|
2199
|
-
if (
|
|
2200
|
-
this.
|
|
2179
|
+
if ($event.type === 'focus' && (!this.datavalue || (this.datavalue && $(this.selectEl).find('select option:selected').text() === '' && this.placeholder))) {
|
|
2180
|
+
if (!(this.datavalue || this.placeholder)) {
|
|
2181
|
+
this.removePlaceholderOption();
|
|
2201
2182
|
}
|
|
2202
|
-
|
|
2183
|
+
else {
|
|
2203
2184
|
$(this.selectEl.nativeElement).find('option:first').text(this.placeholder);
|
|
2204
2185
|
}
|
|
2205
2186
|
}
|
|
2206
2187
|
else if (!this.datavalue) {
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
if (!this.isIosPlatform()) {
|
|
2210
|
-
captionEl.removeClass('float-active');
|
|
2211
|
-
}
|
|
2212
|
-
}
|
|
2188
|
+
$(this.selectEl.nativeElement).find('option:selected').text('');
|
|
2189
|
+
captionEl.removeClass('float-active');
|
|
2213
2190
|
}
|
|
2214
2191
|
}
|
|
2192
|
+
else if (!(this.datavalue || this.placeholder)) {
|
|
2193
|
+
this.removePlaceholderOption();
|
|
2194
|
+
}
|
|
2195
|
+
}
|
|
2196
|
+
/*
|
|
2197
|
+
* Removing the placeholder option if no placeholder is provided.
|
|
2198
|
+
* In html we are hiding the placeholder option using css but in apple devices and safari option is showing.
|
|
2199
|
+
* */
|
|
2200
|
+
removePlaceholderOption() {
|
|
2201
|
+
const hiddenEle = $(this.selectEl.nativeElement).find('#placeholderOption');
|
|
2202
|
+
if (hiddenEle.length) {
|
|
2203
|
+
hiddenEle.remove();
|
|
2204
|
+
this.selectEl.nativeElement.value = '';
|
|
2205
|
+
}
|
|
2215
2206
|
}
|
|
2216
2207
|
static { this.ɵfac = function SelectComponent_Factory(t) { return new (t || SelectComponent)(i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i1$1.App)); }; }
|
|
2217
2208
|
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SelectComponent, selectors: [["wm-select"]], viewQuery: function SelectComponent_Query(rf, ctx) { if (rf & 1) {
|
|
@@ -2223,18 +2214,18 @@ class SelectComponent extends DatasetAwareFormComponent {
|
|
|
2223
2214
|
provideAs(SelectComponent, NG_VALUE_ACCESSOR, true),
|
|
2224
2215
|
provideAs(SelectComponent, NG_VALIDATORS, true),
|
|
2225
2216
|
provideAsWidgetRef(SelectComponent)
|
|
2226
|
-
]), i0.ɵɵInheritDefinitionFeature], decls: 5, vars:
|
|
2217
|
+
]), i0.ɵɵInheritDefinitionFeature], decls: 5, vars: 16, consts: [["role", "listbox", "aria-haspopup", "true", "aria-expanded", "false", "focus-target", "", 3, "ngClass", "disabled", "required", "tabindex", "ngModel", "multiple", "autofocus", "ngModelChange", "change", "focus", "blur"], ["select", ""], ["selected", "", "value", "undefined", "id", "placeholderOption", 3, "textContent", "hidden"], [4, "ngIf"], [3, "label", 4, "ngFor", "ngForOf"], [3, "label"], ["role", "option", 3, "value", "selected", "textContent", 4, "ngFor", "ngForOf"], ["role", "option", 3, "value", "selected", "textContent"]], template: function SelectComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2227
2218
|
i0.ɵɵelementStart(0, "select", 0, 1);
|
|
2228
2219
|
i0.ɵɵlistener("ngModelChange", function SelectComponent_Template_select_ngModelChange_0_listener($event) { return ctx.modelByKey = $event; })("change", function SelectComponent_Template_select_change_0_listener($event) { return ctx.onSelectValueChange($event); })("focus", function SelectComponent_Template_select_focus_0_listener($event) { return ctx.checkForFloatingLabel($event); })("blur", function SelectComponent_Template_select_blur_0_listener($event) { ctx.invokeOnTouched($event); return ctx.checkForFloatingLabel($event); });
|
|
2229
|
-
i0.ɵɵ
|
|
2220
|
+
i0.ɵɵelement(2, "option", 2);
|
|
2230
2221
|
i0.ɵɵtemplate(3, SelectComponent_ng_container_3_Template, 2, 1, "ng-container", 3);
|
|
2231
2222
|
i0.ɵɵtemplate(4, SelectComponent_ng_container_4_Template, 2, 1, "ng-container", 3);
|
|
2232
2223
|
i0.ɵɵelementEnd();
|
|
2233
2224
|
} if (rf & 2) {
|
|
2234
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
2225
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(14, _c1$6, ctx.class))("disabled", ctx.disabled)("required", ctx.required)("tabindex", ctx.tabindex)("ngModel", ctx.modelByKey)("multiple", ctx.multiple)("autofocus", ctx.autofocus);
|
|
2235
2226
|
i0.ɵɵattribute("name", ctx.name)("aria-label", ctx.hint)("aria-multiselectable", ctx.multiple);
|
|
2236
2227
|
i0.ɵɵadvance(2);
|
|
2237
|
-
i0.ɵɵproperty("
|
|
2228
|
+
i0.ɵɵproperty("textContent", ctx.placeholder)("hidden", !ctx.placeholder);
|
|
2238
2229
|
i0.ɵɵadvance(1);
|
|
2239
2230
|
i0.ɵɵproperty("ngIf", ctx.groupby);
|
|
2240
2231
|
i0.ɵɵadvance(1);
|
|
@@ -2247,7 +2238,7 @@ class SelectComponent extends DatasetAwareFormComponent {
|
|
|
2247
2238
|
provideAs(SelectComponent, NG_VALUE_ACCESSOR, true),
|
|
2248
2239
|
provideAs(SelectComponent, NG_VALIDATORS, true),
|
|
2249
2240
|
provideAsWidgetRef(SelectComponent)
|
|
2250
|
-
], template: "<select role=\"listbox\" aria-haspopup=\"true\" aria-expanded=\"false\" #select\n focus-target\n [ngClass]=\"['app-select form-control', class]\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [(ngModel)]=\"modelByKey\"\n [multiple]=\"multiple\"\n (change)=\"onSelectValueChange($event)\"\n (focus)=\"checkForFloatingLabel($event)\"\n (blur)=\"invokeOnTouched($event); checkForFloatingLabel($event)\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"hint\"\n [attr.aria-multiselectable]=\"multiple\"\n [autofocus]=\"autofocus\"\n
|
|
2241
|
+
], template: "<select role=\"listbox\" aria-haspopup=\"true\" aria-expanded=\"false\" #select\n focus-target\n [ngClass]=\"['app-select form-control', class]\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [tabindex]=\"tabindex\"\n [(ngModel)]=\"modelByKey\"\n [multiple]=\"multiple\"\n (change)=\"onSelectValueChange($event)\"\n (focus)=\"checkForFloatingLabel($event)\"\n (blur)=\"invokeOnTouched($event); checkForFloatingLabel($event)\"\n [attr.name]=\"name\"\n [attr.aria-label]=\"hint\"\n [attr.aria-multiselectable]=\"multiple\"\n [autofocus]=\"autofocus\">\n\n <option selected\n value=\"undefined\"\n [textContent]=\"placeholder\"\n id=\"placeholderOption\"\n [hidden]=\"!placeholder\"></option>\n\n <ng-container *ngIf=\"groupby\">\n <optgroup *ngFor=\"let groupObj of groupedData\"\n [label]=\"groupObj.key\">\n <option *ngFor=\"let item of groupObj.data;\"\n [value]=\"item.key\"\n [selected]=\"item.selected\"\n [textContent]=\"item.label\"\n role=\"option\"></option>\n </optgroup>\n </ng-container>\n\n <ng-container *ngIf=\"!groupby\">\n <option *ngFor=\"let item of datasetItems\"\n [value]=\"item.key\"\n [selected]=\"item.selected\"\n [textContent]=\"item.label\"\n role=\"option\"></option>\n </ng-container>\n</select>\n" }]
|
|
2251
2242
|
}], function () { return [{ type: i0.Injector }, { type: i1$1.App }]; }, { selectEl: [{
|
|
2252
2243
|
type: ViewChild,
|
|
2253
2244
|
args: ['select', { static: true, read: ElementRef }]
|
|
@@ -3133,8 +3124,7 @@ class CaptionPositionDirective {
|
|
|
3133
3124
|
// isSelectMultiple is set to true when for select widget, multiple option is enabled
|
|
3134
3125
|
// Checking inputEl focus - when form is represented as dialog and the first field is automatically in focus
|
|
3135
3126
|
const isInputElFocused = this.inputEl && this.inputEl.is(':focus');
|
|
3136
|
-
|
|
3137
|
-
if ((data.isSelect && localName == 'select') || data.displayVal || data.isFocused || data.isSelectMultiple || isInputElFocused) {
|
|
3127
|
+
if (data.displayVal || data.isFocused || data.isSelectMultiple || isInputElFocused) {
|
|
3138
3128
|
data.nativeEl.addClass('float-active');
|
|
3139
3129
|
if (!data.displayVal && isInputElFocused) {
|
|
3140
3130
|
this.inputEl.attr('placeholder', this.placeholder);
|