@skyux/inline-form 5.0.0 → 5.5.0-beta.0

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 (55) hide show
  1. package/README.md +6 -4
  2. package/bundles/skyux-inline-form.umd.js +74 -84
  3. package/documentation.json +69 -33
  4. package/esm2015/index.js +10 -0
  5. package/esm2015/index.js.map +1 -0
  6. package/esm2015/lib/modules/inline-form/animations/slide-dissolve.js +26 -0
  7. package/esm2015/lib/modules/inline-form/animations/slide-dissolve.js.map +1 -0
  8. package/esm2015/lib/modules/inline-form/inline-form-adapter.service.js +62 -0
  9. package/esm2015/lib/modules/inline-form/inline-form-adapter.service.js.map +1 -0
  10. package/esm2015/lib/modules/inline-form/inline-form.component.js +227 -0
  11. package/esm2015/lib/modules/inline-form/inline-form.component.js.map +1 -0
  12. package/esm2015/lib/modules/inline-form/inline-form.module.js +19 -0
  13. package/esm2015/lib/modules/inline-form/inline-form.module.js.map +1 -0
  14. package/esm2015/lib/modules/inline-form/types/inline-form-button-action.js +2 -0
  15. package/esm2015/lib/modules/inline-form/types/inline-form-button-action.js.map +1 -0
  16. package/esm2015/lib/modules/inline-form/types/inline-form-button-config.js +2 -0
  17. package/esm2015/lib/modules/inline-form/types/inline-form-button-config.js.map +1 -0
  18. package/esm2015/lib/modules/inline-form/types/inline-form-button-layout.js +9 -0
  19. package/esm2015/lib/modules/inline-form/types/inline-form-button-layout.js.map +1 -0
  20. package/esm2015/lib/modules/inline-form/types/inline-form-close-args.js +2 -0
  21. package/esm2015/lib/modules/inline-form/types/inline-form-close-args.js.map +1 -0
  22. package/esm2015/lib/modules/inline-form/types/inline-form-config.js +2 -0
  23. package/esm2015/lib/modules/inline-form/types/inline-form-config.js.map +1 -0
  24. package/esm2015/lib/modules/shared/sky-inline-form-resources.module.js +50 -0
  25. package/esm2015/lib/modules/shared/sky-inline-form-resources.module.js.map +1 -0
  26. package/esm2015/skyux-inline-form.js +2 -2
  27. package/esm2015/skyux-inline-form.js.map +1 -0
  28. package/fesm2015/skyux-inline-form.js +69 -77
  29. package/fesm2015/skyux-inline-form.js.map +1 -1
  30. package/index.d.ts +7 -0
  31. package/{modules → lib/modules}/inline-form/animations/slide-dissolve.d.ts +0 -0
  32. package/{modules → lib/modules}/inline-form/inline-form-adapter.service.d.ts +0 -0
  33. package/{modules → lib/modules}/inline-form/inline-form.component.d.ts +0 -0
  34. package/{modules → lib/modules}/inline-form/inline-form.module.d.ts +0 -0
  35. package/{modules → lib/modules}/inline-form/types/inline-form-button-action.d.ts +0 -0
  36. package/{modules → lib/modules}/inline-form/types/inline-form-button-config.d.ts +0 -0
  37. package/{modules → lib/modules}/inline-form/types/inline-form-button-layout.d.ts +0 -0
  38. package/{modules → lib/modules}/inline-form/types/inline-form-close-args.d.ts +0 -0
  39. package/{modules → lib/modules}/inline-form/types/inline-form-config.d.ts +0 -0
  40. package/{modules → lib/modules}/shared/sky-inline-form-resources.module.d.ts +0 -0
  41. package/package.json +20 -6
  42. package/skyux-inline-form.d.ts +1 -1
  43. package/bundles/skyux-inline-form.umd.js.map +0 -1
  44. package/esm2015/modules/inline-form/animations/slide-dissolve.js +0 -30
  45. package/esm2015/modules/inline-form/inline-form-adapter.service.js +0 -62
  46. package/esm2015/modules/inline-form/inline-form.component.js +0 -227
  47. package/esm2015/modules/inline-form/inline-form.module.js +0 -30
  48. package/esm2015/modules/inline-form/types/inline-form-button-action.js +0 -2
  49. package/esm2015/modules/inline-form/types/inline-form-button-config.js +0 -2
  50. package/esm2015/modules/inline-form/types/inline-form-button-layout.js +0 -9
  51. package/esm2015/modules/inline-form/types/inline-form-close-args.js +0 -2
  52. package/esm2015/modules/inline-form/types/inline-form-config.js +0 -2
  53. package/esm2015/modules/shared/sky-inline-form-resources.module.js +0 -41
  54. package/esm2015/public-api.js +0 -10
  55. package/public-api.d.ts +0 -7
@@ -130,10 +130,12 @@
130
130
  "name": "NgModule",
131
131
  "type": {
132
132
  "type": "reference",
133
+ "qualifiedName": "NgModuleDecorator",
134
+ "package": "@angular/core",
133
135
  "name": "NgModule"
134
136
  },
135
137
  "arguments": {
136
- "obj": "{\n declarations: [\n SkyInlineFormComponent\n ],\n imports: [\n CommonModule,\n SkyInlineFormResourcesModule\n ],\n exports: [\n SkyInlineFormComponent\n ]\n}"
138
+ "obj": "{\n declarations: [SkyInlineFormComponent],\n imports: [CommonModule, SkyInlineFormResourcesModule],\n exports: [SkyInlineFormComponent],\n}"
137
139
  }
138
140
  }
139
141
  ],
@@ -172,7 +174,7 @@
172
174
  "sources": [
173
175
  {
174
176
  "fileName": "projects/inline-form/src/modules/inline-form/inline-form.module.ts",
175
- "line": 29,
177
+ "line": 14,
176
178
  "character": 13
177
179
  }
178
180
  ]
@@ -191,10 +193,12 @@
191
193
  "name": "Component",
192
194
  "type": {
193
195
  "type": "reference",
196
+ "qualifiedName": "ComponentDecorator",
197
+ "package": "@angular/core",
194
198
  "name": "Component"
195
199
  },
196
200
  "arguments": {
197
- "obj": "{\n selector: 'sky-inline-form',\n templateUrl: './inline-form.component.html',\n styleUrls: ['./inline-form.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n SkyInlineFormAdapterService\n ],\n animations: [ skySlideDissolve ]\n}"
201
+ "obj": "{\n selector: 'sky-inline-form',\n templateUrl: './inline-form.component.html',\n styleUrls: ['./inline-form.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [SkyInlineFormAdapterService],\n animations: [skySlideDissolve],\n}"
198
202
  }
199
203
  }
200
204
  ],
@@ -208,7 +212,7 @@
208
212
  "sources": [
209
213
  {
210
214
  "fileName": "projects/inline-form/src/modules/inline-form/inline-form.component.ts",
211
- "line": 127,
215
+ "line": 105,
212
216
  "character": 2
213
217
  }
214
218
  ],
@@ -245,6 +249,8 @@
245
249
  "name": "any"
246
250
  }
247
251
  ],
252
+ "qualifiedName": "ElementRef",
253
+ "package": "@angular/core",
248
254
  "name": "ElementRef"
249
255
  }
250
256
  },
