@kms-ngx-ui/presentational 0.0.17 → 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 +28 -24
- package/bundles/kms-ngx-ui-presentational.umd.js +8 -2
- package/bundles/kms-ngx-ui-presentational.umd.js.map +1 -1
- package/esm2015/lib/ui/color-input/color-input.component.js +9 -3
- package/fesm2015/kms-ngx-ui-presentational.js +8 -2
- package/fesm2015/kms-ngx-ui-presentational.js.map +1 -1
- package/kms-ngx-ui-presentational.metadata.json +1 -1
- package/lib/ui/color-input/color-input.component.d.ts +1 -0
- package/package.json +1 -1
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
|
-
##
|
|
23
|
-
|
|
24
|
-
|
|
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.
|
|
@@ -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\" [
|
|
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,
|