ngx-ode-ui 3.12.0-dev.4 → 3.12.0-dev.9
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/bundles/ngx-ode-ui.umd.js +106 -8
- package/bundles/ngx-ode-ui.umd.js.map +1 -1
- package/bundles/ngx-ode-ui.umd.min.js +2 -2
- package/bundles/ngx-ode-ui.umd.min.js.map +1 -1
- package/esm2015/lib/components/dropdown/dropdown.component.js +76 -0
- package/esm2015/lib/components/list/list.component.js +10 -3
- package/esm2015/lib/components/multi-combo/multi-combo.component.js +2 -2
- package/esm2015/lib/components/search-input/search-input.component.js +15 -3
- package/esm2015/lib/ngx-ode-ui.module.js +5 -2
- package/esm2015/ngx-ode-ui.js +2 -1
- package/esm5/lib/components/dropdown/dropdown.component.js +81 -0
- package/esm5/lib/components/list/list.component.js +10 -3
- package/esm5/lib/components/multi-combo/multi-combo.component.js +2 -2
- package/esm5/lib/components/search-input/search-input.component.js +16 -5
- package/esm5/lib/ngx-ode-ui.module.js +5 -2
- package/esm5/ngx-ode-ui.js +2 -1
- package/fesm2015/ngx-ode-ui.js +102 -7
- package/fesm2015/ngx-ode-ui.js.map +1 -1
- package/fesm5/ngx-ode-ui.js +106 -9
- package/fesm5/ngx-ode-ui.js.map +1 -1
- package/lib/components/dropdown/dropdown.component.d.ts +36 -0
- package/lib/components/list/list.component.d.ts +2 -0
- package/lib/components/search-input/search-input.component.d.ts +3 -0
- package/ngx-ode-ui.d.ts +1 -0
- package/ngx-ode-ui.metadata.json +1 -1
- package/package.json +1 -1
package/fesm5/ngx-ode-ui.js
CHANGED
|
@@ -1383,7 +1383,8 @@ var ListComponent = /** @class */ (function (_super) {
|
|
|
1383
1383
|
_this.model = [];
|
|
1384
1384
|
_this.searchPlaceholder = 'search';
|
|
1385
1385
|
_this.noResultsLabel = 'list.results.no.items';
|
|
1386
|
-
_this.
|
|
1386
|
+
_this.isSearchActive = true;
|
|
1387
|
+
_this.searchInput = false;
|
|
1387
1388
|
_this.inputChange = new EventEmitter();
|
|
1388
1389
|
_this.onSelect = new EventEmitter();
|
|
1389
1390
|
_this.listChange = new EventEmitter();
|
|
@@ -1426,7 +1427,7 @@ var ListComponent = /** @class */ (function (_super) {
|
|
|
1426
1427
|
ListComponent.decorators = [
|
|
1427
1428
|
{ type: Component, args: [{
|
|
1428
1429
|
selector: 'ode-list',
|
|
1429
|
-
template: "<ode-search-input
|
|
1430
|
+
template: "<ode-search-input\n *ngIf=\"isSearchActive\"\n [searchInput]=\"searchInput\"\n [searchSubmit]=\"searchSubmit\"\n [attr.placeholder]=\"searchPlaceholder | translate\"\n (onChange)=\"inputChange.emit($event)\"></ode-search-input>\n<div class=\"toolbar\">\n <ng-content select=\"[toolbar]\"></ng-content>\n</div>\n<div class=\"list-wrapper\"\n infiniteScroll\n [scrollWindow]=\"false\"\n (scrolled)=\"scrolledDown.emit()\"\n [infiniteScrollThrottle]=\"50\">\n <ul>\n <li *ngFor=\"let item of model | filter: filters | filter: inputFilter | store:self:'storedElements' | orderBy: sort | slice: 0:limit\"\n (click)=\"onSelect.emit(item)\"\n [class.selected]=\"isSelected(item)\"\n [class.disabled]=\"isDisabled(item)\"\n [ngClass]=\"ngClass(item)\"\n class=\"lct-list-item\">\n <ng-template [ngTemplateOutlet]=\"templateRef\" [ngTemplateOutletContext]=\"{$implicit: item}\">\n </ng-template>\n </li>\n </ul>\n <ul *ngIf=\"storedElements && storedElements.length === 0\">\n <li class=\"no-results\">{{ noResultsLabel | translate }}</li>\n </ul>\n</div>\n",
|
|
1430
1431
|
styles: ["ul{margin:0;padding:0;font-size:.9em}ul li{cursor:pointer;border-top:1px solid #ddd;padding:10px}ul li.disabled{pointer-events:none}"]
|
|
1431
1432
|
}] }
|
|
1432
1433
|
];
|
|
@@ -1442,7 +1443,9 @@ var ListComponent = /** @class */ (function (_super) {
|
|
|
1442
1443
|
limit: [{ type: Input }],
|
|
1443
1444
|
searchPlaceholder: [{ type: Input }],
|
|
1444
1445
|
noResultsLabel: [{ type: Input }],
|
|
1446
|
+
isSearchActive: [{ type: Input }],
|
|
1445
1447
|
searchInput: [{ type: Input }],
|
|
1448
|
+
searchSubmit: [{ type: Input }],
|
|
1446
1449
|
inputChange: [{ type: Output }],
|
|
1447
1450
|
onSelect: [{ type: Output }],
|
|
1448
1451
|
listChange: [{ type: Output }],
|
|
@@ -1474,8 +1477,12 @@ if (false) {
|
|
|
1474
1477
|
/** @type {?} */
|
|
1475
1478
|
ListComponent.prototype.noResultsLabel;
|
|
1476
1479
|
/** @type {?} */
|
|
1480
|
+
ListComponent.prototype.isSearchActive;
|
|
1481
|
+
/** @type {?} */
|
|
1477
1482
|
ListComponent.prototype.searchInput;
|
|
1478
1483
|
/** @type {?} */
|
|
1484
|
+
ListComponent.prototype.searchSubmit;
|
|
1485
|
+
/** @type {?} */
|
|
1479
1486
|
ListComponent.prototype.inputChange;
|
|
1480
1487
|
/** @type {?} */
|
|
1481
1488
|
ListComponent.prototype.onSelect;
|
|
@@ -2448,7 +2455,7 @@ var MultiComboComponent = /** @class */ (function (_super) {
|
|
|
2448
2455
|
MultiComboComponent.decorators = [
|
|
2449
2456
|
{ type: Component, args: [{
|
|
2450
2457
|
selector: 'ode-multi-combo',
|
|
2451
|
-
template: "<button (click)=\"toggleVisibility()\"\n [ngClass]=\"{ opened: show }\"\n [disabled]=\"disabled\">\n {{ title }}\n</button>\n<div [ngClass]=\"{ hidden: !show }\">\n <div class=\"options\">\n <button class=\"select-all\" (click)=\"selectAll()\" *ngIf=\"!maxSelected\"\n [title]=\"labels('select.all')\">{{ labels('select.all') }}</button>\n <button class=\"deselect-all\" (click)=\"deselectAll()\"\n [title]=\"labels('deselect.all')\">{{ labels('deselect.all') }}</button>\n </div>\n <div *ngIf=\"filter\" class=\"filter\">\n <ode-search-input (onChange)=\"search.input = $event\" [attr.placeholder]=\"labels('search')\"></ode-search-input>\n </div>\n <ul>\n <li *ngFor=\"let item of _comboModel | filter: getFilter() | orderBy: orderBy | store: self:'filteredComboModel'\"\n (click)=\"toggleItem(item)\"\n [ngClass]=\"{ selected: isSelected(item) }\"\n [attr.disabled]=\"isDisabled()\">\n {{ displayItem(item) | translate }}\n </li>\n </ul>\n</div>\n",
|
|
2458
|
+
template: "<button (click)=\"toggleVisibility()\"\n [ngClass]=\"{ opened: show }\"\n [disabled]=\"disabled\"\n type=\"button\">\n {{ title }}\n</button>\n<div [ngClass]=\"{ hidden: !show }\">\n <div class=\"options\">\n <button class=\"select-all\" (click)=\"selectAll()\" *ngIf=\"!maxSelected\"\n [title]=\"labels('select.all')\" type=\"button\">{{ labels('select.all') }}</button>\n <button class=\"deselect-all\" (click)=\"deselectAll()\"\n [title]=\"labels('deselect.all')\" type=\"button\">{{ labels('deselect.all') }}</button>\n </div>\n <div *ngIf=\"filter\" class=\"filter\">\n <ode-search-input (onChange)=\"search.input = $event\" [attr.placeholder]=\"labels('search')\"></ode-search-input>\n </div>\n <ul>\n <li *ngFor=\"let item of _comboModel | filter: getFilter() | orderBy: orderBy | store: self:'filteredComboModel'\"\n (click)=\"toggleItem(item)\"\n [ngClass]=\"{ selected: isSelected(item) }\"\n [attr.disabled]=\"isDisabled()\">\n {{ displayItem(item) | translate }}\n </li>\n </ul>\n</div>\n",
|
|
2452
2459
|
host: {
|
|
2453
2460
|
'(document:click)': 'onClick($event)',
|
|
2454
2461
|
},
|
|
@@ -2939,6 +2946,9 @@ var SearchInputComponent = /** @class */ (function (_super) {
|
|
|
2939
2946
|
var _this = _super.call(this, injector) || this;
|
|
2940
2947
|
_this._elRef = _elRef;
|
|
2941
2948
|
_this._renderer = _renderer;
|
|
2949
|
+
/* Inputs / Outputs / View */
|
|
2950
|
+
_this.isSearchActive = false;
|
|
2951
|
+
_this.searchInput = false;
|
|
2942
2952
|
_this._delay = 200;
|
|
2943
2953
|
_this.onChange = new EventEmitter();
|
|
2944
2954
|
/* Internal logic */
|
|
@@ -2952,9 +2962,7 @@ var SearchInputComponent = /** @class */ (function (_super) {
|
|
|
2952
2962
|
function () {
|
|
2953
2963
|
return this._delay;
|
|
2954
2964
|
},
|
|
2955
|
-
|
|
2956
|
-
set: /* Inputs / Outputs / View */
|
|
2957
|
-
/**
|
|
2965
|
+
set: /**
|
|
2958
2966
|
* @param {?} d
|
|
2959
2967
|
* @return {?}
|
|
2960
2968
|
*/
|
|
@@ -3044,7 +3052,8 @@ var SearchInputComponent = /** @class */ (function (_super) {
|
|
|
3044
3052
|
SearchInputComponent.decorators = [
|
|
3045
3053
|
{ type: Component, args: [{
|
|
3046
3054
|
selector: 'ode-search-input',
|
|
3047
|
-
template: "<input type=\"search\" #searchBox (input)=\"search(searchBox.value)\"
|
|
3055
|
+
template: "<form\n *ngIf=\"searchInput\"\n class=\"search-container\"\n (ngSubmit)=\"searchSubmit()\">\n <input\n #searchBox\n class=\"search-input\"\n name=\"searchTerm\"\n type=\"search\"\n (input)=\"search(searchBox.value)\" />\n <button class=\"search-button\">\n <i class=\"fa fa-search is-size-4 search-icon\"></i>\n </button>\n</form>\n\n<input *ngIf=\"!searchInput\" type=\"search\" #searchBox (input)=\"search(searchBox.value)\"/>",
|
|
3056
|
+
styles: [":host .search-container{margin:0;display:flex}:host .search-input{border:1px solid rgba(0,0,0,.1)}:host .search-icon{padding-left:0}:host .search-button{margin:0;background:#ff8352;color:#fff}"]
|
|
3048
3057
|
}] }
|
|
3049
3058
|
];
|
|
3050
3059
|
/** @nocollapse */
|
|
@@ -3054,6 +3063,9 @@ var SearchInputComponent = /** @class */ (function (_super) {
|
|
|
3054
3063
|
{ type: Renderer2 }
|
|
3055
3064
|
]; };
|
|
3056
3065
|
SearchInputComponent.propDecorators = {
|
|
3066
|
+
isSearchActive: [{ type: Input }],
|
|
3067
|
+
searchInput: [{ type: Input }],
|
|
3068
|
+
searchSubmit: [{ type: Input }],
|
|
3057
3069
|
delay: [{ type: Input }],
|
|
3058
3070
|
onChange: [{ type: Output }],
|
|
3059
3071
|
searchBox: [{ type: ViewChild, args: ['searchBox', { static: false },] }]
|
|
@@ -3061,6 +3073,12 @@ var SearchInputComponent = /** @class */ (function (_super) {
|
|
|
3061
3073
|
return SearchInputComponent;
|
|
3062
3074
|
}(OdeComponent));
|
|
3063
3075
|
if (false) {
|
|
3076
|
+
/** @type {?} */
|
|
3077
|
+
SearchInputComponent.prototype.isSearchActive;
|
|
3078
|
+
/** @type {?} */
|
|
3079
|
+
SearchInputComponent.prototype.searchInput;
|
|
3080
|
+
/** @type {?} */
|
|
3081
|
+
SearchInputComponent.prototype.searchSubmit;
|
|
3064
3082
|
/**
|
|
3065
3083
|
* @type {?}
|
|
3066
3084
|
* @private
|
|
@@ -5145,6 +5163,83 @@ function clickOn(el) {
|
|
|
5145
5163
|
return el.triggerEventHandler('click', null);
|
|
5146
5164
|
}
|
|
5147
5165
|
|
|
5166
|
+
/**
|
|
5167
|
+
* @fileoverview added by tsickle
|
|
5168
|
+
* Generated from: lib/components/dropdown/dropdown.component.ts
|
|
5169
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5170
|
+
*/
|
|
5171
|
+
/**
|
|
5172
|
+
* DropdownComponent is an alternative to the MonoSelectComponent.
|
|
5173
|
+
* Accept everything inside <ng-content> but should work with <ode-list> component
|
|
5174
|
+
*
|
|
5175
|
+
* Simple Dropdown Component without search:
|
|
5176
|
+
* [isSearchActive] can be set to false to disable search input in <ode-list>
|
|
5177
|
+
* ```
|
|
5178
|
+
* <ode-dropdown
|
|
5179
|
+
* [name]="option_name"
|
|
5180
|
+
* [isDropdownOpened]="a_boolean"
|
|
5181
|
+
* (onDropdown)="toggle_func"
|
|
5182
|
+
* >
|
|
5183
|
+
* <ode-list
|
|
5184
|
+
* [model]="model"
|
|
5185
|
+
* [filters]="filters"
|
|
5186
|
+
* (onSelect)="func_to_select_elem($event)"
|
|
5187
|
+
* (inputChange)="a_string_for_input_value = $event"
|
|
5188
|
+
* noResultsLabel="text_to_display"
|
|
5189
|
+
* searchPlaceholder="default_placeholder_text"
|
|
5190
|
+
* >
|
|
5191
|
+
* <ng-template let-item>
|
|
5192
|
+
* <div>{{ item.name }}</div>
|
|
5193
|
+
* </ng-template>
|
|
5194
|
+
* </ode-list>
|
|
5195
|
+
* </ode-dropdown>
|
|
5196
|
+
* `̀``
|
|
5197
|
+
*/
|
|
5198
|
+
var DropdownComponent = /** @class */ (function (_super) {
|
|
5199
|
+
__extends(DropdownComponent, _super);
|
|
5200
|
+
function DropdownComponent(injector) {
|
|
5201
|
+
var _this = _super.call(this, injector) || this;
|
|
5202
|
+
_this.name = '';
|
|
5203
|
+
_this.isDropdownOpened = false;
|
|
5204
|
+
_this.onDropdown = new EventEmitter();
|
|
5205
|
+
return _this;
|
|
5206
|
+
}
|
|
5207
|
+
/**
|
|
5208
|
+
* @return {?}
|
|
5209
|
+
*/
|
|
5210
|
+
DropdownComponent.prototype.ngOnInit = /**
|
|
5211
|
+
* @return {?}
|
|
5212
|
+
*/
|
|
5213
|
+
function () {
|
|
5214
|
+
_super.prototype.ngOnInit.call(this);
|
|
5215
|
+
};
|
|
5216
|
+
DropdownComponent.decorators = [
|
|
5217
|
+
{ type: Component, args: [{
|
|
5218
|
+
selector: 'ode-dropdown',
|
|
5219
|
+
template: "<div class=\"dropdown\" [ngClass]=\"isDropdownOpened ? 'open' : ''\">\n <button (click)=\"onDropdown.emit()\" class=\"dropdown-trigger\">\n <span class=\"cell-ellipsis\">{{ name }}</span> <i class=\"fonticon arrow-select\"></i>\n </button>\n <div class=\"dropdown-list\">\n <ng-content></ng-content>\n </div>\n</div>\n",
|
|
5220
|
+
styles: [".dropdown{position:relative;width:230px;box-sizing:border-box}.dropdown *{box-sizing:border-box}.dropdown-trigger{cursor:pointer;display:inline-flex;align-items:center;justify-content:space-between;padding:12px 16px;font-size:14px;color:#4a4a4a;text-transform:uppercase;text-align:left;width:100%;border-radius:8px;border:1px solid #7a7a7a;background-color:#fff}.dropdown-trigger>span{display:inline-block;max-width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.dropdown-trigger i.arrow-select{display:inline-block;float:none!important;padding-left:0;transform:rotate(180deg);transform-origin:center center}.dropdown-trigger:hover{color:#4a4a4a;border-color:#7a7a7a;background-color:#fff}.dropdown-trigger:hover i.arrow-select{color:#4a4a4a!important}.dropdown-list{display:none;position:absolute;overflow:hidden;z-index:2;top:100%;left:0;right:0;width:316px;box-shadow:0 4px 12px 0 rgba(0,0,0,.15);border-radius:8px;background-color:#fff}.dropdown::ng-deep ode-list li{justify-content:flex-start}.dropdown::ng-deep ode-list input[type=search]{padding:12px 16px}.dropdown.open .dropdown-list{display:block}.dropdown.open i.arrow-select{transform:rotate(0)}"]
|
|
5221
|
+
}] }
|
|
5222
|
+
];
|
|
5223
|
+
/** @nocollapse */
|
|
5224
|
+
DropdownComponent.ctorParameters = function () { return [
|
|
5225
|
+
{ type: Injector }
|
|
5226
|
+
]; };
|
|
5227
|
+
DropdownComponent.propDecorators = {
|
|
5228
|
+
name: [{ type: Input }],
|
|
5229
|
+
isDropdownOpened: [{ type: Input }],
|
|
5230
|
+
onDropdown: [{ type: Output }]
|
|
5231
|
+
};
|
|
5232
|
+
return DropdownComponent;
|
|
5233
|
+
}(OdeComponent));
|
|
5234
|
+
if (false) {
|
|
5235
|
+
/** @type {?} */
|
|
5236
|
+
DropdownComponent.prototype.name;
|
|
5237
|
+
/** @type {?} */
|
|
5238
|
+
DropdownComponent.prototype.isDropdownOpened;
|
|
5239
|
+
/** @type {?} */
|
|
5240
|
+
DropdownComponent.prototype.onDropdown;
|
|
5241
|
+
}
|
|
5242
|
+
|
|
5148
5243
|
/**
|
|
5149
5244
|
* @fileoverview added by tsickle
|
|
5150
5245
|
* Generated from: lib/ngx-ode-ui.module.ts
|
|
@@ -5228,7 +5323,8 @@ var NgxOdeUiModule = /** @class */ (function () {
|
|
|
5228
5323
|
LocalizedDatePipe,
|
|
5229
5324
|
BytesPipe,
|
|
5230
5325
|
KeysPipe,
|
|
5231
|
-
LengthPipe
|
|
5326
|
+
LengthPipe,
|
|
5327
|
+
DropdownComponent
|
|
5232
5328
|
],
|
|
5233
5329
|
imports: [
|
|
5234
5330
|
CommonModule,
|
|
@@ -5265,6 +5361,7 @@ var NgxOdeUiModule = /** @class */ (function () {
|
|
|
5265
5361
|
SpinnerCubeComponent,
|
|
5266
5362
|
PagerComponent,
|
|
5267
5363
|
EllipsisComponent,
|
|
5364
|
+
DropdownComponent,
|
|
5268
5365
|
// directives
|
|
5269
5366
|
AnchorDirective,
|
|
5270
5367
|
DynamicTemplateDirective,
|
|
@@ -5301,5 +5398,5 @@ var NgxOdeUiModule = /** @class */ (function () {
|
|
|
5301
5398
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
5302
5399
|
*/
|
|
5303
5400
|
|
|
5304
|
-
export { AnchorDirective, BytesPipe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, ComponentDescriptor, DatepickerComponent, DragAndDropFilesDirective, DynamicComponentDirective, DynamicModuleImportsService, DynamicTemplateDirective, EllipsisComponent, FilterPipe, FlattenObjectArrayPipe, FormErrorsComponent, FormFieldComponent, InputFileService, ItemTreeComponent, KeysPipe, LabelsService, LengthPipe, LightBoxComponent, LightboxConfirmComponent, LimitPipe, ListCheckableComponent, ListComponent, LocalizedDatePipe, MessageBoxComponent, MessageStickerComponent, MonoSelectComponent, MultiComboComponent, MultiSelectComponent, NgxOdeUiModule, ObjectURLDirective, OrderPipe, PagerComponent, PanelSectionComponent, PortalComponent, PushPanelComponent, SearchInputComponent, SideLayoutComponent, SidePanelComponent, SimpleSelectComponent, SpinnerCubeComponent, SpinnerService, StepComponent, StorePipe, TooltipComponent, UNITS, UploadFilesComponent, WizardComponent, clickOn, getText, getUnit, icons, removeAccents, standardise, toDecimal, trim };
|
|
5401
|
+
export { AnchorDirective, BytesPipe, CUSTOM_INPUT_CONTROL_VALUE_ACCESSOR, ComponentDescriptor, DatepickerComponent, DragAndDropFilesDirective, DynamicComponentDirective, DynamicModuleImportsService, DynamicTemplateDirective, EllipsisComponent, FilterPipe, FlattenObjectArrayPipe, FormErrorsComponent, FormFieldComponent, InputFileService, ItemTreeComponent, KeysPipe, LabelsService, LengthPipe, LightBoxComponent, LightboxConfirmComponent, LimitPipe, ListCheckableComponent, ListComponent, LocalizedDatePipe, MessageBoxComponent, MessageStickerComponent, MonoSelectComponent, MultiComboComponent, MultiSelectComponent, NgxOdeUiModule, ObjectURLDirective, OrderPipe, PagerComponent, PanelSectionComponent, PortalComponent, PushPanelComponent, SearchInputComponent, SideLayoutComponent, SidePanelComponent, SimpleSelectComponent, SpinnerCubeComponent, SpinnerService, StepComponent, StorePipe, TooltipComponent, UNITS, UploadFilesComponent, WizardComponent, clickOn, getText, getUnit, icons, removeAccents, standardise, toDecimal, trim, DropdownComponent as ɵa };
|
|
5305
5402
|
//# sourceMappingURL=ngx-ode-ui.js.map
|