tuain-ng-forms-lib 14.4.93 → 14.4.96

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 (108) hide show
  1. package/esm2020/lib/classes/forms/action.mjs +36 -0
  2. package/esm2020/lib/classes/forms/element.mjs +26 -0
  3. package/esm2020/lib/classes/forms/field.mjs +445 -0
  4. package/esm2020/lib/classes/forms/form.constants.mjs +26 -0
  5. package/esm2020/lib/classes/forms/form.mjs +431 -0
  6. package/esm2020/lib/classes/forms/piece-propagate.mjs +37 -0
  7. package/esm2020/lib/classes/forms/piece.mjs +95 -0
  8. package/esm2020/lib/classes/forms/section.mjs +138 -0
  9. package/esm2020/lib/classes/forms/subsection.mjs +81 -0
  10. package/esm2020/lib/classes/forms/table/action.mjs +18 -0
  11. package/esm2020/lib/classes/forms/table/column.mjs +74 -0
  12. package/esm2020/lib/classes/forms/table/row-data.mjs +116 -0
  13. package/esm2020/lib/classes/forms/table/table.mjs +416 -0
  14. package/esm2020/lib/components/elements/action.component.mjs +71 -0
  15. package/esm2020/lib/components/elements/field.component.mjs +81 -0
  16. package/esm2020/lib/components/elements/layout/element.component.mjs +20 -0
  17. package/esm2020/lib/components/elements/layout/form-error.component.mjs +20 -0
  18. package/esm2020/lib/components/elements/layout/form-header.component.mjs +31 -0
  19. package/esm2020/lib/components/elements/layout/piece.component.mjs +39 -0
  20. package/esm2020/lib/components/elements/layout/section.component.mjs +37 -0
  21. package/esm2020/lib/components/elements/layout/sub-section.component.mjs +37 -0
  22. package/esm2020/lib/components/elements/tables/table-record-action.component.mjs +56 -0
  23. package/esm2020/lib/components/elements/tables/table-record-field.component.mjs +30 -0
  24. package/esm2020/lib/components/elements/tables/table.component.mjs +89 -0
  25. package/esm2020/lib/components/forms/basic-form.mjs +1530 -0
  26. package/esm2020/lib/services/event-manager.service.mjs +18 -0
  27. package/esm2020/lib/services/file-manager.service.mjs +6 -0
  28. package/esm2020/lib/services/form-manager.service.mjs +80 -0
  29. package/esm2020/lib/tuain-ng-forms-lib.module.mjs +71 -0
  30. package/esm2020/public-api.mjs +19 -0
  31. package/esm2020/tuain-ng-forms-lib.mjs +5 -0
  32. package/fesm2015/tuain-ng-forms-lib.mjs +4276 -0
  33. package/fesm2015/tuain-ng-forms-lib.mjs.map +1 -0
  34. package/fesm2020/tuain-ng-forms-lib.mjs +4090 -0
  35. package/fesm2020/tuain-ng-forms-lib.mjs.map +1 -0
  36. package/lib/classes/forms/action.d.ts +22 -0
  37. package/lib/classes/forms/element.d.ts +17 -0
  38. package/lib/classes/forms/field.d.ts +205 -0
  39. package/lib/classes/forms/form.constants.d.ts +25 -0
  40. package/lib/classes/forms/form.d.ts +137 -0
  41. package/lib/classes/forms/piece-propagate.d.ts +13 -0
  42. package/lib/classes/forms/piece.d.ts +41 -0
  43. package/lib/classes/forms/section.d.ts +32 -0
  44. package/lib/classes/forms/subsection.d.ts +24 -0
  45. package/lib/classes/forms/table/action.d.ts +15 -0
  46. package/lib/classes/forms/table/column.d.ts +33 -0
  47. package/lib/classes/forms/table/row-data.d.ts +14 -0
  48. package/lib/classes/forms/table/table.d.ts +100 -0
  49. package/lib/components/elements/action.component.d.ts +17 -0
  50. package/lib/components/elements/field.component.d.ts +38 -0
  51. package/lib/components/elements/layout/element.component.d.ts +9 -0
  52. package/lib/components/elements/layout/form-error.component.d.ts +8 -0
  53. package/lib/components/elements/layout/form-header.component.d.ts +12 -0
  54. package/lib/components/elements/layout/piece.component.d.ts +12 -0
  55. package/lib/components/elements/layout/section.component.d.ts +11 -0
  56. package/lib/components/elements/layout/sub-section.component.d.ts +11 -0
  57. package/lib/components/elements/tables/table-record-action.component.d.ts +16 -0
  58. package/lib/components/elements/tables/table-record-field.component.d.ts +12 -0
  59. package/lib/components/elements/tables/table.component.d.ts +35 -0
  60. package/lib/components/forms/basic-form.d.ts +355 -0
  61. package/lib/services/event-manager.service.d.ts +9 -0
  62. package/lib/services/file-manager.service.d.ts +5 -0
  63. package/lib/services/form-manager.service.d.ts +28 -0
  64. package/lib/tuain-ng-forms-lib.module.d.ts +20 -0
  65. package/package.json +24 -6
  66. package/{src/public-api.ts → public-api.d.ts} +0 -5
  67. package/tuain-ng-forms-lib.d.ts +5 -0
  68. package/.browserslistrc +0 -16
  69. package/.yarn/cache/nanoid-npm-4.0.0-924f5c6312-7d5946df5c.zip +0 -0
  70. package/.yarn/cache/tslib-npm-2.4.1-36f0ed04db-19480d6e03.zip +0 -0
  71. package/.yarn/cache/yn-npm-5.0.0-b001dab23c-f0ec7710d3.zip +0 -0
  72. package/.yarn/install-state.gz +0 -0
  73. package/karma.conf.js +0 -44
  74. package/ng-package.json +0 -11
  75. package/src/lib/classes/forms/action.ts +0 -56
  76. package/src/lib/classes/forms/element.ts +0 -29
  77. package/src/lib/classes/forms/field.ts +0 -500
  78. package/src/lib/classes/forms/form.constants.ts +0 -28
  79. package/src/lib/classes/forms/form.ts +0 -508
  80. package/src/lib/classes/forms/piece-propagate.ts +0 -46
  81. package/src/lib/classes/forms/piece.ts +0 -122
  82. package/src/lib/classes/forms/section.ts +0 -152
  83. package/src/lib/classes/forms/subsection.ts +0 -90
  84. package/src/lib/classes/forms/table/action.ts +0 -32
  85. package/src/lib/classes/forms/table/column.ts +0 -94
  86. package/src/lib/classes/forms/table/row-data.ts +0 -121
  87. package/src/lib/classes/forms/table/table.ts +0 -478
  88. package/src/lib/components/elements/action.component.ts +0 -59
  89. package/src/lib/components/elements/field.component.ts +0 -92
  90. package/src/lib/components/elements/layout/element.component.ts +0 -13
  91. package/src/lib/components/elements/layout/form-error.component.ts +0 -11
  92. package/src/lib/components/elements/layout/form-header.component.ts +0 -17
  93. package/src/lib/components/elements/layout/piece.component.ts +0 -34
  94. package/src/lib/components/elements/layout/section.component.ts +0 -31
  95. package/src/lib/components/elements/layout/sub-section.component.ts +0 -31
  96. package/src/lib/components/elements/tables/table-record-action.component.ts +0 -50
  97. package/src/lib/components/elements/tables/table-record-field.component.ts +0 -20
  98. package/src/lib/components/elements/tables/table.component.ts +0 -86
  99. package/src/lib/components/forms/basic-form.ts +0 -1588
  100. package/src/lib/services/event-manager.service.ts +0 -21
  101. package/src/lib/services/file-manager.service.ts +0 -6
  102. package/src/lib/services/form-manager.service.ts +0 -89
  103. package/src/lib/services/icon-dictionary.service.ts +0 -159
  104. package/src/lib/tuain-ng-forms-lib.module.ts +0 -40
  105. package/src/test.ts +0 -27
  106. package/tsconfig.lib.json +0 -15
  107. package/tsconfig.lib.prod.json +0 -10
  108. package/tsconfig.spec.json +0 -17
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tuain-ng-forms-lib",
3
- "version": "14.4.93",
3
+ "version": "14.4.96",
4
4
  "description": "Componentes y Clases Angular para la gestión de formularios TUAIN",
