@aemforms/af-core 0.22.20 → 0.22.23

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 (54) hide show
  1. package/LICENSE +18 -4
  2. package/README.md +14 -5
  3. package/lib/cjs/index.cjs +267 -1876
  4. package/lib/esm/BaseNode-dc59ab07.js +478 -0
  5. package/lib/esm/BaseNode.js +26 -454
  6. package/lib/esm/Checkbox.js +37 -1
  7. package/lib/esm/CheckboxGroup.js +38 -1
  8. package/lib/esm/Container.js +30 -9
  9. package/lib/esm/DateField.js +38 -2
  10. package/lib/esm/Field.d.ts +2 -2
  11. package/lib/esm/Field.js +62 -26
  12. package/lib/esm/Fieldset.js +36 -3
  13. package/lib/esm/FileObject.js +23 -1
  14. package/lib/esm/FileUpload.js +34 -1
  15. package/lib/esm/Form.d.ts +1 -1
  16. package/lib/esm/Form.js +40 -8
  17. package/lib/esm/FormInstance.js +53 -5
  18. package/lib/esm/FormMetaData.js +26 -1
  19. package/lib/esm/InstanceManager.js +35 -8
  20. package/lib/esm/Node.js +25 -1
  21. package/lib/esm/Scriptable.js +29 -2
  22. package/lib/esm/controller/EventQueue.js +23 -1
  23. package/lib/esm/controller/Events.d.ts +1 -1
  24. package/lib/esm/controller/Events.js +41 -19
  25. package/lib/esm/controller/Logger.d.ts +2 -2
  26. package/lib/esm/controller/Logger.js +23 -1
  27. package/lib/esm/data/DataGroup.js +24 -1
  28. package/lib/esm/data/DataValue.js +23 -1
  29. package/lib/esm/data/EmptyDataValue.js +23 -1
  30. package/lib/esm/index.js +55 -21
  31. package/lib/esm/rules/FunctionRuntime.d.ts +3 -3
  32. package/lib/esm/rules/FunctionRuntime.js +31 -6
  33. package/lib/esm/rules/RuleEngine.js +30 -1
  34. package/lib/esm/types/Json.d.ts +16 -16
  35. package/lib/esm/types/Json.js +24 -2
  36. package/lib/esm/types/Model.d.ts +4 -4
  37. package/lib/esm/types/Model.js +23 -1
  38. package/lib/esm/types/index.js +22 -2
  39. package/lib/esm/utils/DataRefParser.d.ts +2 -2
  40. package/lib/esm/utils/DataRefParser.js +31 -6
  41. package/lib/esm/utils/Fetch.d.ts +1 -1
  42. package/lib/esm/utils/Fetch.js +24 -2
  43. package/lib/esm/utils/FormCreationUtils.js +40 -2
  44. package/lib/esm/utils/FormUtils.js +33 -8
  45. package/lib/esm/utils/JsonUtils.js +34 -11
  46. package/lib/esm/utils/LogUtils.js +23 -1
  47. package/lib/esm/utils/SchemaUtils.js +24 -2
  48. package/lib/esm/utils/TranslationUtils.d.ts +1 -1
  49. package/lib/esm/utils/TranslationUtils.js +32 -9
  50. package/lib/esm/utils/ValidationUtils.d.ts +4 -4
  51. package/lib/esm/utils/ValidationUtils.js +30 -4
  52. package/package.json +4 -3
  53. package/lib/browser/afb-events.js +0 -151
  54. package/lib/browser/afb-runtime.js +0 -3620
package/lib/esm/Field.js CHANGED
@@ -1,18 +1,39 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { ValidationError } from './types/index.js';
8
- import { coerceType, Constraints, ValidConstraints } from './utils/ValidationUtils.js';
9
- import { Change, ExecuteRule, Initialize, Invalid, propertyChange, Valid } from './controller/Events.js';
1
+ /*************************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * ___________________
4
+ *
5
+ * Copyright 2022 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+
17
+ * Adobe permits you to use and modify this file solely in accordance with
18
+ * the terms of the Adobe license agreement accompanying it.
19
+ *************************************************************************/
20
+
21
+ import { _ as __decorate, s as staticFields, t as target, d as dependencyTracked, e as exclude, i as include } from './BaseNode-dc59ab07.js';
22
+ import { ValidationError } from './types/Model.js';
23
+ import { Constraints, coerceType, ValidConstraints } from './utils/ValidationUtils.js';
24
+ import { Initialize, ExecuteRule, Change, Valid, Invalid, propertyChange } from './controller/Events.js';
10
25
  import Scriptable from './Scriptable.js';
