@ajsf/material 0.3.0-beta.4 → 0.4.0-beta.1

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.
Files changed (39) hide show
  1. package/ajsf-material.metadata.json +1 -1
  2. package/bundles/ajsf-material.umd.js +27 -29
  3. package/bundles/ajsf-material.umd.js.map +1 -1
  4. package/bundles/ajsf-material.umd.min.js +2 -2
  5. package/bundles/ajsf-material.umd.min.js.map +1 -1
  6. package/esm2015/ajsf-material.js +1 -1
  7. package/esm2015/lib/angular-flex-monkey-patch.js +1 -1
  8. package/esm2015/lib/material-design-framework.component.js +2 -2
  9. package/esm2015/lib/material-design-framework.module.js +1 -1
  10. package/esm2015/lib/material-design.framework.js +1 -1
  11. package/esm2015/lib/widgets/flex-layout-root.component.js +1 -1
  12. package/esm2015/lib/widgets/flex-layout-section.component.js +1 -1
  13. package/esm2015/lib/widgets/material-add-reference.component.js +1 -1
  14. package/esm2015/lib/widgets/material-button-group.component.js +1 -1
  15. package/esm2015/lib/widgets/material-button.component.js +1 -1
  16. package/esm2015/lib/widgets/material-checkbox.component.js +1 -1
  17. package/esm2015/lib/widgets/material-checkboxes.component.js +1 -1
  18. package/esm2015/lib/widgets/material-chip-list.component.js +1 -1
  19. package/esm2015/lib/widgets/material-datepicker.component.js +3 -6
  20. package/esm2015/lib/widgets/material-file.component.js +1 -1
  21. package/esm2015/lib/widgets/material-input.component.js +3 -6
  22. package/esm2015/lib/widgets/material-number.component.js +3 -6
  23. package/esm2015/lib/widgets/material-one-of.component.js +1 -1
  24. package/esm2015/lib/widgets/material-radios.component.js +1 -1
  25. package/esm2015/lib/widgets/material-select.component.js +3 -6
  26. package/esm2015/lib/widgets/material-slider.component.js +1 -1
  27. package/esm2015/lib/widgets/material-stepper.component.js +1 -1
  28. package/esm2015/lib/widgets/material-tabs.component.js +1 -1
  29. package/esm2015/lib/widgets/material-textarea.component.js +3 -6
  30. package/esm2015/lib/widgets/public_api.js +1 -1
  31. package/esm2015/public_api.js +1 -1
  32. package/fesm2015/ajsf-material.js +12 -22
  33. package/fesm2015/ajsf-material.js.map +1 -1
  34. package/lib/widgets/material-datepicker.component.d.ts +1 -2
  35. package/lib/widgets/material-input.component.d.ts +1 -2
  36. package/lib/widgets/material-number.component.d.ts +1 -2
  37. package/lib/widgets/material-select.component.d.ts +1 -2
  38. package/lib/widgets/material-textarea.component.d.ts +1 -2
  39. package/package.json +9 -6
@@ -1,6 +1,5 @@
1
1
  import { Component, ChangeDetectionStrategy, Input, Inject, Optional, ChangeDetectorRef, Injectable, NgModule } from '@angular/core';
2
2
  import { JsonSchemaFormService, hasOwn, buildTitleMap, dateToString, isDefined, isArray, Framework, WidgetLibraryModule, JsonSchemaFormModule, FrameworkLibraryService, WidgetLibraryService } from '@ajsf/core';
3
- import { MAT_LABEL_GLOBAL_OPTIONS, MatNativeDateModule } from '@angular/material/core';
4
3
  import { MAT_FORM_FIELD_DEFAULT_OPTIONS, MatFormFieldModule } from '@angular/material/form-field';
5
4
  import cloneDeep from 'lodash/cloneDeep';
6
5
  import { CommonModule } from '@angular/common';
@@ -12,6 +11,7 @@ import { MatButtonToggleModule } from '@angular/material/button-toggle';
12
11
  import { MatCardModule } from '@angular/material/card';
13
12
  import { MatCheckboxModule } from '@angular/material/checkbox';