@@ -278,6 +284,8 @@
278
284
  "flags": {},
279
285
  "type": {
280
286
  "type": "reference",
287
+ "qualifiedName": "ChangeDetectorRef",
288
+ "package": "@angular/core",
281
289
  "name": "ChangeDetectorRef"
282
290
  }
283
291
  }
@@ -301,7 +309,7 @@
301
309
  "sources": [
302
310
  {
303
311
  "fileName": "projects/inline-form/src/modules/inline-form/inline-form.component.ts",
304
- "line": 121,
312
+ "line": 99,
305
313
  "character": 9
306
314
  }
307
315
  ],
@@ -330,6 +338,8 @@
330
338
  "name": "Output",
331
339
  "type": {
332
340
  "type": "reference",
341
+ "qualifiedName": "OutputDecorator",
342
+ "package": "@angular/core",
333
343
  "name": "Output"
334
344
  },
335
345
  "arguments": {}
@@ -338,7 +348,7 @@
338
348
  "sources": [
339
349
  {
340
350
  "fileName": "projects/inline-form/src/modules/inline-form/inline-form.component.ts",
341
- "line": 119,
351
+ "line": 97,
342
352
  "character": 9
343
353
  }
344
354
  ],
@@ -351,6 +361,8 @@
351
361
  "name": "SkyInlineFormCloseArgs"
352
362
  }
353
363
  ],
364
+ "qualifiedName": "EventEmitter",
365
+ "package": "@angular/core",
354
366
  "name": "EventEmitter"
355
367
  },
356
368
  "defaultValue": "..."
@@ -377,6 +389,8 @@
377
389
  "name": "Input",
378
390
  "type": {
379
391
  "type": "reference",
392
+ "qualifiedName": "InputDecorator",
393
+ "package": "@angular/core",
380
394
  "name": "Input"
381
395
  },
382
396
  "arguments": {}
@@ -385,7 +399,7 @@
385
399
  "sources": [
386
400
  {
387
401
  "fileName": "projects/inline-form/src/modules/inline-form/inline-form.component.ts",
388
- "line": 90,
402
+ "line": 67,
389
403
  "character": 9
390
404
  }
391
405
  ],
@@ -397,6 +411,8 @@
397
411
  "name": "any"
398
412
  }
399
413
  ],
414
+ "qualifiedName": "TemplateRef",
415
+ "package": "@angular/core",
400
416
  "name": "TemplateRef"
401
417
  }
402
418
  },
@@ -413,6 +429,8 @@
413
429
  "name": "Input",
414
430
  "type": {
415
431
  "type": "reference",
432
+ "qualifiedName": "InputDecorator",
433
+ "package": "@angular/core",
416
434
  "name": "Input"
417
435
  },
418
436
  "arguments": {}
@@ -421,7 +439,7 @@
421
439
  "sources": [
422
440
  {
423
441
  "fileName": "projects/inline-form/src/modules/inline-form/inline-form.component.ts",
424
- "line": 74,
442
+ "line": 51,
425
443
  "character": 13
426
444
  }
427
445
  ],
@@ -433,7 +451,13 @@
433
451
  "kindString": "Get signature",
434
452
  "flags": {},
435
453
  "comment": {
436
- "shortText": "Specifies configuration options for the buttons to display with the inline form."
454
+ "shortText": "Specifies configuration options for the buttons to display with the inline form.",
455
+ "tags": [
456
+ {
457
+ "tag": "required",
458
+ "text": "\n"
459
+ }
460
+ ]
437
461
  },
