@coolon/angular-ui-powerups 12.4.0-alpha.36 → 12.4.0-alpha.37

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.
@@ -1,65 +1,86 @@
1
1
  @use "../../forms/mixins";
2
- @use "~@angular/material/core/typography/typography-utils";
2
+ @use "~@angular/material/theming";
3
3
 
4
4
  @mixin apply-theme($color-config, $typography-config) {
5
5
 
6
6
  aup-inline-string-editor {
7
- display: inline-block;
8
-
9
- .content {
10
- position: relative;
11
- display: grid;
12
- grid-template-areas: "label edit-control" "content edit-control";
13
- grid-template-columns: 1fr auto;
14
- grid-template-rows: auto;
15
-
16
- font-size: typography-utils.font-size($typography-config, input);
17
-
18
- //box-sizing: border-box;
19
- // copied from mat input...
20
- border-top: 0.84375em solid transparent;
21
- padding-bottom: 1.34375em;
22
-
23
- $top-padding-tweak: 1px;
24
- padding-top: $top-padding-tweak;
25
-
26
- > label {
27
- position: absolute;
28
- transform: translateY(-100%);
29
- @include mixins.floating-label-style();
30
- }
31
-
32
- > p {
33
- grid-area: content;
34
- @include typography-utils.typography-level($typography-config, input);
35
-
36
- // copied from mat input...
37
- padding: 0.5em 0;
38
- margin: -0.0625em 0 0 0;
39
-
40
- box-sizing: border-box;
41
- flex: 1;
42
-
43
- &.editing-enabled {
44
- cursor: pointer;
7
+ display: block;
8
+
9
+ .container {
10
+ mat-form-field {
11
+ &:not(.empty) {
12
+ input {
13
+ color: currentColor;
14
+ //color: theming.mat-color($color-config, text);
15
+ }
45
16
  }
46
-
47
- &.place-holder {
48
- color: rgba(0,0,0,0.5); // TODO: get the angular theme value for disabled form elements...
17
+ &.editable {
18
+ .mat-form-field-flex, input {
19
+ cursor: pointer;
20
+ }
21
+ }
22
+ .mat-form-field-infix {
23
+ width: auto;
24
+ }
25
+ .mat-form-field-underline {
26
+ //opacity: 0; // hide the underline...
49
27
  }
50
-
51
- }
52
-
53
- &:hover {
54
- //background-color: rgba(0, 0, 0, 0.03);
55
- }
56
-
57
- > aup-command {
58
- grid-area: edit-control;
59
- align-self: end;
60
- transform: translateY(3px); // hack to line up with activity actions...!
61
28
  }
62
29
  }
30
+ //.content {
31
+ // position: relative;
32
+ // display: grid;
33
+ // grid-template-areas: "label edit-control" "content edit-control";
34
+ // grid-template-columns: 1fr auto;
35
+ // grid-template-rows: auto;
36
+ //
37
+ // font-size: typography-utils.font-size($typography-config, input);
38
+ //
39
+ // //box-sizing: border-box;
40
+ // // copied from mat input...
41
+ // border-top: 0.84375em solid transparent;
42
+ // padding-bottom: 1.34375em;
43
+ //
44
+ // $top-padding-tweak: 1px;
45
+ // padding-top: $top-padding-tweak;
46
+ //
47
+ // > label {
48
+ // position: absolute;
49
+ // transform: translateY(-100%);
50
+ // @include mixins.floating-label-style();
51
+ // }
52
+ //
53
+ // > p {
54
+ // grid-area: content;
55
+ // @include typography-utils.typography-level($typography-config, input);
56
+ //
57
+ // // copied from mat input...
58
+ // padding: 0.5em 0;
59
+ // margin: -0.0625em 0 0 0;
60
+ //
61
+ // box-sizing: border-box;
62
+ // flex: 1;
63
+ //
64
+ // &.editing-enabled {
65
+ // cursor: pointer;
66
+ // }
67
+ //
68
+ // &.place-holder {
69
+ // color: rgba(0,0,0,0.5); // TODO: get the angular theme value for disabled form elements...
70
+ // }
71
+ //
72
+ // }
73
+ //
74
+ // &:hover {
75
+ // //background-color: rgba(0, 0, 0, 0.03);
76
+ // }
77
+ //
78
+ // > aup-command {
79
+ // grid-area: edit-control;
80
+ // align-self: end;
81
+ // transform: translateY(3px); // hack to line up with activity actions...!
82
+ // }
83
+ //}
63
84
  }
64
85
  }
65
86
 
@@ -6923,7 +6923,7 @@
6923
6923
  exports.InlineStringEditorComponent.decorators = [
6924
6924
  { type: i0.Component, args: [{
6925
6925
  selector: 'aup-inline-string-editor',
6926
- template: "<ng-container *ngIf=\"!editorModel.isEditing()\">\n <div class=\"content\" [class.editable]=\"editCommand.enabled.value\">\n <label>{{label}}</label>\n <p [class.place-holder]=\"empty.value\" [class.editing-enabled]=\"editingEnabled.value\" (click)=\"startEdit()\">{{displayValue.value}}</p>\n <aup-command *ngIf=\"editCommand.enabled.value\" [command]=\"editCommand\" [faceModel]=\"editFaceModel\"></aup-command>\n </div>\n</ng-container>\n<aup-in-place-interaction-context [animateFirstActivity]=\"false\"></aup-in-place-interaction-context>\n"
6926
+ template: "<div class=\"container\" *ngIf=\"!editorModel.isEditing()\">\n <mat-form-field appearance=\"standard\" floatLabel=\"always\" (click)=\"startEdit()\"\n [class.editable]=\"editingEnabled.value\" [class.empty]=\"isEmpty()\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeHolder}}\"\n [ngModel]=\"editorModel.valueModel.value\"\n [disabled]=\"true\"\n >\n <!-- <mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>-->\n <!-- <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>-->\n <!-- <aup-icon *ngIf=\"iconPrefix\" matPrefix [icon]=\"iconPrefix\"></aup-icon>-->\n </mat-form-field>\n <aup-command *ngIf=\"editCommand.enabled.value\" [command]=\"editCommand\" [faceModel]=\"editFaceModel\"></aup-command>\n</div>\n<aup-in-place-interaction-context [animateFirstActivity]=\"false\"></aup-in-place-interaction-context>\n"
6927
6927
  },] }
6928
6928
  ];
6929
6929
  exports.InlineStringEditorComponent.ctorParameters = function () { return [
@@ -6990,7 +6990,10 @@
6990
6990
  DirectivesModule,
6991
6991
  flexLayout.FlexModule,
6992
6992
  flexLayout.GridModule,
6993
- ComponentsModule
6993
+ ComponentsModule,
6994
+ forms.FormsModule,
6995
+ input.MatInputModule,
6996
+ formField.MatFormFieldModule,
6994
6997
  ],
6995
6998
  declarations: [
6996
6999
  ActivityContainerComponent,