@rosoftlab/formly 1.0.4-alpha-11 → 1.0.21-alpha-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.
@@ -1 +1 @@
1
- {"version":3,"file":"rosoftlab-formly.mjs","sources":["../../../../projects/rosoftlab/formly/src/lib/base-model-formly.ts","../../../../projects/rosoftlab/formly/src/lib/formly-base-service.ts","../../../../projects/rosoftlab/formly/src/lib/formly-layout.ts","../../../../projects/rosoftlab/formly/src/public-api.ts","../../../../projects/rosoftlab/formly/src/rosoftlab-formly.ts"],"sourcesContent":["import { FormlyFieldConfig } from \"@ngx-formly/core\";\r\n// import { BaseModel, BaseService } from \"@rosoftlab/core\";\r\nimport { BaseModel, BaseService, MetadataStorage } from \"@rosoftlab/core\";\r\nimport { FormlyModelConfig } from \"./interfaces/formly-model-config\";\r\n\r\n\r\nexport class BaseModelFormly extends BaseModel {\r\n public showErrorState: false\r\n getFormlyFields(baseService: BaseService<BaseModelFormly>) { \r\n return this.getFormlyFieldsForObject(baseService, this);\r\n }\r\n private getFormlyFieldsForObject(baseService: BaseService<BaseModelFormly>, instance: any) {\r\n const formlyLayout: FormlyModelConfig[] = MetadataStorage.getMetadata('FormlyLayout', instance);\r\n const formlyFields: FormlyFieldConfig[] = [];\r\n const that = instance;\r\n if (formlyLayout) {\r\n formlyLayout.forEach(property => {\r\n if (property.key !== 'id') {\r\n const value = that[property.key] !== undefined ? that[property.key] : property.defaultValue;\r\n const propType = MetadataStorage.getMetadata('design:type', instance, property.key)\r\n const required = property.required !== undefined ? property.required : false\r\n if (typeof propType === 'function' &&\r\n propType.prototype &&\r\n propType.prototype.constructor === propType &&\r\n propType.prototype.constructor.toString().startsWith('class ')) {\r\n const fields = this.getFormlyFieldsForObject(baseService, new propType())\r\n if (fields)\r\n formlyFields.push(\r\n {\r\n key: property.key,\r\n props: {\r\n translate: true,\r\n label: property.label\r\n },\r\n wrappers: ['panel'],\r\n fieldGroup: fields\r\n }\r\n )\r\n } else {\r\n switch (property.type) {\r\n case \"select\": {\r\n formlyFields.push(\r\n {\r\n key: property.key,\r\n type: property.type,\r\n defaultValue: value,\r\n props: {\r\n translate: true,\r\n label: property.label,\r\n required,\r\n labelPosition: 'floating',\r\n description: property.description,\r\n placeholder: property.placeholder,\r\n options: baseService.getSelectValues(property.key),\r\n valueProp: property.valueProp || 'value',\r\n labelProp: property.labelProp || 'label',\r\n },\r\n })\r\n break;\r\n }\r\n case \"toggle\": {\r\n formlyFields.push(\r\n {\r\n key: property.key,\r\n type: property.type,\r\n defaultValue: value,\r\n props: {\r\n translate: true,\r\n label: property.label,\r\n required,\r\n description: property.description,\r\n placeholder: property.placeholder,\r\n },\r\n })\r\n break;\r\n }\r\n default: {\r\n formlyFields.push(\r\n {\r\n key: property.key,\r\n type: property.type,\r\n defaultValue: value,\r\n props: {\r\n translate: true,\r\n label: property.label,\r\n required,\r\n labelPosition: 'floating',\r\n description: property.description,\r\n placeholder: property.placeholder\r\n },\r\n })\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n });\r\n }\r\n return formlyFields;\r\n }\r\n\r\n}","import { BaseService } from \"@rosoftlab/core\";\r\nimport { BaseModelFormly } from \"./base-model-formly\";\r\n\r\nexport class BaseServiceFormly<T extends BaseModelFormly> extends BaseService<T> {\r\n\r\n public getFormlyFields(model: T) {\r\n return model.getFormlyFields(this);\r\n }\r\n}\r\n","import { MetadataStorage } from \"@rosoftlab/core\";\r\nimport { FormlyModelConfig } from \"./interfaces/formly-model-config\";\r\nexport function FormlyLayout(config: FormlyModelConfig) {\r\n return (target: any, propertyName: string) => {\r\n const annotations = MetadataStorage.getMetadata('FormlyLayout', target) || [];\r\n config.key = propertyName;\r\n annotations.push(config);\r\n\r\n MetadataStorage.setMetadata('FormlyLayout', annotations, target);\r\n };\r\n}\r\n","/*\r\n * Public API Surface of formly\r\n */\r\n\r\nexport * from './lib/base-model-formly';\r\nexport * from './lib/formly-base-service';\r\nexport * from './lib/formly-layout';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AW;wCACjC,WAAW,EAAE,QAAQ,CAAC,WAAW;AAClC,qCAAA;AACF,iCAAA,CAAC;gCACJ;;4BAEF,SAAS;gCACP,YAAY,CAAC,IAAI,CACf;oCACE,GAAG,EAAE,QAAQ,CAAC,GAAG;oCACjB,IAAI,EAAE,QAAQ,CAAC,IAAI;AACnB,oCAAA,YAAY,EAAE,KAAK;AACnB,oCAAA,KAAK,EAAE;AACL,wCAAA,SAAS,EAAE,IAAI;wCACf,KAAK,EAAE,QAAQ,CAAC,KAAK;wCACrB,QAAQ;AACR,wCAAA,aAAa,EAAE,UAAU;wCACzB,WAAW,EAAE,QAAQ,CAAC,WAAW;wCACjC,WAAW,EAAE,QAAQ,CAAC;AACvB,qCAAA;AACF,iCAAA,CAAC;gCACJ;;;;;AAKV,aAAC,CAAC;;AAEJ,QAAA,OAAO,YAAY;;AAGtB;;AClGK,MAAO,iBAA6C,SAAQ,WAAc,CAAA;AAErE,IAAA,eAAe,CAAC,KAAQ,EAAA;AAC3B,QAAA,OAAO,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC;;AAEzC;;ACNK,SAAU,YAAY,CAAC,MAAyB,EAAA;AAClD,IAAA,OAAO,CAAC,MAAW,EAAE,YAAoB,KAAI;AACzC,QAAA,MAAM,WAAW,GAAG,eAAe,CAAC,WAAW,CAAC,cAAc,EAAE,MAAM,CAAC,IAAI,EAAE;AAC7E,QAAA,MAAM,CAAC,GAAG,GAAG,YAAY;AACzB,QAAA,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC;QAExB,eAAe,CAAC,WAAW,CAAC,cAAc,EAAE,WAAW,EAAE,MAAM,CAAC;AACpE,KAAC;AACL;;ACVA;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"rosoftlab-formly.mjs","sources":["../../../../projects/rosoftlab/formly/src/lib/base-model-formly.ts","../../../../projects/rosoftlab/formly/src/lib/formly-base-service.ts","../../../../projects/rosoftlab/formly/src/lib/formly-layout.ts","../../../../projects/rosoftlab/formly/src/public-api.ts","../../../../projects/rosoftlab/formly/src/rosoftlab-formly.ts"],"sourcesContent":["import { FormlyFieldConfig } from \"@ngx-formly/core\";\r\n// import { BaseModel, BaseService } from \"@rosoftlab/core\";\r\nimport { BaseModel, BaseService, MetadataStorage } from \"@rosoftlab/core\";\r\nimport { FormlyModelConfig } from \"./interfaces/formly-model-config\";\r\n\r\n\r\nexport class BaseModelFormly extends BaseModel {\r\n public showErrorState: false\r\n getFormlyFields(baseService: BaseService<BaseModelFormly>) { \r\n return this.getFormlyFieldsForObject(baseService, this);\r\n }\r\n private getFormlyFieldsForObject(baseService: BaseService<BaseModelFormly>, instance: any) {\r\n const formlyLayout: FormlyModelConfig[] = MetadataStorage.getMetadata('FormlyLayout', instance);\r\n const formlyFields: FormlyFieldConfig[] = [];\r\n const that = instance;\r\n if (formlyLayout) {\r\n formlyLayout.forEach(property => {\r\n if (property.key !== 'id') {\r\n const value = that[property.key] !== undefined ? that[property.key] : property.defaultValue;\r\n const propType = MetadataStorage.getMetadata('design:type', instance, property.key)\r\n const required = property.required !== undefined ? property.required : false\r\n if (typeof propType === 'function' &&\r\n propType.prototype &&\r\n propType.prototype.constructor === propType &&\r\n propType.prototype.constructor.toString().startsWith('class ')) {\r\n const fields = this.getFormlyFieldsForObject(baseService, new propType())\r\n if (fields)\r\n formlyFields.push(\r\n {\r\n key: property.key,\r\n props: {\r\n translate: true,\r\n label: property.label\r\n },\r\n wrappers: ['panel'],\r\n fieldGroup: fields\r\n }\r\n )\r\n } else {\r\n switch (property.type) {\r\n case \"select\": {\r\n formlyFields.push(\r\n {\r\n key: property.key,\r\n type: property.type,\r\n defaultValue: value,\r\n props: {\r\n translate: true,\r\n label: property.label,\r\n required,\r\n labelPosition: 'floating',\r\n description: property.description,\r\n placeholder: property.placeholder,\r\n options: baseService.getSelectValues(property.key),\r\n valueProp: property.valueProp || 'value',\r\n labelProp: property.labelProp || 'label',\r\n },\r\n })\r\n break;\r\n }\r\n case \"toggle\": {\r\n formlyFields.push(\r\n {\r\n key: property.key,\r\n type: property.type,\r\n defaultValue: value,\r\n props: {\r\n translate: true,\r\n label: property.label,\r\n required,\r\n description: property.description,\r\n placeholder: property.placeholder,\r\n },\r\n })\r\n break;\r\n }\r\n default: {\r\n formlyFields.push(\r\n {\r\n key: property.key,\r\n type: property.type,\r\n defaultValue: value,\r\n props: {\r\n translate: true,\r\n label: property.label,\r\n required,\r\n labelPosition: 'floating',\r\n description: property.description,\r\n placeholder: property.placeholder\r\n },\r\n })\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n });\r\n }\r\n return formlyFields;\r\n }\r\n\r\n}","import { BaseService } from \"@rosoftlab/core\";\r\nimport { BaseModelFormly } from \"./base-model-formly\";\r\n\r\nexport class BaseServiceFormly<T extends BaseModelFormly> extends BaseService<T> {\r\n\r\n public getFormlyFields(model: T) {\r\n return model.getFormlyFields(this);\r\n }\r\n}\r\n","import { MetadataStorage } from \"@rosoftlab/core\";\r\nimport { FormlyModelConfig } from \"./interfaces/formly-model-config\";\r\nexport function FormlyLayout(config: FormlyModelConfig) {\r\n return (target: any, propertyName: string) => {\r\n const annotations = MetadataStorage.getMetadata('FormlyLayout', target) || [];\r\n config.key = propertyName;\r\n annotations.push(config);\r\n\r\n MetadataStorage.setMetadata('FormlyLayout', annotations, target);\r\n };\r\n}\r\n","/*\r\n * Public API Surface of formly\r\n */\r\n\r\nexport * from './lib/base-model-formly';\r\nexport * from './lib/formly-base-service';\r\nexport * from './lib/formly-layout';\r\nexport * from './lib/interfaces/formly-model-config';\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AACA;AAKM,MAAO,eAAgB,SAAQ,SAAS,CAAA;AAE5C,IAAA,eAAe,CAAC,WAAyC,EAAA;QACvD,OAAO,IAAI,CAAC,wBAAwB,CAAC,WAAW,EAAE,IAAI,CAAC;IACzD;IACQ,wBAAwB,CAAC,WAAyC,EAAE,QAAa,EAAA;QACvF,MAA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f,KAAK,EAAE,QAAQ,CAAC,KAAK;wCACrB,QAAQ;AACR,wCAAA,aAAa,EAAE,UAAU;wCACzB,WAAW,EAAE,QAAQ,CAAC,WAAW;wCACjC,WAAW,EAAE,QAAQ,CAAC;AACvB,qCAAA;AACF,iCAAA,CAAC;gCACJ;4BACF;;oBAEJ;gBACF;AACF,YAAA,CAAC,CAAC;QACJ;AACA,QAAA,OAAO,YAAY;IACrB;AAED;;AClGK,MAAO,iBAA6C,SAAQ,WAAc,CAAA;AAErE,IAAA,eAAe,CAAC,KAAQ,EAAA;AAC3B,QAAA,OAAO,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC;IACtC;AACH;;ACNK,SAAU,YAAY,CAAC,MAAyB,EAAA;AAClD,IAAA,OAAO,CAAC,MAAW,EAAE,YAAoB,KAAI;AACzC,QAAA,MAAM,WAAW,GAAG,eAAe,CAAC,WAAW,CAAC,cAAc,EAAE,MAAM,CAAC,IAAI,EAAE;AAC7E,QAAA,MAAM,CAAC,GAAG,GAAG,YAAY;AACzB,QAAA,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC;QAExB,eAAe,CAAC,WAAW,CAAC,cAAc,EAAE,WAAW,EAAE,MAAM,CAAC;AACpE,IAAA,CAAC;AACL;;ACVA;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "name": "@rosoftlab/formly",
3
- "version": "1.0.4-alpha-11",
3
+ "version": "1.0.21-alpha-1",
4
4
  "peerDependencies": {
5
- "@angular/common": "^19.2.8",
6
- "@angular/core": "^19.2.8",
7
- "@ngx-formly/core": "^6.3.12",
8
- "@rosoftlab/core": "1.0.4-alpha-11"
5
+ "@angular/common": "^21.0.6",
6
+ "@angular/core": "^21.0.6",
7
+ "@ngx-formly/core": "^7.0.1",
8
+ "@rosoftlab/core": "1.0.21-alpha-1"
9
9
  },
10
10
  "dependencies": {
11
11
  "tslib": "^2.6.2"
12
12
  },
13
13
  "sideEffects": false,
14
14
  "module": "fesm2022/rosoftlab-formly.mjs",
15
- "typings": "index.d.ts",
15
+ "typings": "types/rosoftlab-formly.d.ts",
16
16
  "exports": {
17
17
  "./package.json": {
18
18
  "default": "./package.json"
19
19
  },
20
20
  ".": {
21
- "types": "./index.d.ts",
21
+ "types": "./types/rosoftlab-formly.d.ts",
22
22
  "default": "./fesm2022/rosoftlab-formly.mjs"
23
23
  }
24
24
  }
@@ -0,0 +1,34 @@
1
+ import * as _ngx_formly_core from '@ngx-formly/core';
2
+ import { FormlyFieldConfig } from '@ngx-formly/core';
3
+ import { BaseModel, BaseService } from '@rosoftlab/core';
4
+
5
+ declare class BaseModelFormly extends BaseModel {
6
+ showErrorState: false;
7
+ getFormlyFields(baseService: BaseService<BaseModelFormly>): FormlyFieldConfig<_ngx_formly_core.FormlyFieldProps & {
8
+ [additionalProperties: string]: any;
9
+ }>[];
10
+ private getFormlyFieldsForObject;
11
+ }
12
+
13
+ declare class BaseServiceFormly<T extends BaseModelFormly> extends BaseService<T> {
14
+ getFormlyFields(model: T): _ngx_formly_core.FormlyFieldConfig<_ngx_formly_core.FormlyFieldProps & {
15
+ [additionalProperties: string]: any;
16
+ }>[];
17
+ }
18
+
19
+ interface FormlyModelConfig {
20
+ key?: string;
21
+ type: 'input' | 'textarea' | 'checkbox' | 'radio' | 'select' | 'datetime' | 'range' | 'toggle' | 'subobject' | any;
22
+ label: string;
23
+ required?: boolean;
24
+ placeholder?: string;
25
+ description?: string;
26
+ defaultValue?: any;
27
+ valueProp?: string;
28
+ labelProp?: string;
29
+ }
30
+
31
+ declare function FormlyLayout(config: FormlyModelConfig): (target: any, propertyName: string) => void;
32
+
33
+ export { BaseModelFormly, BaseServiceFormly, FormlyLayout };
34
+ export type { FormlyModelConfig };
package/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@rosoftlab/formly" />
5
- export * from './public-api';
@@ -1,9 +0,0 @@
1
- import { FormlyFieldConfig } from "@ngx-formly/core";
2
- import { BaseModel, BaseService } from "@rosoftlab/core";
3
- export declare class BaseModelFormly extends BaseModel {
4
- showErrorState: false;
5
- getFormlyFields(baseService: BaseService<BaseModelFormly>): FormlyFieldConfig<import("@ngx-formly/core").FormlyFieldProps & {
6
- [additionalProperties: string]: any;
7
- }>[];
8
- private getFormlyFieldsForObject;
9
- }
@@ -1,7 +0,0 @@
1
- import { BaseService } from "@rosoftlab/core";
2
- import { BaseModelFormly } from "./base-model-formly";
3
- export declare class BaseServiceFormly<T extends BaseModelFormly> extends BaseService<T> {
4
- getFormlyFields(model: T): import("@ngx-formly/core").FormlyFieldConfig<import("@ngx-formly/core").FormlyFieldProps & {
5
- [additionalProperties: string]: any;
6
- }>[];
7
- }
@@ -1,2 +0,0 @@
1
- import { FormlyModelConfig } from "./interfaces/formly-model-config";
2
- export declare function FormlyLayout(config: FormlyModelConfig): (target: any, propertyName: string) => void;
@@ -1,11 +0,0 @@
1
- export interface FormlyModelConfig {
2
- key?: string;
3
- type: 'input' | 'textarea' | 'checkbox' | 'radio' | 'select' | 'datetime' | 'range' | 'toggle' | 'subobject' | any;
4
- label: string;
5
- required?: boolean;
6
- placeholder?: string;
7
- description?: string;
8
- defaultValue?: any;
9
- valueProp?: string;
10
- labelProp?: string;
11
- }
package/public-api.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from './lib/base-model-formly';
2
- export * from './lib/formly-base-service';
3
- export * from './lib/formly-layout';
4
- export * from './lib/interfaces/formly-model-config';