14
13
  import { MatChipsModule } from '@angular/material/chips';
14
+ import { MatNativeDateModule } from '@angular/material/core';
15
15
  import { MatDatepickerModule } from '@angular/material/datepicker';
16
16
  import { MatExpansionModule } from '@angular/material/expansion';
17
17
  import { MatIconModule } from '@angular/material/icon';
@@ -706,9 +706,8 @@ MaterialChipListComponent.propDecorators = {
706
706
  };
707
707
 
708
708
  class MaterialDatepickerComponent {
709
- constructor(matFormFieldDefaultOptions, matLabelGlobalOptions, jsf) {
709
+ constructor(matFormFieldDefaultOptions, jsf) {
710
710
  this.matFormFieldDefaultOptions = matFormFieldDefaultOptions;
711
- this.matLabelGlobalOptions = matLabelGlobalOptions;
712
711
  this.jsf = jsf;
713
712
  this.controlDisabled = false;
714
713
  this.boundControl = false;
@@ -738,7 +737,7 @@ MaterialDatepickerComponent.decorators = [
738
737
  template: `
739
738
  <mat-form-field [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
740
739
  [class]="options?.htmlClass || ''"
741
- [floatLabel]="options?.floatLabel || matLabelGlobalOptions?.float || (options?.notitle ? 'never' : 'auto')"
740
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
742
741
  [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
743
742
  [style.width]="'100%'">
744
743
  <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
@@ -796,7 +795,6 @@ MaterialDatepickerComponent.decorators = [
796
795
  ];
797
796
  MaterialDatepickerComponent.ctorParameters = () => [
798
797
  { type: undefined, decorators: [{ type: Inject, args: [MAT_FORM_FIELD_DEFAULT_OPTIONS,] }, { type: Optional }] },
799
- { type: undefined, decorators: [{ type: Inject, args: [MAT_LABEL_GLOBAL_OPTIONS,] }, { type: Optional }] },
800
798
  { type: JsonSchemaFormService }
801
799
  ];
802
800
  MaterialDatepickerComponent.propDecorators = {
@@ -890,7 +888,7 @@ MaterialDesignFrameworkComponent.decorators = [
890
888
  // tslint:disable-next-line:component-selector
891
889
  selector: 'material-design-framework',
892
890
  template: "<div\n [class.array-item]=\"widgetLayoutNode?.arrayItem && widgetLayoutNode?.type !== '$ref'\"\n [orderable]=\"isOrderable\"\n [dataIndex]=\"dataIndex\"\n [layoutIndex]=\"layoutIndex\"\n [layoutNode]=\"widgetLayoutNode\">\n <svg *ngIf=\"showRemoveButton\"\n xmlns=\"http://www.w3.org/2000/svg\"\n height=\"18\" width=\"18\" viewBox=\"0 0 24 24\"\n class=\"close-button\"\n (click)=\"removeItem()\">\n <path\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z\"/>\n </svg>\n <select-widget-widget\n [dataIndex]=\"dataIndex\"\n [layoutIndex]=\"layoutIndex\"\n [layoutNode]=\"widgetLayoutNode\"></select-widget-widget>\n</div>\n<div class=\"spacer\" *ngIf=\"widgetLayoutNode?.arrayItem && widgetLayoutNode?.type !== '$ref'\"></div>\n",
893
- styles: [".array-item{border-radius:2px;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);padding:6px;position:relative;transition:all .28s cubic-bezier(.4,0,.2,1)}.close-button{cursor:pointer;fill:rgba(0,0,0,.4);position:absolute;right:6px;top:6px;visibility:hidden;z-index:500}.close-button:hover{fill:rgba(0,0,0,.8)}.array-item:hover>.close-button{visibility:visible}.spacer{margin:6px 0}[draggable=true]:hover{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);cursor:move;z-index:10}[draggable=true].drag-target-top{box-shadow:0 -2px 0 #000;position:relative;z-index:20}[draggable=true].drag-target-bottom{box-shadow:0 2px 0 #000;position:relative;z-index:20}"]
891
+ styles: [".array-item{border-radius:2px;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);padding:6px;position:relative;transition:all .28s cubic-bezier(.4,0,.2,1)}.close-button{cursor:pointer;position:absolute;top:6px;right:6px;fill:rgba(0,0,0,.4);visibility:hidden;z-index:500}.close-button:hover{fill:rgba(0,0,0,.8)}.array-item:hover>.close-button{visibility:visible}.spacer{margin:6px 0}[draggable=true]:hover{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);cursor:move;z-index:10}[draggable=true].drag-target-top{box-shadow:0 -2px 0 #000;position:relative;z-index:20}[draggable=true].drag-target-bottom{box-shadow:0 2px 0 #000;position:relative;z-index:20}"]
894
892
  },] }
895
893
  ];
896
894
  MaterialDesignFrameworkComponent.ctorParameters = () => [
@@ -935,9 +933,8 @@ MaterialFileComponent.propDecorators = {
935
933
  };
936
934
 
937
935
  class MaterialInputComponent {
938
- constructor(matFormFieldDefaultOptions, matLabelGlobalOptions, jsf) {
936
+ constructor(matFormFieldDefaultOptions, jsf) {
939
937
  this.matFormFieldDefaultOptions = matFormFieldDefaultOptions;
940
- this.matLabelGlobalOptions = matLabelGlobalOptions;
941
938
  this.jsf = jsf;
942
939
  this.controlDisabled = false;
943
940
  this.boundControl = false;
@@ -961,7 +958,7 @@ MaterialInputComponent.decorators = [
961
958
  template: `
962
959
  <mat-form-field [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
963
960
  [class]="options?.htmlClass || ''"
964
- [floatLabel]="options?.floatLabel || matLabelGlobalOptions?.float || (options?.notitle ? 'never' : 'auto')"
961
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
965
962
  [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
966
963
  [style.width]="'100%'">
967
964
  <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
@@ -1019,7 +1016,6 @@ MaterialInputComponent.decorators = [
1019
1016
  ];
1020
1017
  MaterialInputComponent.ctorParameters = () => [
1021
1018
  { type: undefined, decorators: [{ type: Inject, args: [MAT_FORM_FIELD_DEFAULT_OPTIONS,] }, { type: Optional }] },
1022
- { type: undefined, decorators: [{ type: Inject, args: [MAT_LABEL_GLOBAL_OPTIONS,] }, { type: Optional }] },
1023
1019
  { type: JsonSchemaFormService }
1024
1020
  ];
1025
1021
  MaterialInputComponent.propDecorators = {
@@ -1029,9 +1025,8 @@ MaterialInputComponent.propDecorators = {
1029
1025
  };
1030
1026
 
1031
1027
  class MaterialNumberComponent {
1032
- constructor(matFormFieldDefaultOptions, matLabelGlobalOptions, jsf) {
1028
+ constructor(matFormFieldDefaultOptions, jsf) {
1033
1029
  this.matFormFieldDefaultOptions = matFormFieldDefaultOptions;
1034
- this.matLabelGlobalOptions = matLabelGlobalOptions;
1035
1030
  this.jsf = jsf;
1036
1031
  this.controlDisabled = false;
1037
1032
  this.boundControl = false;
@@ -1061,7 +1056,7 @@ MaterialNumberComponent.decorators = [
1061
1056
  template: `
1062
1057
  <mat-form-field [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
1063
1058
  [class]="options?.htmlClass || ''"
1064
- [floatLabel]="options?.floatLabel || matLabelGlobalOptions?.float || (options?.notitle ? 'never' : 'auto')"
1059
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
1065
1060
  [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
1066
1061
  [style.width]="'100%'">
1067
1062
  <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
@@ -1115,7 +1110,6 @@ MaterialNumberComponent.decorators = [
1115
1110
  ];
1116
1111
  MaterialNumberComponent.ctorParameters = () => [
1117
1112
  { type: undefined, decorators: [{ type: Inject, args: [MAT_FORM_FIELD_DEFAULT_OPTIONS,] }, { type: Optional }] },
1118
- { type: undefined, decorators: [{ type: Inject, args: [MAT_LABEL_GLOBAL_OPTIONS,] }, { type: Optional }] },
1119
1113
  { type: JsonSchemaFormService }
1120
1114
  ];
1121
1115
  MaterialNumberComponent.propDecorators = {
@@ -1238,9 +1232,8 @@ MaterialRadiosComponent.propDecorators = {
1238
1232
  };
1239
1233
 
1240
1234
  class MaterialSelectComponent {
1241
- constructor(matFormFieldDefaultOptions, matLabelGlobalOptions, jsf) {
1235
+ constructor(matFormFieldDefaultOptions, jsf) {
1242
1236
  this.matFormFieldDefaultOptions = matFormFieldDefaultOptions;
1243
- this.matLabelGlobalOptions = matLabelGlobalOptions;
1244
1237
  this.jsf = jsf;
1245
1238
  this.controlDisabled = false;
1246
1239
  this.boundControl = false;
@@ -1268,7 +1261,7 @@ MaterialSelectComponent.decorators = [
1268
1261
  <mat-form-field
1269
1262
  [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
1270
1263
  [class]="options?.htmlClass || ''"
1271
- [floatLabel]="options?.floatLabel || matLabelGlobalOptions?.float || (options?.notitle ? 'never' : 'auto')"
1264
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
1272
1265
  [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
1273
1266
  [style.width]="'100%'">
1274
1267
  <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
@@ -1342,7 +1335,6 @@ MaterialSelectComponent.decorators = [
1342
1335
  ];
1343
1336
  MaterialSelectComponent.ctorParameters = () => [
1344
1337
  { type: undefined, decorators: [{ type: Inject, args: [MAT_FORM_FIELD_DEFAULT_OPTIONS,] }, { type: Optional }] },
1345
- { type: undefined, decorators: [{ type: Inject, args: [MAT_LABEL_GLOBAL_OPTIONS,] }, { type: Optional }] },
1346
1338
  { type: JsonSchemaFormService }
1347
1339
  ];
1348
1340
  MaterialSelectComponent.propDecorators = {
@@ -1508,9 +1500,8 @@ MaterialTabsComponent.propDecorators = {
1508
1500
  };
1509
1501
 
1510
1502
  class MaterialTextareaComponent {
1511
- constructor(matFormFieldDefaultOptions, matLabelGlobalOptions, jsf) {
1503
+ constructor(matFormFieldDefaultOptions, jsf) {
1512
1504
  this.matFormFieldDefaultOptions = matFormFieldDefaultOptions;
1513
- this.matLabelGlobalOptions = matLabelGlobalOptions;
1514
1505
  this.jsf = jsf;
1515
1506
  this.controlDisabled = false;
1516
1507
  this.boundControl = false;
@@ -1533,7 +1524,7 @@ MaterialTextareaComponent.decorators = [
1533
1524
  template: `
1534
1525
  <mat-form-field [appearance]="options?.appearance || matFormFieldDefaultOptions?.appearance || 'standard'"
1535
1526
  [class]="options?.htmlClass || ''"
1536
- [floatLabel]="options?.floatLabel || matLabelGlobalOptions?.float || (options?.notitle ? 'never' : 'auto')"
1527
+ [floatLabel]="options?.floatLabel || matFormFieldDefaultOptions?.floatLabel || (options?.notitle ? 'never' : 'auto')"
1537
1528
  [hideRequiredMarker]="options?.hideRequired ? 'true' : 'false'"
1538
1529
  [style.width]="'100%'">
1539
1530
  <mat-label *ngIf="!options?.notitle">{{options?.title}}</mat-label>
@@ -1585,7 +1576,6 @@ MaterialTextareaComponent.decorators = [
1585
1576
  ];
1586
1577
  MaterialTextareaComponent.ctorParameters = () => [
1587
1578
  { type: undefined, decorators: [{ type: Inject, args: [MAT_FORM_FIELD_DEFAULT_OPTIONS,] }, { type: Optional }] },
1588
- { type: undefined, decorators: [{ type: Inject, args: [MAT_LABEL_GLOBAL_OPTIONS,] }, { type: Optional }] },
1589
1579
  { type: JsonSchemaFormService }
1590
1580
  ];
1591
1581
  MaterialTextareaComponent.propDecorators = {