5
5
  "author": "Mauricio Méndez, Imix Consulting",
6
6
  "license": "MIT",
@@ -16,13 +16,31 @@
16
16
  ],
17
17
  "peerDependencies": {
18
18
  "@angular/common": "^14.2.6",
19
- "@angular/core": "^14.2.6",
20
- "ts-node": "^10.9.1",
21
- "ts-node-dev": "^2.0.0"
19
+ "@angular/core": "^14.2.6"
22
20
  },
23
21
  "dependencies": {
24
22
  "nanoid": "^4.0.0",
25
23
  "tslib": "^2.4.0",
26
24
  "yn": "^5.0.0"
27
- }
28
- }
25
+ },
26
+ "module": "fesm2015/tuain-ng-forms-lib.mjs",
27
+ "es2020": "fesm2020/tuain-ng-forms-lib.mjs",
28
+ "esm2020": "esm2020/tuain-ng-forms-lib.mjs",
29
+ "fesm2020": "fesm2020/tuain-ng-forms-lib.mjs",
30
+ "fesm2015": "fesm2015/tuain-ng-forms-lib.mjs",
31
+ "typings": "tuain-ng-forms-lib.d.ts",
32
+ "exports": {
33
+ "./package.json": {
34
+ "default": "./package.json"
35
+ },
36
+ ".": {
37
+ "types": "./tuain-ng-forms-lib.d.ts",
38
+ "esm2020": "./esm2020/tuain-ng-forms-lib.mjs",
39
+ "es2020": "./fesm2020/tuain-ng-forms-lib.mjs",
40
+ "es2015": "./fesm2015/tuain-ng-forms-lib.mjs",
41
+ "node": "./fesm2015/tuain-ng-forms-lib.mjs",
42
+ "default": "./fesm2020/tuain-ng-forms-lib.mjs"
43
+ }
44
+ },
45
+ "sideEffects": false
46
+ }
@@ -1,7 +1,3 @@
1
- /*
2
- * Public API Surface of tuain-ng-forms-lib
3
- */
4
-
5
1
  export * from './lib/components/elements/action.component';
