@skyux/inline-form 6.11.0 → 6.12.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.
@@ -1089,6 +1089,11 @@
1089
1089
  "filePath": "/projects/inline-form/documentation/code-examples/inline-form/custom-buttons/inline-form-demo.module.ts",
1090
1090
  "rawContents": "import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { SkyIdModule } from '@skyux/core';\nimport { SkyInputBoxModule } from '@skyux/forms';\nimport { SkyIconModule } from '@skyux/indicators';\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"
1091
1091
  },
1092
+ {
1093
+ "fileName": "inline-form-demo-item.ts",
1094
+ "filePath": "/projects/inline-form/documentation/code-examples/inline-form/repeaters/inline-form-demo-item.ts",
1095
+ "rawContents": "export interface InlineFormDemoItem {\n id: string;\n title: string | undefined;\n note: string | undefined;\n}\n"
1096
+ },
1092
1097
  {
1093
1098
  "fileName": "inline-form-demo.component.html",
1094
1099
  "filePath": "/projects/inline-form/documentation/code-examples/inline-form/repeaters/inline-form-demo.component.html",
@@ -1102,7 +1107,7 @@
1102
1107
  {
1103
1108
  "fileName": "inline-form-demo.component.ts",
1104
1109
  "filePath": "/projects/inline-form/documentation/code-examples/inline-form/repeaters/inline-form-demo.component.ts",
1105
- "rawContents": "import { Component, OnInit } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup } from '@angular/forms';\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"
1110
+ "rawContents": "import { Component, OnInit } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup } from '@angular/forms';\nimport {\n SkyInlineFormButtonLayout,\n SkyInlineFormCloseArgs,\n SkyInlineFormConfig,\n} from '@skyux/inline-form';\n\nimport { InlineFormDemoItem } from './inline-form-demo-item';\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: InlineFormDemoItem[] = [\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: InlineFormDemoItem): 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"
1106
1111
  },
1107
1112
  {
1108
1113
  "fileName": "inline-form-demo.module.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux/inline-form",
3
- "version": "6.11.0",
3
+ "version": "6.12.0",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "keywords": [
6
6
  "blackbaud",
@@ -35,8 +35,8 @@
35
35
  "@angular/animations": "^13.3.2",
36
36
  "@angular/common": "^13.3.2",
37
37
  "@angular/core": "^13.3.2",
38
- "@skyux/core": "6.11.0",
39
- "@skyux/i18n": "6.11.0"
38
+ "@skyux/core": "6.12.0",
39
+ "@skyux/i18n": "6.12.0"
40
40
  },
41
41
  "dependencies": {
42
42
  "tslib": "^2.3.1"