@indice/ng-components 0.2.91 → 0.2.95

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.
@@ -1402,7 +1402,7 @@
1402
1402
  DatepickerComponent.decorators = [
1403
1403
  { type: i0.Component, args: [{
1404
1404
  selector: 'lib-date-picker',
1405
- template: "<div class=\"relative flex\"\r\n (clickOutside)=\"closeCalendar()\">\r\n\r\n <input type=\"text\"\r\n #dateInput\r\n [readonly]=\"readonly\"\r\n name=\"dateInput\"\r\n (blur)=\"onBlur($event)\"\r\n id=\"dateInput\"\r\n (focus)=\"showCalendar = false\"\r\n [value]=\"value | date: displayFormat\"\r\n class=\"w-full focus:ring-0 focus:outline-none rounded-none sm:text-sm border-gray-300 focus:border-0\"\r\n [ngClass]=\"{'cursor-not-allowed': disabled}\"\r\n [placeholder]=\"disabled ? '' : placeholder\">\r\n\r\n <button type=\"button\"\r\n class=\"relative inline-flex items-center px-2 py-2 border border-gray-300 text-sm font-medium rounded-r-sm text-gray-700 bg-gray-50 hover:bg-gray-100 focus:outline-none focus:ring-1 focus:ring-gray-500 focus:border-gray-500\"\r\n [disabled]=\"disabled\"\r\n (click)=\"openCalendar()\"\r\n [ngClass]=\"{'cursor-not-allowed': disabled}\">\r\n <i class=\"ms-Icon ms-Icon--DateTime2\"></i>\r\n </button>\r\n\r\n <div *ngIf=\"showCalendar\"\r\n class=\"bg-gray-100 mt-10 rounded-sm shadow-md p-4 absolute left-0 z-50 w-full\"\r\n style=\"height:18rem;min-width:16rem;\"\r\n name=\"calendar\">\r\n <div class=\"flex justify-between items-center mb-2\">\r\n <div>\r\n <button type=\"button\"\r\n (click)=\"openYears()\">\r\n <span class=\"text-lg font-bold text-gray-800\">\r\n {{monthNames[month]}}\r\n </span>\r\n <span class=\"ml-1 text-lg text-gray-600 font-normal\">\r\n {{year}}</span>\r\n </button>\r\n </div>\r\n <div *ngIf=\"!showYears; else showYearsPickerTmpl\">\r\n <button type=\"button\"\r\n class=\"transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 p-1 rounded-full disabled:opacity-25\"\r\n (click)=\"previousMonth();\">\r\n <svg class=\"h-6 w-6 text-gray-500 inline-flex\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M15 19l-7-7 7-7\" />\r\n </svg>\r\n </button>\r\n <button type=\"button\"\r\n class=\"transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 p-1 rounded-full disabled:opacity-25\"\r\n (click)=\"nextMonth()\">\r\n <svg class=\"h-6 w-6 text-gray-500 inline-flex\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M9 5l7 7-7 7\" />\r\n </svg>\r\n </button>\r\n </div>\r\n <ng-template #showYearsPickerTmpl>\r\n <div>\r\n <button type=\"button\"\r\n class=\"transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 p-1 rounded-full disabled:opacity-25\"\r\n (click)=\"previousYear();\">\r\n <svg class=\"h-6 w-6 text-gray-500 inline-flex\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M15 19l-7-7 7-7\" />\r\n </svg>\r\n </button>\r\n <button type=\"button\"\r\n class=\"transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 p-1 rounded-full disabled:opacity-25\"\r\n (click)=\"nextYear()\">\r\n <svg class=\"h-6 w-6 text-gray-500 inline-flex\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M9 5l7 7-7 7\" />\r\n </svg>\r\n </button>\r\n </div>\r\n </ng-template>\r\n </div>\r\n\r\n <div class=\"flex flex-wrap mb-3 -mx-1\"\r\n *ngIf=\"!showYears; else showCalYearsTmpl\">\r\n <div *ngFor=\"let day of dayNames\"\r\n class=\"text-gray-800 font-medium text-center text-sm uppercase\"\r\n style=\"width: 14.28%\">{{day}}</div>\r\n </div>\r\n\r\n <ng-template #showCalYearsTmpl>\r\n <div class=\"flex flex-wrap -mx-1 items-center\">\r\n <div *ngFor=\"let year of showCalendarYears\"\r\n style=\"width: 18.28%\"\r\n class=\"px-1 mb-1\">\r\n <div (click)=\"selectYearValue(year)\"\r\n class=\"cursor-pointer text-center hover:text-red-600 text-sm leading-none rounded-full leading-loose transition ease-in-out duration-100\"\r\n [class]=\"year.selected ? 'bg-gray-700 text-red-600 font-medium' : 'text-gray-800 hover:bg-gray-800'\">{{year.year}}</div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <div class=\"flex flex-wrap -mx-1 items-center\"\r\n *ngIf=\"!showYears\">\r\n <div *ngFor=\"let blankday of blankDays\"\r\n style=\"width: 14.28%\"\r\n class=\"text-center border p-1 border-transparent text-sm opacity-50\">{{blankday}}</div>\r\n <div *ngFor=\"let date of calendarDates\"\r\n style=\"width: 14.28%\"\r\n class=\"px-1 mb-1\">\r\n <div (click)=\"selectDateValue(date)\"\r\n class=\"cursor-pointer text-center hover:text-red-600 text-sm leading-none rounded-full leading-loose transition ease-in-out duration-100\"\r\n [class]=\"date.selected ? 'bg-gray-700 text-red-600 font-medium' : 'text-gray-800 hover:bg-gray-800'\">{{date.day}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</div>",
1405
+ template: "<div class=\"relative flex\"\r\n (clickOutside)=\"closeCalendar()\">\r\n\r\n <input type=\"text\"\r\n #dateInput\r\n [readonly]=\"readonly\"\r\n name=\"dateInput\"\r\n (blur)=\"onBlur($event)\"\r\n id=\"dateInput\"\r\n (focus)=\"showCalendar = false\"\r\n [value]=\"value | date: displayFormat\"\r\n class=\"w-full focus:ring-0 focus:outline-none rounded-none sm:text-sm border-gray-300 focus:border-0\"\r\n [ngClass]=\"{'cursor-not-allowed': disabled}\"\r\n [placeholder]=\"disabled ? '' : placeholder\">\r\n\r\n <button type=\"button\"\r\n class=\"relative inline-flex items-center px-2 py-2 border border-gray-300 text-sm font-medium rounded-r-sm text-gray-700 bg-gray-50 hover:bg-gray-100 focus:outline-none focus:ring-1 focus:ring-gray-500 focus:border-gray-500\"\r\n [disabled]=\"disabled\"\r\n (click)=\"openCalendar()\"\r\n [ngClass]=\"{'cursor-not-allowed': disabled}\">\r\n <i class=\"ms-Icon ms-Icon--DateTime2\"></i>\r\n </button>\r\n\r\n <div *ngIf=\"showCalendar\"\r\n class=\"bg-gray-100 mt-10 rounded-sm shadow-md p-4 absolute left-0 z-50 w-full\"\r\n style=\"height:18rem;min-width:16rem;\"\r\n name=\"calendar\">\r\n <div class=\"flex justify-between items-center mb-2\">\r\n <div>\r\n <button type=\"button\"\r\n (click)=\"openYears()\">\r\n <span class=\"text-lg font-bold text-gray-800\">\r\n {{monthNames[month]}}\r\n </span>\r\n <span class=\"ml-1 text-lg text-gray-600 font-normal\">\r\n {{year}}</span>\r\n </button>\r\n </div>\r\n <div *ngIf=\"!showYears; else showYearsPickerTmpl\">\r\n <button type=\"button\"\r\n class=\"transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 p-1 rounded-full disabled:opacity-25\"\r\n (click)=\"previousMonth();\">\r\n <svg class=\"h-6 w-6 text-gray-500 inline-flex\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M15 19l-7-7 7-7\" />\r\n </svg>\r\n </button>\r\n <button type=\"button\"\r\n class=\"transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 p-1 rounded-full disabled:opacity-25\"\r\n (click)=\"nextMonth()\">\r\n <svg class=\"h-6 w-6 text-gray-500 inline-flex\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M9 5l7 7-7 7\" />\r\n </svg>\r\n </button>\r\n </div>\r\n <ng-template #showYearsPickerTmpl>\r\n <div>\r\n <button type=\"button\"\r\n class=\"transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 p-1 rounded-full disabled:opacity-25 w-1/2\"\r\n (click)=\"previousYear();\">\r\n <svg class=\"h-6 w-6 text-gray-500 inline-flex\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M15 19l-7-7 7-7\" />\r\n </svg>\r\n </button>\r\n <button type=\"button\"\r\n class=\"transition ease-in-out duration-100 inline-flex cursor-pointer hover:bg-gray-200 p-1 rounded-full disabled:opacity-25 w-1/2\"\r\n (click)=\"nextYear()\">\r\n <svg class=\"h-6 w-6 text-gray-500 inline-flex\"\r\n fill=\"none\"\r\n viewBox=\"0 0 24 24\"\r\n stroke=\"currentColor\">\r\n <path stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n stroke-width=\"2\"\r\n d=\"M9 5l7 7-7 7\" />\r\n </svg>\r\n </button>\r\n </div>\r\n </ng-template>\r\n </div>\r\n\r\n <div class=\"flex flex-wrap mb-3 -mx-1\"\r\n *ngIf=\"!showYears; else showCalYearsTmpl\">\r\n <div *ngFor=\"let day of dayNames\"\r\n class=\"text-gray-800 font-medium text-center text-sm uppercase\"\r\n style=\"width: 14.28%\">{{day}}</div>\r\n </div>\r\n\r\n <ng-template #showCalYearsTmpl>\r\n <div class=\"flex flex-wrap -mx-1 items-center\">\r\n <div *ngFor=\"let year of showCalendarYears\"\r\n style=\"width: 18.28%\"\r\n class=\"px-1 mb-1\">\r\n <div (click)=\"selectYearValue(year)\"\r\n class=\"cursor-pointer text-center hover:text-blue-600 text-sm leading-none rounded-full leading-loose transition ease-in-out duration-100\"\r\n [class]=\"year.selected ? 'bg-gray-700 text-blue-600 font-medium' : 'text-gray-800 hover:bg-gray-800'\">{{year.year}}</div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <div class=\"flex flex-wrap -mx-1 items-center\"\r\n *ngIf=\"!showYears\">\r\n <div *ngFor=\"let blankday of blankDays\"\r\n style=\"width: 14.28%\"\r\n class=\"text-center border p-1 border-transparent text-sm opacity-50\">{{blankday}}</div>\r\n <div *ngFor=\"let date of calendarDates\"\r\n style=\"width: 14.28%\"\r\n class=\"px-1 mb-1\">\r\n <div (click)=\"selectDateValue(date)\"\r\n class=\"cursor-pointer text-center hover:text-blue-600 text-sm leading-none rounded-full leading-loose transition ease-in-out duration-100\"\r\n [class]=\"date.selected ? 'bg-gray-700 text-blue-600 font-medium' : 'text-gray-800 hover:bg-gray-800'\">{{date.day}}</div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</div>",
1406
1406
  providers: [
1407
1407
  {
1408
1408
  provide: forms.NG_VALUE_ACCESSOR,
@@ -2086,13 +2086,15 @@
2086
2086
  }
2087
2087
  ViewLayoutComponent.prototype.ngOnInit = function () {
2088
2088
  var _a;
2089
- rxjs.fromEvent((_a = this.searchInput$) === null || _a === void 0 ? void 0 : _a.nativeElement, 'keyup').pipe(operators.map(function (event) {
2090
- return event.target.value; // Get input value.
2091
- }), operators.filter(function (inputValue) { return inputValue.length >= 3 || inputValue.length === 0; }),
2092
- // If character length greater than minimumSearchCharacters setting.
2093
- operators.debounceTime(1000), // Time in milliseconds between key events.
2094
- operators.distinctUntilChanged() // If previous query is different from current.
2095
- ).subscribe();
2089
+ if ((_a = this.searchInput$) === null || _a === void 0 ? void 0 : _a.nativeElement) {
2090
+ rxjs.fromEvent(this.searchInput$.nativeElement, 'keyup').pipe(operators.map(function (event) {
2091
+ return event.target.value; // Get input value.
2092
+ }), operators.filter(function (inputValue) { return inputValue.length >= 3 || inputValue.length === 0; }),
2093
+ // If character length greater than minimumSearchCharacters setting.
2094
+ operators.debounceTime(1000), // Time in milliseconds between key events.
2095
+ operators.distinctUntilChanged() // If previous query is different from current.
2096
+ ).subscribe();
2097
+ }
2096
2098
  };
2097
2099
  ViewLayoutComponent.prototype.emitActionClick = function (action) {
2098
2100
  this.onAction.emit(action);
@@ -2298,6 +2300,16 @@
2298
2300
  this.onComplete = new i0.EventEmitter();
2299
2301
  }
2300
2302
  FormLayoutComponent.prototype.ngOnInit = function () {
2303
+ var _a;
2304
+ if ((_a = this.searchInput$) === null || _a === void 0 ? void 0 : _a.nativeElement) {
2305
+ rxjs.fromEvent(this.searchInput$.nativeElement, 'keyup').pipe(operators.map(function (event) {
2306
+ return event.target.value; // Get input value.
2307
+ }), operators.filter(function (inputValue) { return inputValue.length >= 3 || inputValue.length === 0; }),
2308
+ // If character length greater than minimumSearchCharacters setting.
2309
+ operators.debounceTime(1000), // Time in milliseconds between key events.
2310
+ operators.distinctUntilChanged() // If previous query is different from current.
2311
+ ).subscribe();
2312
+ }
2301
2313
  };
2302
2314
  FormLayoutComponent.prototype.onSidePaneDeactivated = function ($event) {
2303
2315
  this.onComplete.emit(true);
@@ -2309,18 +2321,8 @@
2309
2321
  this.onSearch.emit(text);
2310
2322
  };
2311
2323
  FormLayoutComponent.prototype.searchActionType = function (text) {
2312
- var _this = this;
2313
2324
  var _a;
2314
- rxjs.fromEvent((_a = this.searchInput$) === null || _a === void 0 ? void 0 : _a.nativeElement, 'keyup').pipe(operators.map(function (event) {
2315
- return event.target.value; // Get input value.
2316
- }), operators.filter(function (inputValue) { return inputValue.length >= 3 || inputValue.length === 0; }),
2317
- // If character length greater than minimumSearchCharacters setting.
2318
- operators.debounceTime(1000), // Time in milliseconds between key events.
2319
- operators.distinctUntilChanged() // If previous query is different from current.
2320
- ).subscribe(function (_) {
2321
- var _a;
2322
- _this.onSearch.emit((_a = _this.searchInput$) === null || _a === void 0 ? void 0 : _a.nativeElement.value);
2323
- });
2325
+ this.onSearch.emit((_a = this.searchInput$) === null || _a === void 0 ? void 0 : _a.nativeElement.value);
2324
2326
  };
2325
2327
  FormLayoutComponent.prototype.routerLinkActionClick = function (action, relative) {
2326
2328
  if (relative === void 0) { relative = false; }
@@ -2336,7 +2338,7 @@
2336
2338
  FormLayoutComponent.decorators = [
2337
2339
  { type: i0.Component, args: [{
2338
2340
  selector: 'lib-form-layout',
2339
- template: "<div class=\"form-layout-container\">\r\n <div class=\"form-header\">\r\n <div class=\"form-header-inner\">\r\n <h3 class=\"form-title\">\r\n {{ title }}\r\n </h3>\r\n <p class=\"form-subtitle\">\r\n {{ subTitle }}\r\n </p>\r\n </div>\r\n <div class=\"form-header-actions\">\r\n <ng-container *ngFor=\"let action of actions\"\r\n [ngSwitch]=\"action.type\">\r\n <ng-container *ngSwitchCase=\"'search'\">\r\n <label for=\"search\"\r\n class=\"sr-only\">Search</label>\r\n <div class=\"search-container\">\r\n <div class=\"pointer-events-none absolute inset-y-0 left-0 pl-3 flex items-center\">\r\n <!--<svg class=\"h-5 w-5\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\r\n <path fill-rule=\"evenodd\" d=\"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z\" clip-rule=\"evenodd\" />\r\n </svg>-->\r\n </div>\r\n <input id=\"search\"\r\n #search\r\n class=\"form-search-input\"\r\n [placeholder]=\"searchPlaceholder\"\r\n type=\"search\"\r\n name=\"search\"\r\n (input)=\"searchActionType(search.value)\">\r\n </div>\r\n <button type=\"button\"\r\n href=\"#\"\r\n class=\"btn-form-view-header-search\"\r\n [title]=\"action.tooltip\"\r\n (click)=\"searchActionClick(action, search.value)\">\r\n <i [class]=\"action.icon\"></i>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'router-link'\">\r\n <button type=\"button\"\r\n href=\"#\"\r\n class=\"ml-1 btn-form-view-header\"\r\n [title]=\"action.tooltip\"\r\n (click)=\"routerLinkActionClick(action)\">\r\n <i [class]=\"action.icon\"></i>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <button type=\"button\"\r\n class=\"ml-1 btn-form-view-header\"\r\n [title]=\"action.tooltip\"\r\n (click)=\"emitActionClick(action)\">\r\n <i [class]=\"action.icon\"></i>\r\n </button>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"form-content-container\">\r\n <div [ngClass]=\"{'form-content-container-inner': actions}\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n <lib-side-pane #formPane (onComplete)=\"onSidePaneDeactivated($event)\">\r\n <router-outlet name=\"formRightPane\"\r\n (activate)=\"formPane.onSidePaneActivated($event)\"\r\n (deactivate)=\"formPane.onSidePaneDeactivated($event)\"></router-outlet>\r\n </lib-side-pane>\r\n</div>\r\n"
2341
+ template: "<div class=\"form-layout-container\">\r\n <div class=\"form-header\" *ngIf=\"title || subTitle || actions\">\r\n <div class=\"form-header-inner\">\r\n <h3 class=\"form-title\">\r\n {{ title }}\r\n </h3>\r\n <p class=\"form-subtitle\">\r\n {{ subTitle }}\r\n </p>\r\n </div>\r\n <div class=\"form-header-actions\">\r\n <ng-container *ngFor=\"let action of actions\"\r\n [ngSwitch]=\"action.type\">\r\n <ng-container *ngSwitchCase=\"'search'\">\r\n <label for=\"search\"\r\n class=\"sr-only\">Search</label>\r\n <div class=\"search-container\">\r\n <div class=\"pointer-events-none absolute inset-y-0 left-0 pl-3 flex items-center\">\r\n <!--<svg class=\"h-5 w-5\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\r\n <path fill-rule=\"evenodd\" d=\"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z\" clip-rule=\"evenodd\" />\r\n </svg>-->\r\n </div>\r\n <input id=\"search\"\r\n #search\r\n class=\"form-search-input\"\r\n [placeholder]=\"searchPlaceholder\"\r\n type=\"search\"\r\n name=\"search\"\r\n (input)=\"searchActionType(search.value)\">\r\n </div>\r\n <button type=\"button\"\r\n href=\"#\"\r\n class=\"btn-form-view-header-search\"\r\n [title]=\"action.tooltip\"\r\n (click)=\"searchActionClick(action, search.value)\">\r\n <i [class]=\"action.icon\"></i>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchCase=\"'router-link'\">\r\n <button type=\"button\"\r\n href=\"#\"\r\n class=\"ml-1 btn-form-view-header\"\r\n [title]=\"action.tooltip\"\r\n (click)=\"routerLinkActionClick(action)\">\r\n <i [class]=\"action.icon\"></i>\r\n </button>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <button type=\"button\"\r\n class=\"ml-1 btn-form-view-header\"\r\n [title]=\"action.tooltip\"\r\n (click)=\"emitActionClick(action)\">\r\n <i [class]=\"action.icon\"></i>\r\n </button>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class=\"form-content-container\">\r\n <div [ngClass]=\"{'form-content-container-inner': actions}\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n <lib-side-pane #formPane (onComplete)=\"onSidePaneDeactivated($event)\">\r\n <router-outlet name=\"formRightPane\"\r\n (activate)=\"formPane.onSidePaneActivated($event)\"\r\n (deactivate)=\"formPane.onSidePaneDeactivated($event)\"></router-outlet>\r\n </lib-side-pane>\r\n</div>\r\n"
2340
2342
  },] }
2341
2343
  ];
2342
2344
  FormLayoutComponent.ctorParameters = function () { return [