Parcourir la source

Fixing Datepicker by renaming ClrDatepicker

Richard Knight il y a 6 ans
Parent
commit
dc52200d8c

+ 7 - 21
package-lock.json

@@ -4007,14 +4007,12 @@
         "balanced-match": {
           "version": "1.0.0",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "brace-expansion": {
           "version": "1.1.11",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "balanced-match": "^1.0.0",
             "concat-map": "0.0.1"
@@ -4029,20 +4027,17 @@
         "code-point-at": {
           "version": "1.1.0",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "concat-map": {
           "version": "0.0.1",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "console-control-strings": {
           "version": "1.1.0",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "core-util-is": {
           "version": "1.0.2",
@@ -4159,8 +4154,7 @@
         "inherits": {
           "version": "2.0.3",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "ini": {
           "version": "1.3.5",
@@ -4172,7 +4166,6 @@
           "version": "1.0.0",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "number-is-nan": "^1.0.0"
           }
@@ -4187,7 +4180,6 @@
           "version": "3.0.4",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "brace-expansion": "^1.1.7"
           }
@@ -4195,14 +4187,12 @@
         "minimist": {
           "version": "0.0.8",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "minipass": {
           "version": "2.2.4",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "safe-buffer": "^5.1.1",
             "yallist": "^3.0.0"
@@ -4221,7 +4211,6 @@
           "version": "0.5.1",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "minimist": "0.0.8"
           }
@@ -4302,8 +4291,7 @@
         "number-is-nan": {
           "version": "1.0.1",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "object-assign": {
           "version": "4.1.1",
@@ -4315,7 +4303,6 @@
           "version": "1.4.0",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "wrappy": "1"
           }
@@ -4437,7 +4424,6 @@
           "version": "1.0.2",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "code-point-at": "^1.0.0",
             "is-fullwidth-code-point": "^1.0.0",

+ 3 - 3
src/app/_mock/testfields.v1.ts

@@ -116,8 +116,8 @@ const timepicker = new fmd.TimepickerField({
 	name: 'timepicker'
 });
 
-const datepicker = new fmd.DatepickerField({
-	name: 'datepicker'
+const clrdatepicker = new fmd.ClrDatepickerField({
+	name: 'clrdatepicker'
 });
 
 // ---------------------------------------------------------------------------------------------------------------------
@@ -148,7 +148,7 @@ const meta = {
 	dropdownModifiedInput,
 	checkbuttonGroup,
 	// // timepicker,
-	datepicker,
+	clrdatepicker,
 	basicTestContainer
 };
 

+ 5 - 5
src/app/dynaform/components/clarity/datepicker/datepicker.component.spec.ts

@@ -1,20 +1,20 @@
 import { async, ComponentFixture, TestBed } from '@angular/core/testing';
 
-import { DatepickerComponent } from './datepicker.component';
+import { ClrDatepickerComponent } from './datepicker.component';
 
 describe('DatepickerComponent', () => {
-  let component: DatepickerComponent;
-  let fixture: ComponentFixture<DatepickerComponent>;
+  let component: ClrDatepickerComponent;
+  let fixture: ComponentFixture<ClrDatepickerComponent>;
 
   beforeEach(async(() => {
     TestBed.configureTestingModule({
-      declarations: [ DatepickerComponent ]
+      declarations: [ ClrDatepickerComponent ]
     })
     .compileComponents();
   }));
 
   beforeEach(() => {
-    fixture = TestBed.createComponent(DatepickerComponent);
+    fixture = TestBed.createComponent(ClrDatepickerComponent);
     component = fixture.componentInstance;
     fixture.detectChanges();
   });

+ 1 - 1
src/app/dynaform/components/clarity/datepicker/datepicker.component.ts

@@ -6,7 +6,7 @@ import { NativeInputComponent } from '../../_abstract/native-input.component';
 	templateUrl: './datepicker.component.html',
 	styleUrls: ['./datepicker.component.scss']
 })
-export class DatepickerComponent extends NativeInputComponent {
+export class ClrDatepickerComponent extends NativeInputComponent {
 
 	exposeMetaInTemplate: string[] = ['extraClass', 'placeholder'];
 

+ 1 - 1
src/app/dynaform/components/index.ts

@@ -11,7 +11,7 @@ export { HiddenComponent } from './native/hidden/hidden.component';
 
 export { ClrTextComponent } from './clarity/text/clr-text.component';
 
-export { DatepickerComponent } from './clarity/datepicker/datepicker.component';
+export { ClrDatepickerComponent } from './clarity/datepicker/datepicker.component';
 
 
 

+ 3 - 3
src/app/dynaform/models/field.model.ts

@@ -243,8 +243,8 @@ class TimepickerField extends SimpleField {
 
 }
 
-class DatepickerField extends SimpleField {
-	type = 'Datepicker';
+class ClrDatepickerField extends SimpleField {
+	type = 'ClrDatepicker';
 	value: Date = new Date();
 }
 
@@ -367,7 +367,7 @@ export {
 	TextField, TextareaField, PasswordField, SelectField, RadioField, HiddenField,
 	CheckbuttonField, DropdownModifiedInputField, MultilineField,
 	CheckbuttonGroup,
-	TimepickerField, DatepickerField,
+	TimepickerField, ClrDatepickerField,
 	Container, RepeatingContainer,
 	ButtonGroup, Heading, DisplayField
 };