11
26
  import { defaultFieldTypes } from './utils/SchemaUtils.js';
12
27
  import DataValue from './data/DataValue.js';
13
- import { dependencyTracked, include, exclude, target, staticFields } from './BaseNode.js';
14
28
  import NullDataValue from './data/EmptyDataValue.js';
15
29
  import { format } from '@aemforms/af-formatters';
30
+ import './utils/DataRefParser.js';
31
+ import './data/DataGroup.js';
32
+ import './utils/FormUtils.js';
33
+ import './utils/JsonUtils.js';
34
+ import './types/Json.js';
35
+ import './FileObject.js';
36
+
16
37
  const validTypes = ['string', 'number', 'boolean', 'file', 'string[]', 'number[]', 'boolean[]', 'file[]', 'array', 'object'];
17
38
  class Field extends Scriptable {
18
39
  constructor(params, _options) {
@@ -161,10 +182,10 @@ class Field extends Scriptable {
161
182
  }
162
183
  }
163
184
  get editFormat() {
164
- return this._jsonModel.editFormat;
185
+ return this.withCategory(this._jsonModel.editFormat);
165
186
  }
166
187
  get displayFormat() {
167
- return this._jsonModel.displayFormat;
188
+ return this.withCategory(this._jsonModel.displayFormat);
168
189
  }
169
190
  get placeholder() {
170
191
  return this._jsonModel.placeholder;
@@ -237,31 +258,43 @@ class Field extends Scriptable {
237
258
  return this._jsonModel.value === undefined || this._jsonModel.value === null || this._jsonModel.value === '';
238
259
  }
239
260
  withCategory(df) {
240
- const hasCategory = df?.match(/^(?:date|num)\|/);
241
- if (hasCategory == null) {
242
- if (this.format === 'date') {
243
- df = `date|${df}`;
244
- }
245
- else if (this.type === 'number') {
246
- df = `num|${df}`;
261
+ if (df) {
262
+ const hasCategory = df?.match(/^(?:date|num)\|/);
263
+ if (hasCategory === null) {
264
+ if (this.format === 'date') {
265
+ df = `date|${df}`;
266
+ }
267
+ else if (this.type === 'number') {
268
+ df = `num|${df}`;
269
+ }
270
+ return df;
247
271
  }
248
- return df;
249
272
  }
250
273
  return df;
251
274
  }
252
275
  get editValue() {
253
- const df = this.withCategory(this.editFormat);
276
+ const df = this.editFormat;
254
277
  if (df && this.isNotEmpty(this.value) && this.valid !== false) {
255
- return format(this.value, this.language, df);
278
+ try {
279
+ return format(this.value, this.language, df);
280
+ }
281
+ catch (e) {
282
+ return this.value;
283
+ }
256
284
  }
257
285
  else {
258
286
  return this.value;
259
287
  }
260
288
  }
261
289
  get displayValue() {
262
- const df = this.withCategory(this.displayFormat);
290
+ const df = this.displayFormat;
263
291
  if (df && this.isNotEmpty(this.value) && this.valid !== false) {
264
- return format(this.value, this.language, df);
292
+ try {
293
+ return format(this.value, this.language, df);
294
+ }
295
+ catch (e) {
296
+ return this.value;
297
+ }
265
298
  }
266
299
  else {
267
300
  return this.value;
@@ -401,7 +434,7 @@ class Field extends Scriptable {
401
434
  const iv = this._jsonModel.minimum || this._jsonModel.default || 0;
402
435
  const fIVal = iv * factor;
403
436
  const qt = (fVal - fIVal) / fStep;
404
- const valid = (fVal - fIVal) % fStep < .001;
437
+ const valid = Math.abs(fVal - fIVal) % fStep < .001;
405
438
  let next, prev;
406
439
  if (!valid) {
407
440
  next = (Math.ceil(qt) * fStep + fIVal) / factor;
@@ -604,6 +637,8 @@ class Field extends Scriptable {
604
637
  getState() {
605
638
  return {
606
639
  ...super.getState(),
640
+ editFormat: this.editFormat,
641
+ displayFormat: this.displayFormat,
607
642
  editValue: this.editValue,
608
643
  displayValue: this.displayValue
609
644
  };
@@ -653,4 +688,5 @@ __decorate([
653
688
  __decorate([
654
689
  dependencyTracked()
655
690
  ], Field.prototype, "exclusiveMaximum", null);
656
- export default Field;
691
+
692
+ export { Field as default };
@@ -1,9 +1,40 @@
1
+ /*************************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * ___________________
4
+ *
5
+ * Copyright 2022 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+
17
+ * Adobe permits you to use and modify this file solely in accordance with
18
+ * the terms of the Adobe license agreement accompanying it.
19
+ *************************************************************************/
20
+
1
21
  import Container from './Container.js';
2
- import { ExecuteRule, Initialize } from './controller/Events.js';
22
+ import { Initialize, ExecuteRule } from './controller/Events.js';
23
+ import './BaseNode-dc59ab07.js';
24
+ import './utils/DataRefParser.js';
25
+ import './data/DataGroup.js';
26
+ import './data/DataValue.js';
27
+ import './data/EmptyDataValue.js';
28
+ import './utils/JsonUtils.js';
29
+ import './types/Json.js';
30
+ import './utils/SchemaUtils.js';
31
+ import './Scriptable.js';
32
+
3
33
  const defaults = {
4
- visible: true
34
+ visible: true,
35
+ enabled: true
5
36
  };
6
- export class Fieldset extends Container {
37
+ class Fieldset extends Container {
7
38
  constructor(params, _options) {
8
39
  super(params, _options);
9
40
  this._applyDefaults();
@@ -43,3 +74,5 @@ export class Fieldset extends Container {
43
74
  this._setProperty('enabled', e);
44
75
  }
45
76
  }
77
+
78
+ export { Fieldset };
@@ -1,4 +1,24 @@
1
- export class FileObject {
1
+ /*************************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * ___________________
4
+ *
5
+ * Copyright 2022 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+
17
+ * Adobe permits you to use and modify this file solely in accordance with
18
+ * the terms of the Adobe license agreement accompanying it.
19
+ *************************************************************************/
20
+
21
+ class FileObject {
2
22
  data;
3
23
  mediaType = 'application/octet-stream';
4
24
  name = 'unknown';
@@ -24,3 +44,5 @@ export class FileObject {
24
44
  this.size === obj.size);
25
45
  }
26
46
  }
47
+
48
+ export { FileObject };
@@ -1,8 +1,40 @@
1
+ /*************************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * ___________________
4
+ *
5
+ * Copyright 2022 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+
17
+ * Adobe permits you to use and modify this file solely in accordance with
18
+ * the terms of the Adobe license agreement accompanying it.
19
+ *************************************************************************/
20
+
1
21
  import { propertyChange } from './controller/Events.js';
2
22
  import Field from './Field.js';
3
23
  import { getFileSizeInBytes } from './utils/FormUtils.js';
4
24
  import { FileObject } from './FileObject.js';
5
25
  import { Constraints } from './utils/ValidationUtils.js';
26
+ import './BaseNode-dc59ab07.js';
27
+ import './utils/DataRefParser.js';
28
+ import './data/DataGroup.js';
29
+ import './data/DataValue.js';
30
+ import './data/EmptyDataValue.js';
31
+ import './types/Model.js';
32
+ import './Scriptable.js';
33
+ import './utils/SchemaUtils.js';
34
+ import '@aemforms/af-formatters';
35
+ import './utils/JsonUtils.js';
36
+ import './types/Json.js';
37
+
6
38
  function addNameToDataURL(dataURL, name) {
7
39
  return dataURL.replace(';base64', `;name=${encodeURIComponent(name)};base64`);
8
40
  }
@@ -105,4 +137,5 @@ class FileUpload extends Field {
105
137
  }
106
138
  }
107
139
  }
108
- export default FileUpload;
140
+
141
+ export { FileUpload as default };
package/lib/esm/Form.d.ts CHANGED
@@ -100,8 +100,8 @@ declare class Form extends Container<FormJson> implements FormModel {
100
100
  validate(): import("./types/Model.js").ValidationError[];
101
101
  isValid(): boolean;
102
102
  dispatch(action: Action): void;
103
- executeAction(action: Action): void;
104
103
  submit(action: Action, context: any): void;
104
+ reset(): void;
105
105
  getElement(id: string): FieldModel | FieldsetModel | this;
106
106
  get qualifiedName(): string;
107
107
  getEventQueue(): EventQueue;
package/lib/esm/Form.js CHANGED
@@ -1,11 +1,43 @@
1
+ /*************************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * ___________________
4
+ *
5
+ * Copyright 2022 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+
17
+ * Adobe permits you to use and modify this file solely in accordance with
18
+ * the terms of the Adobe license agreement accompanying it.
19
+ *************************************************************************/
20
+
1
21
  import Container from './Container.js';
2
22
  import FormMetaData from './FormMetaData.js';
3
23
  import EventQueue from './controller/EventQueue.js';
4
24
  import { Logger } from './controller/Logger.js';
5
- import { getAttachments, IdGenerator } from './utils/FormUtils.js';
25
+ import { IdGenerator, getAttachments } from './utils/FormUtils.js';
6
26
  import DataGroup from './data/DataGroup.js';
7
27
  import { submit } from './rules/FunctionRuntime.js';
8
- import { ExecuteRule, FieldChanged, FormLoad, Initialize, ValidationComplete } from './controller/Events.js';
28
+ import { Initialize, ExecuteRule, FormLoad, FieldChanged, ValidationComplete } from './controller/Events.js';
29
+ import './BaseNode-dc59ab07.js';
30
+ import './utils/DataRefParser.js';
31
+ import './data/DataValue.js';
32
+ import './data/EmptyDataValue.js';
33
+ import './utils/JsonUtils.js';
34
+ import './types/Json.js';
35
+ import './utils/SchemaUtils.js';
36
+ import './Scriptable.js';
37
+ import './Node.js';
38
+ import './FileObject.js';
39
+ import './utils/Fetch.js';
40
+
9
41
  class Form extends Container {
10
42
  _ruleEngine;
11
43
  _eventQueue;
@@ -137,17 +169,16 @@ class Form extends Container {
137
169
  super.dispatch(action);
138
170
  }
139
171
  }
140
- executeAction(action) {
141
- if ((action.type !== 'submit') || this._invalidFields.length === 0) {
142
- super.executeAction(action);
143
- }
144
- }
145
172
  submit(action, context) {
146
173
  if (this.validate().length === 0) {
147
174
  const payload = action?.payload || {};
148
175
  submit(context, payload?.success, payload?.error, payload?.submit_as, payload?.data);
149
176
  }
150
177
  }
178
+ reset() {
179
+ super.reset();
180
+ this._invalidFields = [];
181
+ }
151
182
  getElement(id) {
152
183
  if (id == this.id) {
153
184
  return this;
@@ -173,4 +204,5 @@ class Form extends Container {
173
204
  return this._jsonModel.title || '';
174
205
  }
175
206
  }
176
- export default Form;
207
+
208
+ export { Form as default };
@@ -1,3 +1,23 @@
1
+ /*************************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * ___________________
4
+ *
5
+ * Copyright 2022 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+
17
+ * Adobe permits you to use and modify this file solely in accordance with
18
+ * the terms of the Adobe license agreement accompanying it.
19
+ *************************************************************************/
20
+
1
21
  import Form from './Form.js';
2
22
  import { jsonString } from './utils/JsonUtils.js';
3
23
  import { request } from './utils/Fetch.js';
@@ -6,7 +26,33 @@ import EventQueue from './controller/EventQueue.js';
6
26
  import { Logger } from './controller/Logger.js';
7
27
  import { FormFieldFactory } from './utils/FormCreationUtils.js';
8
28
  import { FunctionRuntime } from './rules/FunctionRuntime.js';
9
- export const createFormInstance = (formModel, callback, logLevel = 'error', fModel = undefined) => {
29
+ import './Container.js';
30
+ import './BaseNode-dc59ab07.js';
31
+ import './controller/Events.js';
32
+ import './utils/DataRefParser.js';
33
+ import './data/DataGroup.js';
34
+ import './data/DataValue.js';
35
+ import './data/EmptyDataValue.js';
36
+ import './Scriptable.js';
37
+ import './types/Json.js';
38
+ import './utils/SchemaUtils.js';
39
+ import './FormMetaData.js';
40
+ import './Node.js';
41
+ import './utils/FormUtils.js';
42
+ import './FileObject.js';
43
+ import '@adobe/json-formula';
44
+ import './InstanceManager.js';
45
+ import './Fieldset.js';
46
+ import './FileUpload.js';
47
+ import './Field.js';
48
+ import './types/Model.js';
49
+ import './utils/ValidationUtils.js';
50
+ import '@aemforms/af-formatters';
51
+ import './Checkbox.js';
52
+ import './CheckboxGroup.js';
53
+ import './DateField.js';
54
+
55
+ const createFormInstance = (formModel, callback, logLevel = 'error', fModel = undefined) => {
10
56
  try {
11
57
  let f = fModel;
12
58
  if (f == null) {
@@ -27,7 +73,7 @@ export const createFormInstance = (formModel, callback, logLevel = 'error', fMod
27
73
  throw new Error(e);
28
74
  }
29
75
  };
30
- export const validateFormInstance = (formModel, data) => {
76
+ const validateFormInstance = (formModel, data) => {
31
77
  try {
32
78
  const f = new Form({ ...formModel }, FormFieldFactory, new RuleEngine());
33
79
  if (data) {
@@ -39,7 +85,7 @@ export const validateFormInstance = (formModel, data) => {
39
85
  throw new Error(e);
40
86
  }
41
87
  };
42
- export const validateFormData = (formModel, data) => {
88
+ const validateFormData = (formModel, data) => {
43
89
  try {
44
90
  const f = new Form({ ...formModel }, FormFieldFactory, new RuleEngine());
45
91
  if (data) {
@@ -55,7 +101,7 @@ export const validateFormData = (formModel, data) => {
55
101
  throw new Error(e);
56
102
  }
57
103
  };
58
- export const fetchForm = (url, headers = {}) => {
104
+ const fetchForm = (url, headers = {}) => {
59
105
  const headerObj = new Headers();
60
106
  Object.entries(headers).forEach(([key, value]) => {
61
107
  headerObj.append(key, value);
@@ -76,6 +122,8 @@ export const fetchForm = (url, headers = {}) => {
76
122
  });
77
123
  });
78
124
  };
79
- export const registerFunctions = (functions) => {
125
+ const registerFunctions = (functions) => {
80
126
  FunctionRuntime.registerFunctions(functions);
81
127
  };
128
+
129
+ export { createFormInstance, fetchForm, registerFunctions, validateFormData, validateFormInstance };
@@ -1,4 +1,28 @@
1
+ /*************************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * ___________________
4
+ *
5
+ * Copyright 2022 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+
17
+ * Adobe permits you to use and modify this file solely in accordance with
18
+ * the terms of the Adobe license agreement accompanying it.
19
+ *************************************************************************/
20
+
1
21
  import Node from './Node.js';
22
+ import './utils/JsonUtils.js';
23
+ import './types/Json.js';
24
+ import './utils/SchemaUtils.js';
25
+
2
26
  class FormMetaData extends Node {
3
27
  get version() {
4
28
  return this.getP('version', '');
@@ -7,4 +31,5 @@ class FormMetaData extends Node {
7
31
  return this.getP('grammar', '');
8
32
  }
9
33
  }
10
- export default FormMetaData;
34
+
35
+ export { FormMetaData as default };
@@ -1,12 +1,37 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
1
+ /*************************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * ___________________
4
+ *
5
+ * Copyright 2022 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+
17
+ * Adobe permits you to use and modify this file solely in accordance with
18
+ * the terms of the Adobe license agreement accompanying it.
19
+ *************************************************************************/
20
+
21
+ import { _ as __decorate, d as dependencyTracked } from './BaseNode-dc59ab07.js';
7
22
  import { Fieldset } from './Fieldset.js';
8
- import { dependencyTracked } from './BaseNode.js';
9
- export class InstanceManager extends Fieldset {
23
+ import './controller/Events.js';
24
+ import './utils/DataRefParser.js';
25
+ import './data/DataGroup.js';
26
+ import './data/DataValue.js';
27
+ import './data/EmptyDataValue.js';
28
+ import './Container.js';
29
+ import './utils/JsonUtils.js';
30
+ import './types/Json.js';
31
+ import './utils/SchemaUtils.js';
32
+ import './Scriptable.js';
33
+
34
+ class InstanceManager extends Fieldset {
10
35
  get maxOccur() {
11
36
  return this._jsonModel.maxItems;
12
37
  }
@@ -29,3 +54,5 @@ __decorate([
29
54
  __decorate([
30
55
  dependencyTracked()
31
56
  ], InstanceManager.prototype, "minOccur", null);
57
+
58
+ export { InstanceManager };
package/lib/esm/Node.js CHANGED
@@ -1,4 +1,27 @@
1
+ /*************************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * ___________________
4
+ *
5
+ * Copyright 2022 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+
17
+ * Adobe permits you to use and modify this file solely in accordance with
18
+ * the terms of the Adobe license agreement accompanying it.
19
+ *************************************************************************/
20
+
1
21
  import { getProperty } from './utils/JsonUtils.js';
22
+ import './types/Json.js';
23
+ import './utils/SchemaUtils.js';
24
+
2
25
  class Node {
3
26
  _jsonModel;
4
27
  constructor(inputModel) {
@@ -13,4 +36,5 @@ class Node {
13
36
  return false;
14
37
  }
15
38
  }
16
- export default Node;
39
+
40
+ export { Node as default };
@@ -1,4 +1,30 @@
1
- import { BaseNode, editableProperties } from './BaseNode.js';
1
+ /*************************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * ___________________
4
+ *
5
+ * Copyright 2022 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+
17
+ * Adobe permits you to use and modify this file solely in accordance with
18
+ * the terms of the Adobe license agreement accompanying it.
19
+ *************************************************************************/
20
+
21
+ import { B as BaseNode, a as editableProperties } from './BaseNode-dc59ab07.js';
22
+ import './controller/Events.js';
23
+ import './utils/DataRefParser.js';
24
+ import './data/DataGroup.js';
25
+ import './data/DataValue.js';
26
+ import './data/EmptyDataValue.js';
27
+
2
28
  class Scriptable extends BaseNode {
3
29
  _events = {};
4
30
  _rules = {};
@@ -160,4 +186,5 @@ class Scriptable extends BaseNode {
160
186
  this.notifyDependents(action);
161
187
  }
162
188
  }
163
- export default Scriptable;
189
+
190
+ export { Scriptable as default };
@@ -1,4 +1,25 @@
1
+ /*************************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * ___________________
4
+ *
5
+ * Copyright 2022 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+
17
+ * Adobe permits you to use and modify this file solely in accordance with
18
+ * the terms of the Adobe license agreement accompanying it.
19
+ *************************************************************************/
20
+
1
21
  import { Logger } from './Logger.js';
22
+
2
23
  class EventNode {
3
24
  _node;
4
25
  _event;
@@ -83,4 +104,5 @@ class EventQueue {
83
104
  this._isProcessing = false;
84
105
  }
85
106
  }
86
- export default EventQueue;
107
+
108
+ export { EventQueue as default };
@@ -18,7 +18,7 @@ declare class ActionImpl implements Action {
18
18
  };
19
19
  toString(): string;
20
20
  }
21
- export declare type ChangePayload = {
21
+ export type ChangePayload = {
22
22
  changes: Array<{
23
23
  propertyName: string;
24
24
  prevValue?: any;