6
2
  export * from './lib/components/elements/field.component';
7
3
  export * from './lib/components/elements/layout/element.component';
@@ -17,4 +13,3 @@ export * from './lib/services/event-manager.service';
17
13
  export * from './lib/services/form-manager.service';
18
14
  export * from './lib/services/file-manager.service';
19
15
  export * from './lib/tuain-ng-forms-lib.module';
20
-
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="tuain-ng-forms-lib" />
5
+ export * from './public-api';
package/.browserslistrc DELETED
@@ -1,16 +0,0 @@
1
- # This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2
- # For additional information regarding the format and rule options, please see:
3
- # https://github.com/browserslist/browserslist#queries
4
-
5
- # For the full list of supported browsers by the Angular framework, please see:
6
- # https://angular.io/guide/browser-support
7
-
8
- # You can see what browsers were selected by your queries by running:
9
- # npx browserslist
10
-
11
- last 1 Chrome version
12
- last 1 Firefox version
13
- last 2 Edge major versions
14
- # last 2 Safari major versions
15
- last 2 iOS major versions
16
- Firefox ESR
Binary file
package/karma.conf.js DELETED
@@ -1,44 +0,0 @@
1
- // Karma configuration file, see link for more information
2
- // https://karma-runner.github.io/1.0/config/configuration-file.html
3
-
4
- module.exports = function (config) {
5
- config.set({
6
- basePath: '',
7
- frameworks: ['jasmine', '@angular-devkit/build-angular'],
8
- plugins: [
9
- require('karma-jasmine'),
10
- require('karma-chrome-launcher'),
11
- require('karma-jasmine-html-reporter'),
12
- require('karma-coverage'),
13
- require('@angular-devkit/build-angular/plugins/karma')
14
- ],
15
- client: {
16
- jasmine: {
17
- // you can add configuration options for Jasmine here
18
- // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19
- // for example, you can disable the random execution with `random: false`
20
- // or set a specific seed with `seed: 4321`
21
- },
22
- clearContext: false // leave Jasmine Spec Runner output visible in browser
23
- },
24
- jasmineHtmlReporter: {
25
- suppressAll: true // removes the duplicated traces
26
- },
27
- coverageReporter: {
28
- dir: require('path').join(__dirname, '../../coverage/tuain-ng-forms-lib'),
29
- subdir: '.',
30
- reporters: [
31
- { type: 'html' },
32
- { type: 'text-summary' }
33
- ]
34
- },
35
- reporters: ['progress', 'kjhtml'],
36
- port: 9876,
37
- colors: true,
38
- logLevel: config.LOG_INFO,
39
- autoWatch: true,
40
- browsers: ['Chrome'],
41
- singleRun: false,
42
- restartOnFileChange: true
43
- });
44
- };
package/ng-package.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../dist/tuain-ng-forms-lib",
4
- "lib": {
5
- "entryFile": "src/public-api.ts"
6
- },
7
- "allowedNonPeerDependencies": [
8
- "nanoid",
9
- "yn"
10
- ]
11
- }
@@ -1,56 +0,0 @@
1
- import { Subject } from 'rxjs';
2
- import { elementTypes } from './form.constants';
3
- import { FormElement } from './element';
4
-
5
- const HEADER = 'HEADER';
6
-
7
- export class FormAction extends FormElement {
8
- private readonly _actionActivated = new Subject<string>();
9
-
10
- inProgress = false;
11
- newState: string;
12
- backend: boolean;
13
-
14
- actionCode: string;
15
- actionName: string;
16
- iconName: string;
17
-
18
- restrictedOnField: string;
19
- restrictedOnOperator: string;
20
- restrictedOnValue: string;
21
- customValidation: any;
22
-
23
- constructor(actionDefinition, formConfig) {
24
- super(actionDefinition, formConfig);
25
- this.propagationCustomAttributes = this._formConfig?.propagationCustomAttributes?.actions ?? [];
26
- this.elementType = elementTypes.action;
27
- this.actionCode = actionDefinition.actionCode ? actionDefinition.actionCode.toString() : '';
28
- this.actionName = actionDefinition.actionTitle;
29
- this.iconName = actionDefinition.iconName || this.actionCode;
30
- this.setCustomAttribute('location', actionDefinition.position || HEADER);
31
- this.backend = actionDefinition?.serverAction ?? false;
32
- this.newState = actionDefinition?.newState;
33
-
34
- this.restrictedOnField = actionDefinition.fieldRestrictedCode ? actionDefinition.fieldRestrictedCode.toString() : '';
35
- this.restrictedOnOperator = actionDefinition.operatorRestricted || '';
36
- this.restrictedOnValue = actionDefinition.valueRestricted ?? '';
37
- this.customValidation = () => true;
38
- }
39
-
40
- get actionActivated() { return this._actionActivated; }
41
-
42
- start() { this.inProgress = true; }
43
- stop() { this.inProgress = false; }
44
-
45
- notifyActivation() { this._actionActivated.next(this.actionCode); }
46
-
47
- updateFromServer(receivedAction) {
48
- for (const propertyName in receivedAction) {
49
- if (propertyName !== 'actionCode' && propertyName !== 'actionId') {
50
- this[propertyName] = receivedAction[propertyName];
51
- }
52
- }
53
- }
54
-
55
- setCustomValidation(callback) { this.customValidation = () => callback(); }
56
- }
@@ -1,29 +0,0 @@
1
- import { FormPiecePropagate } from './piece-propagate';
2
- import { elementTypes } from './form.constants';
3
- export class FormElement extends FormPiecePropagate {
4
- elementType: string | null = null;;
5
-
6
- constructor(elementDefinition: any, formConfig: any) {
7
- super(elementDefinition, formConfig);
8
- }
9
-
10
- setAttr(attr: any, value: any) {
11
- const { name: attrName, propagate: name } = attr;
12
- this[attrName] = value;
13
- name && this.propagateAttribute(name, value);
14
- }
15
-
16
- isField(): boolean { return this.elementType === elementTypes.field; }
17
- isAction(): boolean { return this.elementType === elementTypes.action; }
18
- isTable(): boolean { return this.elementType === elementTypes.table; }
19
-
20
- /**
21
- * @deprecated Utilizar viewOnState
22
- */
23
- supportState(state: string): boolean { return this.viewOnState(state); }
24
-
25
- /**
26
- * @deprecated Utilizar viewOnState
27
- */
28
- supportMode(state: string): boolean { return this.viewOnState(state); }
29
- }