@kms-ngx-ui/presentational 0.0.16 → 0.0.18

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/README.md CHANGED
@@ -1,24 +1,28 @@
1
- # KmsUiPresentational
2
-
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.14.
4
-
5
- ## Code scaffolding
6
-
7
- Run `ng generate component component-name --project kms-ngx-ui-presentational` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project kms-ngx-ui-presentational`.
8
- > Note: Don't forget to add `--project kms-ngx-ui-presentational` or else it will be added to the default project in your `angular.json` file.
9
-
10
- ## Build
11
-
12
- Run `ng build kms-ngx-ui-presentational` to build the project. The build artifacts will be stored in the `dist/` directory.
13
-
14
- ## Publishing
15
-
16
- After building your library with `ng build kms-ngx-ui-presentational`, go to the dist folder `cd dist/kms-ngx-ui-presentational` and run `npm publish`.
17
-
18
- ## Running unit tests
19
-
20
- Run `ng test kms-ngx-ui-presentational` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
-
22
- ## Further help
23
-
24
- To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
1
+ # KmsUiPresentational
2
+
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.14.
4
+
5
+ ## Code scaffolding
6
+
7
+ Run `ng generate component component-name --project kms-ngx-ui-presentational` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project kms-ngx-ui-presentational`.
8
+ > Note: Don't forget to add `--project kms-ngx-ui-presentational` or else it will be added to the default project in your `angular.json` file.
9
+
10
+ ## Build
11
+
12
+ Run `ng build kms-ngx-ui-presentational` to build the project. The build artifacts will be stored in the `dist/` directory.
13
+
14
+ ## Publishing
15
+
16
+ After building your library with `ng build kms-ngx-ui-presentational`, go to the dist folder `cd dist/kms-ngx-ui-presentational` and run `npm publish`.
17
+
18
+ ## Running unit tests
19
+
20
+ Run `ng test kms-ngx-ui-presentational` to execute the unit tests via [Karma](https://karma-runner.github.io).
21
+
22
+ ## Running Storybook
23
+
24
+ Run `npm run storybook` to start Storybook.
25
+
26
+ ## Further help
27
+
28
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/material/checkbox'), require('@angular/material/radio'), require('@angular/animations'), require('@angular/platform-browser'), require('rxjs'), require('@angular/material/dialog'), require('subsink'), require('@angular/google-maps'), require('@angular/material/button'), require('@angular/material/expansion'), require('@angular/material/select'), require('@angular/material/menu'), require('enum-values/src/enumValues'), require('@angular/cdk/drag-drop'), require('@ngx-translate/core'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/progress-spinner')) :
3
- typeof define === 'function' && define.amd ? define('@kms-ngx-ui/presentational', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/material/checkbox', '@angular/material/radio', '@angular/animations', '@angular/platform-browser', 'rxjs', '@angular/material/dialog', 'subsink', '@angular/google-maps', '@angular/material/button', '@angular/material/expansion', '@angular/material/select', '@angular/material/menu', 'enum-values/src/enumValues', '@angular/cdk/drag-drop', '@ngx-translate/core', '@angular/material/form-field', '@angular/material/input', '@angular/material/progress-spinner'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["kms-ngx-ui"] = global["kms-ngx-ui"] || {}, global["kms-ngx-ui"].presentational = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.material.checkbox, global.ng.material.radio, global.ng.animations, global.ng.platformBrowser, global.rxjs, global.ng.material.dialog, global.subsink, global.ng.googleMaps, global.ng.material.button, global.ng.material.expansion, global.ng.material.select, global.ng.material.menu, global.enumValues, global.ng.cdk.dragDrop, global.core, global.ng.material.formField, global.ng.material.input, global.ng.material.progressSpinner));
5
- })(this, (function (exports, i0, common, forms, checkbox, radio, animations, platformBrowser, rxjs, dialog, subsink, googleMaps, button, expansion, select, menu, enumValues, dragDrop, core, formField, input, progressSpinner) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/material/checkbox'), require('@angular/material/radio'), require('@angular/animations'), require('@angular/platform-browser'), require('rxjs'), require('@angular/material/dialog'), require('subsink'), require('@angular/google-maps'), require('@angular/material/button'), require('@angular/material/expansion'), require('@angular/material/select'), require('@angular/material/menu'), require('enum-values/src/enumValues'), require('@angular/cdk/drag-drop'), require('@ngx-translate/core'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/progress-spinner'), require('ngx-useful-swiper')) :
3
+ typeof define === 'function' && define.amd ? define('@kms-ngx-ui/presentational', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/material/checkbox', '@angular/material/radio', '@angular/animations', '@angular/platform-browser', 'rxjs', '@angular/material/dialog', 'subsink', '@angular/google-maps', '@angular/material/button', '@angular/material/expansion', '@angular/material/select', '@angular/material/menu', 'enum-values/src/enumValues', '@angular/cdk/drag-drop', '@ngx-translate/core', '@angular/material/form-field', '@angular/material/input', '@angular/material/progress-spinner', 'ngx-useful-swiper'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["kms-ngx-ui"] = global["kms-ngx-ui"] || {}, global["kms-ngx-ui"].presentational = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.material.checkbox, global.ng.material.radio, global.ng.animations, global.ng.platformBrowser, global.rxjs, global.ng.material.dialog, global.subsink, global.ng.googleMaps, global.ng.material.button, global.ng.material.expansion, global.ng.material.select, global.ng.material.menu, global.enumValues, global.ng.cdk.dragDrop, global.core, global.ng.material.formField, global.ng.material.input, global.ng.material.progressSpinner, global.ngxUsefulSwiper));
5
+ })(this, (function (exports, i0, common, forms, checkbox, radio, animations, platformBrowser, rxjs, dialog, subsink, googleMaps, button, expansion, select, menu, enumValues, dragDrop, core, formField, input, progressSpinner, ngxUsefulSwiper) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -664,12 +664,12 @@
664
664
  this.form = this.formBuilder.group({
665
665
  color: '',
666
666
  });
667
+ _super.prototype.ngOnInit.call(this);
667
668
  this.formInitialized = true;
668
669
  this.form.valueChanges.subscribe(function (value) {
669
670
  _this.internalValue = value.color;
670
671
  _this.onChange(value.color);
671
672
  });
672
- _super.prototype.ngOnInit.call(this);
673
673
  };
674
674
  ColorInputComponent.prototype.validate = function (_) {
675
675
  // TODO fix to validate complete form
@@ -686,12 +686,18 @@
686
686
  }
687
687
  return false;
688
688
  };