438
462
  "type": {
439
463
  "type": "reference",
@@ -492,6 +516,8 @@
492
516
  "name": "Input",
493
517
  "type": {
494
518
  "type": "reference",
519
+ "qualifiedName": "InputDecorator",
520
+ "package": "@angular/core",
495
521
  "name": "Input"
496
522
  },
497
523
  "arguments": {}
@@ -500,7 +526,7 @@
500
526
  "sources": [
501
527
  {
502
528
  "fileName": "projects/inline-form/src/modules/inline-form/inline-form.component.ts",
503
- "line": 98,
529
+ "line": 75,
504
530
  "character": 13
505
531
  }
506
532
  ],
@@ -512,7 +538,13 @@
512
538
  "kindString": "Get signature",
513
539
  "flags": {},
514
540
  "comment": {
515
- "shortText": "Indicates whether to display the inline form. Users can toggle between displaying\nand hiding the inline form."
541
+ "shortText": "Indicates whether to display the inline form. Users can toggle between displaying\nand hiding the inline form.",
542
+ "tags": [
543
+ {
544
+ "tag": "default",
545
+ "text": "false\n"
546
+ }
547
+ ]
516
548
  },
517
549
  "type": {
518
550
  "type": "intrinsic",
@@ -567,7 +599,7 @@
567
599
  "sources": [
568
600
  {
569
601
  "fileName": "projects/inline-form/src/modules/inline-form/inline-form.component.ts",
570
- "line": 143,
602
+ "line": 121,
571
603
  "character": 9
572
604
  }
573
605
  ],
@@ -610,7 +642,7 @@
610
642
  "sources": [
611
643
  {
612
644
  "fileName": "projects/inline-form/src/modules/inline-form/inline-form.component.ts",
613
- "line": 139,
645
+ "line": 117,
614
646
  "character": 9
615
647
  }
616
648
  ],
@@ -647,7 +679,7 @@
647
679
  "sources": [
648
680
  {
649
681
  "fileName": "projects/inline-form/src/modules/inline-form/inline-form.component.ts",
650
- "line": 135,
682
+ "line": 113,
651
683
  "character": 9
652
684
  }
653
685
  ],
@@ -712,17 +744,21 @@
712
744
  "sources": [
713
745
  {
714
746
  "fileName": "projects/inline-form/src/modules/inline-form/inline-form.component.ts",
715
- "line": 67,
747
+ "line": 45,
716
748
  "character": 13
717
749
  }
718
750
  ],
719
751
  "implementedTypes": [
720
752
  {
721
753
  "type": "reference",
754
+ "qualifiedName": "OnInit",
755
+ "package": "@angular/core",
722
756
  "name": "OnInit"
723
757
  },
724
758
  {
725
759
  "type": "reference",
760
+ "qualifiedName": "OnDestroy",
761
+ "package": "@angular/core",
726
762
  "name": "OnDestroy"
727
763
  }
728
764
  ]
@@ -755,7 +791,7 @@
755
791
  "sources": [
756
792
  {
757
793
  "fileName": "projects/inline-form/src/modules/inline-form/types/inline-form-button-config.ts",
758
- "line": 11,
794
+ "line": 10,
759
795
  "character": 2
760
796
  }
761
797
  ],
@@ -784,7 +820,7 @@
784
820
  "sources": [
785
821
  {
786
822
  "fileName": "projects/inline-form/src/modules/inline-form/types/inline-form-button-config.ts",
787
- "line": 23,
823
+ "line": 22,
788
824
  "character": 2
789
825
  }
790
826
  ],
@@ -807,7 +843,7 @@
807
843
  "sources": [
808
844
  {
809
845
  "fileName": "projects/inline-form/src/modules/inline-form/types/inline-form-button-config.ts",
810
- "line": 31,
846
+ "line": 30,
811
847
  "character": 2
812
848
  }
813
849
  ],
@@ -834,7 +870,7 @@
834
870
  "sources": [
835
871
  {
836
872
  "fileName": "projects/inline-form/src/modules/inline-form/types/inline-form-button-config.ts",
837
- "line": 17,
873
+ "line": 16,
838
874
  "character": 2
839
875
  }
840
876
  ],
@@ -938,7 +974,7 @@
938
974
  "sources": [
939
975
  {
940
976
  "fileName": "projects/inline-form/src/modules/inline-form/types/inline-form-config.ts",
941
- "line": 20,
977
+ "line": 16,
942
978
  "character": 2
943
979
  }
944
980
  ],
@@ -962,7 +998,7 @@
962
998
  "sources": [
963
999
  {
964
1000
  "fileName": "projects/inline-form/src/modules/inline-form/types/inline-form-config.ts",
965
- "line": 24,
1001
+ "line": 20,
966
1002
  "character": 2
967
1003
  }
968
1004
  ],
@@ -989,7 +1025,7 @@
989
1025
  "sources": [
990
1026
  {
991
1027
  "fileName": "projects/inline-form/src/modules/inline-form/types/inline-form-config.ts",
992
- "line": 12,
1028
+ "line": 8,
993
1029
  "character": 17
994
1030
  }
995
1031
  ]
@@ -1023,7 +1059,7 @@
1023
1059
  ],
1024
1060
  "sources": [
1025
1061
  {
1026
- "fileName": "projects/inline-form/src/public-api.ts",
1062
+ "fileName": "index.ts",
1027
1063
  "line": 1,
1028
1064
  "character": 0
1029
1065
  }
@@ -1033,37 +1069,37 @@
1033
1069
  {
1034
1070
  "fileName": "inline-form-demo.component.html",
1035
1071
  "filePath": "/projects/inline-form/documentation/code-examples/inline-form/basic/inline-form-demo.component.html",
1036
- "rawContents": "<sky-inline-form\n [config]=\"inlineFormConfig\"\n [showForm]=\"showForm\"\n [template]=\"inlineFormTemplate\"\n (close)=\"onInlineFormClose($event)\"\n>\n <table>\n <tr>\n <th>\n First name:\n </th>\n <td>\n {{ firstName }}\n </td>\n <td>\n <button\n aria-label=\"Edit\"\n class=\"sky-btn sky-btn-link sky-demo-btn-edit\"\n (click)=\"onInlineFormOpen()\"\n >\n <sky-icon\n icon=\"pencil\"\n ></sky-icon>\n </button>\n </td>\n </tr>\n </table>\n</sky-inline-form>\n\n<ng-template\n #inlineFormTemplate\n>\n <form\n novalidate\n [formGroup]=\"myForm\"\n >\n <div\n class=\"sky-form-group\"\n >\n <sky-input-box>\n <label\n class=\"sky-control-label\"\n [for]=\"firstNameInput.id\"\n >\n First name\n </label>\n <input\n class=\"sky-form-control\"\n formControlName=\"myFirstName\"\n skyId\n type=\"text\"\n #firstNameInput=\"skyId\"\n />\n </sky-input-box>\n </div>\n </form>\n</ng-template>\n"
1072
+ "rawContents": "<sky-inline-form\n [config]=\"inlineFormConfig\"\n [showForm]=\"showForm\"\n [template]=\"inlineFormTemplate\"\n (close)=\"onInlineFormClose($event)\"\n>\n <table>\n <tr>\n <th>First name:</th>\n <td>\n {{ firstName }}\n </td>\n <td>\n <button\n aria-label=\"Edit\"\n class=\"sky-btn sky-btn-link sky-demo-btn-edit\"\n (click)=\"onInlineFormOpen()\"\n >\n <sky-icon icon=\"pencil\"></sky-icon>\n </button>\n </td>\n </tr>\n </table>\n</sky-inline-form>\n\n<ng-template #inlineFormTemplate>\n <form novalidate [formGroup]=\"myForm\">\n <div class=\"sky-form-group\">\n <sky-input-box>\n <label class=\"sky-control-label\" [for]=\"firstNameInput.id\">\n First name\n </label>\n <input\n class=\"sky-form-control\"\n formControlName=\"myFirstName\"\n skyId\n type=\"text\"\n #firstNameInput=\"skyId\"\n />\n </sky-input-box>\n </div>\n </form>\n</ng-template>\n"
1037
1073
  },
1038
1074
  {
1039
1075
  "fileName": "inline-form-demo.component.ts",
1040
1076
  "filePath": "/projects/inline-form/documentation/code-examples/inline-form/basic/inline-form-demo.component.ts",
1041
- "rawContents": "import {\n Component,\n OnInit\n} from '@angular/core';\n\nimport {\n FormBuilder,\n FormControl,\n FormGroup\n} from '@angular/forms';\n\nimport {\n SkyInlineFormButtonLayout,\n SkyInlineFormCloseArgs,\n SkyInlineFormConfig\n} from '@skyux/inline-form';\n\n@Component({\n selector: 'app-inline-form-demo',\n templateUrl: './inline-form-demo.component.html'\n})\nexport class InlineFormDemoComponent implements OnInit {\n\n public firstName: string = 'Jane';\n\n public myForm: FormGroup;\n\n public inlineFormConfig: SkyInlineFormConfig = {\n buttonLayout: SkyInlineFormButtonLayout.SaveCancel\n };\n\n public showForm: boolean = false;\n\n constructor(private formBuilder: FormBuilder) {}\n\n public ngOnInit(): void {\n this.myForm = this.formBuilder.group({\n myFirstName: new FormControl()\n });\n }\n\n public onInlineFormClose(args: SkyInlineFormCloseArgs): void {\n if (args.reason === 'save') {\n this.firstName = this.myForm.get('myFirstName').value;\n }\n\n this.showForm = false;\n this.myForm.patchValue({\n myFirstName: undefined\n });\n }\n\n public onInlineFormOpen(): void {\n this.showForm = true;\n this.myForm.patchValue({\n myFirstName: this.firstName\n });\n }\n\n}\n"
1077
+ "rawContents": "import { Component, OnInit } from '@angular/core';\n\nimport { FormBuilder, FormControl, FormGroup } from '@angular/forms';\n\nimport {\n SkyInlineFormButtonLayout,\n SkyInlineFormCloseArgs,\n SkyInlineFormConfig,\n} from '@skyux/inline-form';\n\n@Component({\n selector: 'app-inline-form-demo',\n templateUrl: './inline-form-demo.component.html',\n})\nexport class InlineFormDemoComponent implements OnInit {\n public firstName = 'Jane';\n\n public myForm: FormGroup;\n\n public inlineFormConfig: SkyInlineFormConfig = {\n buttonLayout: SkyInlineFormButtonLayout.SaveCancel,\n };\n\n public showForm = false;\n\n constructor(private formBuilder: FormBuilder) {}\n\n public ngOnInit(): void {\n this.myForm = this.formBuilder.group({\n myFirstName: new FormControl(),\n });\n }\n\n public onInlineFormClose(args: SkyInlineFormCloseArgs): void {\n if (args.reason === 'save') {\n this.firstName = this.myForm.get('myFirstName').value;\n }\n\n this.showForm = false;\n this.myForm.patchValue({\n myFirstName: undefined,\n });\n }\n\n public onInlineFormOpen(): void {\n this.showForm = true;\n this.myForm.patchValue({\n myFirstName: this.firstName,\n });\n }\n}\n"
1042
1078
  },
1043
1079
  {
1044
1080
  "fileName": "inline-form-demo.module.ts",
1045
1081
  "filePath": "/projects/inline-form/documentation/code-examples/inline-form/basic/inline-form-demo.module.ts",
1046
- "rawContents": "import {\n CommonModule\n} from '@angular/common';\n\nimport {\n NgModule\n} from '@angular/core';\n\nimport {\n ReactiveFormsModule\n} from '@angular/forms';\n\nimport {\n SkyIdModule\n} from '@skyux/core';\n\nimport {\n SkyInputBoxModule\n} from '@skyux/forms';\n\nimport {\n SkyIconModule\n} from '@skyux/indicators';\n\nimport {\n SkyInlineFormModule\n} from '@skyux/inline-form';\n\nimport {\n InlineFormDemoComponent\n} from './inline-form-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n SkyIconModule,\n SkyIdModule,\n SkyInlineFormModule,\n SkyInputBoxModule\n ],\n exports: [\n InlineFormDemoComponent\n ],\n declarations: [\n InlineFormDemoComponent\n ]\n})\nexport class InlineFormDemoModule { }\n"
1082
+ "rawContents": "import { CommonModule } from '@angular/common';\n\nimport { NgModule } from '@angular/core';\n\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { SkyIdModule } from '@skyux/core';\n\nimport { SkyInputBoxModule } from '@skyux/forms';\n\nimport { SkyIconModule } from '@skyux/indicators';\n\nimport { SkyInlineFormModule } from '@skyux/inline-form';\n\nimport { InlineFormDemoComponent } from './inline-form-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n SkyIconModule,\n SkyIdModule,\n SkyInlineFormModule,\n SkyInputBoxModule,\n ],\n exports: [InlineFormDemoComponent],\n declarations: [InlineFormDemoComponent],\n})\nexport class InlineFormDemoModule {}\n"
1047
1083
  },
1048
1084
  {
1049
1085
  "fileName": "inline-form-demo.component.html",
1050
1086
  "filePath": "/projects/inline-form/documentation/code-examples/inline-form/custom-buttons/inline-form-demo.component.html",
1051
- "rawContents": "<sky-inline-form\n [config]=\"inlineFormConfig\"\n [showForm]=\"showForm\"\n [template]=\"inlineFormTemplate\"\n (close)=\"onInlineFormClose($event)\"\n>\n <table>\n <tr>\n <th>\n First name:\n </th>\n <td>\n {{ firstName }}\n </td>\n <td>\n <button\n aria-label=\"Edit\"\n class=\"sky-btn sky-btn-link sky-demo-btn-edit\"\n (click)=\"onInlineFormOpen()\"\n >\n <sky-icon\n icon=\"pencil\"\n ></sky-icon>\n </button>\n </td>\n </tr>\n </table>\n</sky-inline-form>\n\n<ng-template\n #inlineFormTemplate\n>\n <form\n novalidate\n [formGroup]=\"myForm\"\n >\n <div\n class=\"sky-form-group\"\n >\n <sky-input-box>\n <label\n class=\"sky-control-label sky-control-label-required\"\n [for]=\"firstNameInput.id\"\n >\n First name\n </label>\n <input\n class=\"sky-form-control\"\n formControlName=\"myFirstName\"\n required\n skyId\n type=\"text\"\n #firstNameInput=\"skyId\"\n />\n </sky-input-box>\n </div>\n </form>\n</ng-template>\n"
1087
+ "rawContents": "<sky-inline-form\n [config]=\"inlineFormConfig\"\n [showForm]=\"showForm\"\n [template]=\"inlineFormTemplate\"\n (close)=\"onInlineFormClose($event)\"\n>\n <table>\n <tr>\n <th>First name:</th>\n <td>\n {{ firstName }}\n </td>\n <td>\n <button\n aria-label=\"Edit\"\n class=\"sky-btn sky-btn-link sky-demo-btn-edit\"\n (click)=\"onInlineFormOpen()\"\n >\n <sky-icon icon=\"pencil\"></sky-icon>\n </button>\n </td>\n </tr>\n </table>\n</sky-inline-form>\n\n<ng-template #inlineFormTemplate>\n <form novalidate [formGroup]=\"myForm\">\n <div class=\"sky-form-group\">\n <sky-input-box>\n <label\n class=\"sky-control-label sky-control-label-required\"\n [for]=\"firstNameInput.id\"\n >\n First name\n </label>\n <input\n class=\"sky-form-control\"\n formControlName=\"myFirstName\"\n required\n skyId\n type=\"text\"\n #firstNameInput=\"skyId\"\n />\n </sky-input-box>\n </div>\n </form>\n</ng-template>\n"
1052
1088
  },
1053
1089
  {
1054
1090
  "fileName": "inline-form-demo.component.ts",
1055
1091
  "filePath": "/projects/inline-form/documentation/code-examples/inline-form/custom-buttons/inline-form-demo.component.ts",
1056
- "rawContents": "import {\n Component,\n OnInit\n} from '@angular/core';\n\nimport {\n FormBuilder,\n FormControl,\n FormGroup\n} from '@angular/forms';\n\nimport {\n SkyInlineFormButtonLayout,\n SkyInlineFormCloseArgs,\n SkyInlineFormConfig\n} from '@skyux/inline-form';\n\n@Component({\n selector: 'app-inline-form-demo',\n templateUrl: './inline-form-demo.component.html'\n})\nexport class InlineFormDemoComponent implements OnInit {\n\n public firstName: string = 'Jane';\n\n public myForm: FormGroup;\n\n public inlineFormConfig: SkyInlineFormConfig = {\n buttonLayout: SkyInlineFormButtonLayout.Custom,\n buttons: [\n {\n action: 'save',\n text: 'Save',\n styleType: 'primary'\n },\n {\n action: 'delete',\n text: 'Delete',\n styleType: 'default'\n },\n {\n action: 'reset',\n text: 'Reset',\n styleType: 'default'\n },\n {\n action: 'cancel',\n text: 'Cancel',\n styleType: 'link'\n }\n ]\n };\n\n public showForm: boolean = false;\n\n constructor(private formBuilder: FormBuilder) {}\n\n public ngOnInit(): void {\n this.myForm = this.formBuilder.group({\n myFirstName: new FormControl()\n });\n\n this.myForm.valueChanges.subscribe(() => {\n if (this.inlineFormConfig.buttons[0].disabled !== this.myForm.invalid) {\n this.inlineFormConfig.buttons[0].disabled = this.myForm.invalid;\n this.inlineFormConfig = {...{ }, ...this.inlineFormConfig};\n }\n });\n }\n\n public onInlineFormClose(args: SkyInlineFormCloseArgs): void {\n if (args.reason === 'save') {\n this.firstName = this.myForm.get('myFirstName').value;\n }\n\n this.showForm = false;\n this.myForm.patchValue({\n myFirstName: undefined\n });\n }\n\n public onInlineFormOpen(): void {\n this.showForm = true;\n this.myForm.patchValue({\n myFirstName: this.firstName\n });\n }\n\n}\n"
1092
+ "rawContents": "import { Component, OnInit } from '@angular/core';\n\nimport { FormBuilder, FormControl, FormGroup } from '@angular/forms';\n\nimport {\n SkyInlineFormButtonLayout,\n SkyInlineFormCloseArgs,\n SkyInlineFormConfig,\n} from '@skyux/inline-form';\n\n@Component({\n selector: 'app-inline-form-demo',\n templateUrl: './inline-form-demo.component.html',\n})\nexport class InlineFormDemoComponent implements OnInit {\n public firstName = 'Jane';\n\n public myForm: FormGroup;\n\n public inlineFormConfig: SkyInlineFormConfig = {\n buttonLayout: SkyInlineFormButtonLayout.Custom,\n buttons: [\n {\n action: 'save',\n text: 'Save',\n styleType: 'primary',\n },\n {\n action: 'delete',\n text: 'Delete',\n styleType: 'default',\n },\n {\n action: 'reset',\n text: 'Reset',\n styleType: 'default',\n },\n {\n action: 'cancel',\n text: 'Cancel',\n styleType: 'link',\n },\n ],\n };\n\n public showForm = false;\n\n constructor(private formBuilder: FormBuilder) {}\n\n public ngOnInit(): void {\n this.myForm = this.formBuilder.group({\n myFirstName: new FormControl(),\n });\n\n this.myForm.valueChanges.subscribe(() => {\n if (this.inlineFormConfig.buttons[0].disabled !== this.myForm.invalid) {\n this.inlineFormConfig.buttons[0].disabled = this.myForm.invalid;\n this.inlineFormConfig = { ...{}, ...this.inlineFormConfig };\n }\n });\n }\n\n public onInlineFormClose(args: SkyInlineFormCloseArgs): void {\n if (args.reason === 'save') {\n this.firstName = this.myForm.get('myFirstName').value;\n }\n\n this.showForm = false;\n this.myForm.patchValue({\n myFirstName: undefined,\n });\n }\n\n public onInlineFormOpen(): void {\n this.showForm = true;\n this.myForm.patchValue({\n myFirstName: this.firstName,\n });\n }\n}\n"
1057
1093
  },
1058
1094
  {
1059
1095
  "fileName": "inline-form-demo.module.ts",
1060
1096
  "filePath": "/projects/inline-form/documentation/code-examples/inline-form/custom-buttons/inline-form-demo.module.ts",
1061
- "rawContents": "import {\n CommonModule\n} from '@angular/common';\n\nimport {\n NgModule\n} from '@angular/core';\n\nimport {\n ReactiveFormsModule\n} from '@angular/forms';\n\nimport {\n SkyIdModule\n} from '@skyux/core';\n\nimport {\n SkyInputBoxModule\n} from '@skyux/forms';\n\nimport {\n SkyIconModule\n} from '@skyux/indicators';\n\nimport {\n SkyInlineFormModule\n} from '@skyux/inline-form';\n\nimport {\n InlineFormDemoComponent\n} from './inline-form-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n SkyIconModule,\n SkyIdModule,\n SkyInlineFormModule,\n SkyInputBoxModule\n ],\n exports: [\n InlineFormDemoComponent\n ],\n declarations: [\n InlineFormDemoComponent\n ]\n})\nexport class InlineFormDemoModule { }\n"
1097
+ "rawContents": "import { CommonModule } from '@angular/common';\n\nimport { NgModule } from '@angular/core';\n\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { SkyIdModule } from '@skyux/core';\n\nimport { SkyInputBoxModule } from '@skyux/forms';\n\nimport { SkyIconModule } from '@skyux/indicators';\n\nimport { SkyInlineFormModule } from '@skyux/inline-form';\n\nimport { InlineFormDemoComponent } from './inline-form-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n SkyIconModule,\n SkyIdModule,\n SkyInlineFormModule,\n SkyInputBoxModule,\n ],\n exports: [InlineFormDemoComponent],\n declarations: [InlineFormDemoComponent],\n})\nexport class InlineFormDemoModule {}\n"
1062
1098
  },
1063
1099
  {
1064
1100
  "fileName": "inline-form-demo.component.html",
1065
1101
  "filePath": "/projects/inline-form/documentation/code-examples/inline-form/repeaters/inline-form-demo.component.html",
1066
- "rawContents": "<sky-repeater>\n <sky-repeater-item *ngFor=\"let item of items\"\n [inlineFormConfig]=\"inlineFormConfig\"\n [inlineFormTemplate]=\"inlineFormTemplate\"\n [showInlineForm]=\"activeInlineFormId === item.id\"\n (inlineFormClose)=\"onInlineFormClose($event)\"\n >\n\n <sky-repeater-item-title\n class=\"demo-repeater-flex\"\n >\n <div\n class=\"sky-emphasized\"\n >\n {{ item.title }}\n </div>\n <div>\n <button\n aria-label=\"Edit\"\n class=\"sky-btn sky-btn-link sky-btn-link-inline sky-no-focus sky-demo-btn-edit\"\n type=\"button\"\n (click)=\"showInlineForm(item)\"\n >\n <sky-icon\n icon=\"pencil\"\n >\n </sky-icon>\n </button>\n </div>\n </sky-repeater-item-title>\n\n <sky-repeater-item-content>\n {{ item.note }}\n </sky-repeater-item-content>\n\n </sky-repeater-item>\n</sky-repeater>\n\n<ng-template\n #inlineFormTemplate\n>\n <form\n novalidate\n [formGroup]=\"myForm\"\n >\n <div\n class=\"sky-form-group\"\n >\n <sky-input-box>\n <label\n class=\"sky-control-label\"\n [for]=\"myTitle.id\"\n >\n Title\n </label>\n <input\n class=\"sky-form-control\"\n formControlName=\"title\"\n skyId\n type=\"text\"\n #myTitle=\"skyId\"\n />\n </sky-input-box>\n </div>\n <div\n class=\"sky-form-group\"\n >\n <sky-input-box>\n <label\n class=\"sky-control-label\"\n [for]=\"myNote.id\"\n >\n Note\n </label>\n <input\n class=\"sky-form-control\"\n formControlName=\"note\"\n skyId\n type=\"text\"\n #myNote=\"skyId\"\n />\n </sky-input-box>\n </div>\n </form>\n</ng-template>\n"
1102
+ "rawContents": "<sky-repeater>\n <sky-repeater-item\n *ngFor=\"let item of items\"\n [inlineFormConfig]=\"inlineFormConfig\"\n [inlineFormTemplate]=\"inlineFormTemplate\"\n [showInlineForm]=\"activeInlineFormId === item.id\"\n (inlineFormClose)=\"onInlineFormClose($event)\"\n >\n <sky-repeater-item-title class=\"demo-repeater-flex\">\n <div class=\"sky-emphasized\">\n {{ item.title }}\n </div>\n <div>\n <button\n aria-label=\"Edit\"\n class=\"\n sky-btn\n sky-btn-link\n sky-btn-link-inline\n sky-no-focus\n sky-demo-btn-edit\n \"\n type=\"button\"\n (click)=\"showInlineForm(item)\"\n >\n <sky-icon icon=\"pencil\"> </sky-icon>\n </button>\n </div>\n </sky-repeater-item-title>\n\n <sky-repeater-item-content>\n {{ item.note }}\n </sky-repeater-item-content>\n </sky-repeater-item>\n</sky-repeater>\n\n<ng-template #inlineFormTemplate>\n <form novalidate [formGroup]=\"myForm\">\n <div class=\"sky-form-group\">\n <sky-input-box>\n <label class=\"sky-control-label\" [for]=\"myTitle.id\"> Title </label>\n <input\n class=\"sky-form-control\"\n formControlName=\"title\"\n skyId\n type=\"text\"\n #myTitle=\"skyId\"\n />\n </sky-input-box>\n </div>\n <div class=\"sky-form-group\">\n <sky-input-box>\n <label class=\"sky-control-label\" [for]=\"myNote.id\"> Note </label>\n <input\n class=\"sky-form-control\"\n formControlName=\"note\"\n skyId\n type=\"text\"\n #myNote=\"skyId\"\n />\n </sky-input-box>\n </div>\n </form>\n</ng-template>\n"
1067
1103
  },
1068
1104
  {
1069
1105
  "fileName": "inline-form-demo.component.scss",
@@ -1073,12 +1109,12 @@
1073
1109
  {
1074
1110
  "fileName": "inline-form-demo.component.ts",
1075
1111
  "filePath": "/projects/inline-form/documentation/code-examples/inline-form/repeaters/inline-form-demo.component.ts",
1076
- "rawContents": "import {\n Component,\n OnInit\n} from '@angular/core';\n\nimport {\n FormBuilder,\n FormControl,\n FormGroup\n} from '@angular/forms';\n\nimport {\n SkyInlineFormButtonLayout,\n SkyInlineFormCloseArgs,\n SkyInlineFormConfig\n} from '@skyux/inline-form';\n\n@Component({\n selector: 'app-inline-form-demo',\n templateUrl: './inline-form-demo.component.html',\n styleUrls: ['./inline-form-demo.component.scss']\n})\nexport class InlineFormDemoComponent implements OnInit {\n\n public activeInlineFormId: string;\n\n public inlineFormConfig: SkyInlineFormConfig = {\n buttonLayout: SkyInlineFormButtonLayout.SaveCancel\n };\n\n public items: any[] = [\n {\n id: '1',\n title: '2019 Spring Gala',\n note: 'Gala for friends and family'\n },\n {\n id: '2',\n title: '2019 Special Winter Event',\n note: 'A special event'\n },\n {\n id: '3',\n title: '2019 Donor Appreciation Event',\n note: 'Event for all donors and families'\n },\n {\n id: '4',\n title: '2020 Spring Gala',\n note: 'Gala for friends and family'\n }\n ];\n\n public myForm: FormGroup;\n\n constructor(private formBuilder: FormBuilder) {}\n\n public ngOnInit(): void {\n this.myForm = this.formBuilder.group({\n id: new FormControl(),\n title: new FormControl(),\n note: new FormControl()\n });\n }\n\n public showInlineForm(item: any): void {\n this.activeInlineFormId = item.id;\n this.myForm.patchValue({\n note: item.note,\n title: item.title\n });\n }\n\n public onInlineFormClose(args: SkyInlineFormCloseArgs): void {\n if (args.reason === 'save') {\n const found = this.items.find(item => item.id === this.activeInlineFormId);\n found.note = this.myForm.get('note').value;\n found.title = this.myForm.get('title').value;\n }\n\n this.myForm.patchValue({\n note: undefined,\n title: undefined\n });\n\n // Close the active form.\n this.activeInlineFormId = undefined;\n }\n\n}\n"
1112
+ "rawContents": "import { Component, OnInit } from '@angular/core';\n\nimport { FormBuilder, FormControl, FormGroup } from '@angular/forms';\n\nimport {\n SkyInlineFormButtonLayout,\n SkyInlineFormCloseArgs,\n SkyInlineFormConfig,\n} from '@skyux/inline-form';\n\n@Component({\n selector: 'app-inline-form-demo',\n templateUrl: './inline-form-demo.component.html',\n styleUrls: ['./inline-form-demo.component.scss'],\n})\nexport class InlineFormDemoComponent implements OnInit {\n public activeInlineFormId: string;\n\n public inlineFormConfig: SkyInlineFormConfig = {\n buttonLayout: SkyInlineFormButtonLayout.SaveCancel,\n };\n\n public items: any[] = [\n {\n id: '1',\n title: '2019 Spring Gala',\n note: 'Gala for friends and family',\n },\n {\n id: '2',\n title: '2019 Special Winter Event',\n note: 'A special event',\n },\n {\n id: '3',\n title: '2019 Donor Appreciation Event',\n note: 'Event for all donors and families',\n },\n {\n id: '4',\n title: '2020 Spring Gala',\n note: 'Gala for friends and family',\n },\n ];\n\n public myForm: FormGroup;\n\n constructor(private formBuilder: FormBuilder) {}\n\n public ngOnInit(): void {\n this.myForm = this.formBuilder.group({\n id: new FormControl(),\n title: new FormControl(),\n note: new FormControl(),\n });\n }\n\n public showInlineForm(item: any): void {\n this.activeInlineFormId = item.id;\n this.myForm.patchValue({\n note: item.note,\n title: item.title,\n });\n }\n\n public onInlineFormClose(args: SkyInlineFormCloseArgs): void {\n if (args.reason === 'save') {\n const found = this.items.find(\n (item) => item.id === this.activeInlineFormId\n );\n found.note = this.myForm.get('note').value;\n found.title = this.myForm.get('title').value;\n }\n\n this.myForm.patchValue({\n note: undefined,\n title: undefined,\n });\n\n // Close the active form.\n this.activeInlineFormId = undefined;\n }\n}\n"
1077
1113
  },
1078
1114
  {
1079
1115
  "fileName": "inline-form-demo.module.ts",
1080
1116
  "filePath": "/projects/inline-form/documentation/code-examples/inline-form/repeaters/inline-form-demo.module.ts",
1081
- "rawContents": "import {\n CommonModule\n} from '@angular/common';\n\nimport {\n NgModule\n} from '@angular/core';\n\nimport {\n ReactiveFormsModule\n} from '@angular/forms';\n\nimport {\n SkyIdModule\n} from '@skyux/core';\n\nimport {\n SkyInputBoxModule\n} from '@skyux/forms';\n\nimport {\n SkyIconModule\n} from '@skyux/indicators';\n\nimport {\n SkyInlineFormModule\n} from '@skyux/inline-form';\n\nimport {\n SkyRepeaterModule\n} from '@skyux/lists';\n\nimport {\n InlineFormDemoComponent\n} from './inline-form-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n SkyIconModule,\n SkyIdModule,\n SkyInlineFormModule,\n SkyInputBoxModule,\n SkyRepeaterModule\n ],\n exports: [\n InlineFormDemoComponent\n ],\n declarations: [\n InlineFormDemoComponent\n ]\n})\nexport class InlineFormDemoModule { }\n"
1117
+ "rawContents": "import { CommonModule } from '@angular/common';\n\nimport { NgModule } from '@angular/core';\n\nimport { ReactiveFormsModule } from '@angular/forms';\n\nimport { SkyIdModule } from '@skyux/core';\n\nimport { SkyInputBoxModule } from '@skyux/forms';\n\nimport { SkyIconModule } from '@skyux/indicators';\n\nimport { SkyInlineFormModule } from '@skyux/inline-form';\n\nimport { SkyRepeaterModule } from '@skyux/lists';\n\nimport { InlineFormDemoComponent } from './inline-form-demo.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n SkyIconModule,\n SkyIdModule,\n SkyInlineFormModule,\n SkyInputBoxModule,\n SkyRepeaterModule,\n ],\n exports: [InlineFormDemoComponent],\n declarations: [InlineFormDemoComponent],\n})\nexport class InlineFormDemoModule {}\n"
1082
1118
  }
1083
1119
  ]
1084
- }
1120
+ }
@@ -0,0 +1,10 @@
1
+ export * from './lib/modules/inline-form/inline-form.module';
2
+ export * from './lib/modules/inline-form/types/inline-form-button-action';
3
+ export * from './lib/modules/inline-form/types/inline-form-button-config';
4
+ export * from './lib/modules/inline-form/types/inline-form-close-args';
5
+ export * from './lib/modules/inline-form/types/inline-form-config';
6
+ export * from './lib/modules/inline-form/types/inline-form-button-layout';
7
+ // Components and directives must be exported to support Angular’s “partial” Ivy compiler.
8
+ // Obscure names are used to indicate types are not part of the public API.
9
+ export { SkyInlineFormComponent as λ1 } from './lib/modules/inline-form/inline-form.component';
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/components/inline-form/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8CAA8C,CAAC;AAC7D,cAAc,2DAA2D,CAAC;AAC1E,cAAc,2DAA2D,CAAC;AAC1E,cAAc,wDAAwD,CAAC;AACvE,cAAc,oDAAoD,CAAC;AACnE,cAAc,2DAA2D,CAAC;AAE1E,0FAA0F;AAC1F,2EAA2E;AAC3E,OAAO,EAAE,sBAAsB,IAAI,EAAE,EAAE,MAAM,iDAAiD,CAAC","sourcesContent":["export * from './lib/modules/inline-form/inline-form.module';\nexport * from './lib/modules/inline-form/types/inline-form-button-action';\nexport * from './lib/modules/inline-form/types/inline-form-button-config';\nexport * from './lib/modules/inline-form/types/inline-form-close-args';\nexport * from './lib/modules/inline-form/types/inline-form-config';\nexport * from './lib/modules/inline-form/types/inline-form-button-layout';\n\n// Components and directives must be exported to support Angular’s “partial” Ivy compiler.\n// Obscure names are used to indicate types are not part of the public API.\nexport { SkyInlineFormComponent as λ1 } from './lib/modules/inline-form/inline-form.component';\n"]}
@@ -0,0 +1,26 @@
1
+ import { animate, group, query, style, transition, trigger, } from '@angular/animations';
2
+ export const skySlideDissolve = trigger('skySlideDissolve', [
3
+ transition('* <=> *', [
4
+ // Expand animations
5
+ query('.sky-slide-dissolve-last:enter', [
6
+ style({ height: 0, opacity: 0 }),
7
+ animate('200ms ease-in', style({ height: '*', opacity: 0 })),
8
+ ], { optional: true }),
9
+ query('.sky-slide-dissolve-last:enter', [
10
+ style({ opacity: 0 }),
11
+ animate('200ms ease-in', style({ opacity: 1 })),
12
+ ], { optional: true }),
13
+ // Collapse animations
14
+ // The expanded content should fade out immediately to prevent
15
+ // any overlap with the read-only content that's returning to the screen.
16
+ query('.sky-slide-dissolve-last:leave', [animate('0ms', style({ opacity: 0 }))], { optional: true }),
17
+ group([
18
+ query('.sky-slide-dissolve-first:enter', [
19
+ style({ opacity: 0, height: 0 }),
20
+ animate('100ms ease-in', style({ opacity: 1, height: '*' })),
21
+ ], { optional: true }),
22
+ query('.sky-slide-dissolve-last:leave', [animate('200ms ease-in', style({ height: 0 }))], { optional: true }),
23
+ ]),
24
+ ]),
25
+ ]);
26
+ //# sourceMappingURL=slide-dissolve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slide-dissolve.js","sourceRoot":"","sources":["../../../../../../../../../libs/components/inline-form/src/lib/modules/inline-form/animations/slide-dissolve.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAEP,KAAK,EACL,KAAK,EACL,KAAK,EACL,UAAU,EACV,OAAO,GACR,MAAM,qBAAqB,CAAC;AAE7B,MAAM,CAAC,MAAM,gBAAgB,GAA6B,OAAO,CAC/D,kBAAkB,EAClB;IACE,UAAU,CAAC,SAAS,EAAE;QACpB,oBAAoB;QACpB,KAAK,CACH,gCAAgC,EAChC;YACE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;YAChC,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;SAC7D,EACD,EAAE,QAAQ,EAAE,IAAI,EAAE,CACnB;QACD,KAAK,CACH,gCAAgC,EAChC;YACE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;YACrB,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;SAChD,EACD,EAAE,QAAQ,EAAE,IAAI,EAAE,CACnB;QAED,sBAAsB;QACtB,8DAA8D;QAC9D,yEAAyE;QACzE,KAAK,CACH,gCAAgC,EAChC,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EACvC,EAAE,QAAQ,EAAE,IAAI,EAAE,CACnB;QAED,KAAK,CAAC;YACJ,KAAK,CACH,iCAAiC,EACjC;gBACE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;gBAChC,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;aAC7D,EACD,EAAE,QAAQ,EAAE,IAAI,EAAE,CACnB;YACD,KAAK,CACH,gCAAgC,EAChC,CAAC,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAChD,EAAE,QAAQ,EAAE,IAAI,EAAE,CACnB;SACF,CAAC;KACH,CAAC;CACH,CACF,CAAC","sourcesContent":["import {\n animate,\n AnimationTriggerMetadata,\n group,\n query,\n style,\n transition,\n trigger,\n} from '@angular/animations';\n\nexport const skySlideDissolve: AnimationTriggerMetadata = trigger(\n 'skySlideDissolve',\n [\n transition('* <=> *', [\n // Expand animations\n query(\n '.sky-slide-dissolve-last:enter',\n [\n style({ height: 0, opacity: 0 }),\n animate('200ms ease-in', style({ height: '*', opacity: 0 })),\n ],\n { optional: true }\n ),\n query(\n '.sky-slide-dissolve-last:enter',\n [\n style({ opacity: 0 }),\n animate('200ms ease-in', style({ opacity: 1 })),\n ],\n { optional: true }\n ),\n\n // Collapse animations\n // The expanded content should fade out immediately to prevent\n // any overlap with the read-only content that's returning to the screen.\n query(\n '.sky-slide-dissolve-last:leave',\n [animate('0ms', style({ opacity: 0 }))],\n { optional: true }\n ),\n\n group([\n query(\n '.sky-slide-dissolve-first:enter',\n [\n style({ opacity: 0, height: 0 }),\n animate('100ms ease-in', style({ opacity: 1, height: '*' })),\n ],\n { optional: true }\n ),\n query(\n '.sky-slide-dissolve-last:leave',\n [animate('200ms ease-in', style({ height: 0 }))],\n { optional: true }\n ),\n ]),\n ]),\n ]\n);\n"]}
@@ -0,0 +1,62 @@
1
+ import { Injectable } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ /* tslint:disable */
4
+ const SKY_TABBABLE_SELECTOR = [
5
+ 'a[href]',
6
+ 'area[href]',
7
+ "input:not([disabled]):not([tabindex='-1'])",
8
+ "button:not([disabled]):not([tabindex='-1'])",
9
+ "select:not([disabled]):not([tabindex='-1'])",
10
+ "textarea:not([disabled]):not([tabindex='-1'])",
11
+ 'iframe',
12
+ 'object',
13
+ 'embed',
14
+ "*[tabindex]:not([tabindex='-1'])",
15
+ '*[contenteditable=true]',
16
+ ].join(', ');
17
+ /* tslint:enable */
18
+ /**
19
+ * @internal
20
+ */
21
+ export class SkyInlineFormAdapterService {
22
+ applyAutofocus(inlineFormElementRef) {
23
+ const inputWithAutofocus = inlineFormElementRef.nativeElement.querySelector('[autofocus]');
24
+ if (inputWithAutofocus) {
25
+ inputWithAutofocus.focus();
26
+ }
27
+ else {
28
+ let focusEl = inlineFormElementRef.nativeElement.querySelector('.sky-inline-form-content');
29
+ let focusableChildren = this.loadFocusableChildren(focusEl);
30
+ this.focusFirstElement(focusableChildren);
31
+ }
32
+ }
33
+ loadFocusableChildren(elem) {
34
+ const elements = Array.prototype.slice.call(elem.querySelectorAll(SKY_TABBABLE_SELECTOR));
35
+ return elements.filter((element) => {
36
+ return this.isVisible(element);
37
+ });
38
+ }
39
+ isVisible(element) {
40
+ const style = window.getComputedStyle(element);
41
+ const isHidden = style.display === 'none' || style.visibility === 'hidden';
42
+ if (isHidden) {
43
+ return false;
44
+ }
45
+ /* istanbul ignore next */
46
+ const hasBounds = !!(element.offsetWidth ||
47
+ element.offsetHeight ||
48
+ element.getClientRects().length);
49
+ return hasBounds;
50
+ }
51
+ focusFirstElement(list) {
52
+ if (list.length > 0) {
53
+ list[0].focus();
54
+ }
55
+ }
56
+ }
57
+ SkyInlineFormAdapterService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInlineFormAdapterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
58
+ SkyInlineFormAdapterService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInlineFormAdapterService });
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkyInlineFormAdapterService, decorators: [{
60
+ type: Injectable
61
+ }] });
62
+ //# sourceMappingURL=inline-form-adapter.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-form-adapter.service.js","sourceRoot":"","sources":["../../../../../../../../libs/components/inline-form/src/lib/modules/inline-form/inline-form-adapter.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,UAAU,EAAE,MAAM,eAAe,CAAC;;AAEvD,oBAAoB;AACpB,MAAM,qBAAqB,GAAG;IAC5B,SAAS;IACT,YAAY;IACZ,4CAA4C;IAC5C,6CAA6C;IAC7C,6CAA6C;IAC7C,+CAA+C;IAC/C,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,kCAAkC;IAClC,yBAAyB;CAC1B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACb,mBAAmB;AAEnB;;GAEG;AAEH,MAAM,OAAO,2BAA2B;IAC/B,cAAc,CAAC,oBAAgC;QACpD,MAAM,kBAAkB,GACtB,oBAAoB,CAAC,aAAa,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC;QAElE,IAAI,kBAAkB,EAAE;YACtB,kBAAkB,CAAC,KAAK,EAAE,CAAC;SAC5B;aAAM;YACL,IAAI,OAAO,GACT,oBAAoB,CAAC,aAAa,CAAC,aAAa,CAC9C,0BAA0B,CAC3B,CAAC;YACJ,IAAI,iBAAiB,GAAG,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;YAE5D,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;SAC3C;IACH,CAAC;IAEO,qBAAqB,CAAC,IAAiB;QAC7C,MAAM,QAAQ,GAAuB,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAC7D,IAAI,CAAC,gBAAgB,CAAC,qBAAqB,CAAC,CAC7C,CAAC;QAEF,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE;YACjC,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,SAAS,CAAC,OAAoB;QACpC,MAAM,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAC/C,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,KAAK,MAAM,IAAI,KAAK,CAAC,UAAU,KAAK,QAAQ,CAAC;QAC3E,IAAI,QAAQ,EAAE;YACZ,OAAO,KAAK,CAAC;SACd;QAED,0BAA0B;QAC1B,MAAM,SAAS,GAAG,CAAC,CAAC,CAClB,OAAO,CAAC,WAAW;YACnB,OAAO,CAAC,YAAY;YACpB,OAAO,CAAC,cAAc,EAAE,CAAC,MAAM,CAChC,CAAC;QACF,OAAO,SAAS,CAAC;IACnB,CAAC;IAEO,iBAAiB,CAAC,IAAwB;QAChD,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;YACnB,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;SACjB;IACH,CAAC;;yHAhDU,2BAA2B;6HAA3B,2BAA2B;4FAA3B,2BAA2B;kBADvC,UAAU","sourcesContent":["import { ElementRef, Injectable } from '@angular/core';\n\n/* tslint:disable */\nconst SKY_TABBABLE_SELECTOR = [\n 'a[href]',\n 'area[href]',\n \"input:not([disabled]):not([tabindex='-1'])\",\n \"button:not([disabled]):not([tabindex='-1'])\",\n \"select:not([disabled]):not([tabindex='-1'])\",\n \"textarea:not([disabled]):not([tabindex='-1'])\",\n 'iframe',\n 'object',\n 'embed',\n \"*[tabindex]:not([tabindex='-1'])\",\n '*[contenteditable=true]',\n].join(', ');\n/* tslint:enable */\n\n/**\n * @internal\n */\n@Injectable()\nexport class SkyInlineFormAdapterService {\n public applyAutofocus(inlineFormElementRef: ElementRef): void {\n const inputWithAutofocus =\n inlineFormElementRef.nativeElement.querySelector('[autofocus]');\n\n if (inputWithAutofocus) {\n inputWithAutofocus.focus();\n } else {\n let focusEl: HTMLElement =\n inlineFormElementRef.nativeElement.querySelector(\n '.sky-inline-form-content'\n );\n let focusableChildren = this.loadFocusableChildren(focusEl);\n\n this.focusFirstElement(focusableChildren);\n }\n }\n\n private loadFocusableChildren(elem: HTMLElement): HTMLElement[] {\n const elements: Array<HTMLElement> = Array.prototype.slice.call(\n elem.querySelectorAll(SKY_TABBABLE_SELECTOR)\n );\n\n return elements.filter((element) => {\n return this.isVisible(element);\n });\n }\n\n private isVisible(element: HTMLElement): boolean {\n const style = window.getComputedStyle(element);\n const isHidden = style.display === 'none' || style.visibility === 'hidden';\n if (isHidden) {\n return false;\n }\n\n /* istanbul ignore next */\n const hasBounds = !!(\n element.offsetWidth ||\n element.offsetHeight ||\n element.getClientRects().length\n );\n return hasBounds;\n }\n\n private focusFirstElement(list: Array<HTMLElement>): void {\n if (list.length > 0) {\n list[0].focus();\n }\n }\n}\n"]}