689
+ ColorInputComponent.prototype.updateSelectedColor = function (value) {
690
+ var color = value.target.value;
691
+ this.value = color;
692
+ this.internalValue = color;
693
+ this.change(color);
694
+ };
689
695
  return ColorInputComponent;
690
696
  }(FormControlParentComponent));
691
697
  ColorInputComponent.decorators = [
692
698
  { type: i0.Component, args: [{
693
699
  selector: 'kms-color-input',
694
- template: "\n<form [formGroup]=\"form\" *ngIf=\"formInitialized\">\n <div>\n <mat-form-field class=\"colorInput\">\n <kms-tooltip-icon [tooltipText]=\"tooltipText\" *ngIf=\"tooltipText\"></kms-tooltip-icon>\n <mat-label>{{ label }}</mat-label>\n <input type=\"text\" [value]=\"value\" matInput formControlName=\"color\" [placeholder]=\"placeholder\" [ngClass]=\"{'my-inValid': !matchesHex(value)}\" />\n <input type=\"color\" [value]=\"value && matchesHex(value) ? value : '#ffffff'\" formControlName=\"color\" [ngClass]=\"{'my-inValid': !matchesHex(value)}\" />\n </mat-form-field>\n </div>\n</form>",
700
+ template: "\n<form [formGroup]=\"form\" *ngIf=\"formInitialized\">\n <div>\n <mat-form-field class=\"colorInput\">\n <kms-tooltip-icon [tooltipText]=\"tooltipText\" *ngIf=\"tooltipText\"></kms-tooltip-icon>\n <mat-label>{{ label }}</mat-label>\n <input type=\"text\" [(ngModel)]=\"value\" matInput formControlName=\"color\" [placeholder]=\"placeholder\" [ngClass]=\"{'my-inValid': !matchesHex(value)}\" />\n <input type=\"color\" [value]=\"value && matchesHex(value) ? value : '#ffffff'\" (change)=\"updateSelectedColor($event)\" [ngClass]=\"{'my-inValid': !matchesHex(value)}\" />\n </mat-form-field>\n </div>\n</form>",
695
701
  providers: [
696
702
  {
697
703
  provide: forms.NG_VALUE_ACCESSOR,
@@ -3164,7 +3170,8 @@
3164
3170
  select.MatSelectModule,
3165
3171
  progressSpinner.MatProgressSpinnerModule,
3166
3172
  DirectivesModule,
3167
- core.TranslateModule
3173
+ core.TranslateModule,
3174
+ ngxUsefulSwiper.NgxUsefulSwiperModule,
3168
3175
  ],
3169
3176
  exports: [
3170
3177
  ActionsParentComponent,