@dynamicforms/vue-forms 0.1.4 → 0.1.5

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.
@@ -57,7 +57,7 @@ const z = 10;
57
57
  n.isDefined = e;
58
58
  })(V || (V = {}));
59
59
  Object.freeze(V);
60
- const p = V;
60
+ const y = V;
61
61
  class q {
62
62
  get componentName() {
63
63
  return "Comment";
@@ -261,7 +261,7 @@ class L extends o {
261
261
  });
262
262
  }
263
263
  }
264
- class y {
264
+ class p {
265
265
  constructor() {
266
266
  u(this, "reactiveValue", Z(() => this.value));
267
267
  // contains original field value as was provided at creation
@@ -271,7 +271,7 @@ class y {
271
271
  // when member of a Group, fieldName specifies the name of this field
272
272
  u(this, "actions", new $());
273
273
  // default property handlers
274
- u(this, "_visibility", p.FULL);
274
+ u(this, "_visibility", y.FULL);
275
275
  u(this, "_enabled", !0);
276
276
  }
277
277
  get visibility() {
@@ -279,14 +279,14 @@ class y {
279
279
  }
280
280
  set visibility(i) {
281
281
  const t = this._visibility;
282
- if (!p.isDefined(i)) throw new Error("visibility must be a DisplayMode constant");
283
- this._visibility = p.fromAny(i), this.actions.trigger(E, this, this._visibility, t);
282
+ if (!y.isDefined(i)) throw new Error("visibility must be a DisplayMode constant");
283
+ this._visibility = y.fromAny(i), this.actions.trigger(E, this, this._visibility, t);
284
284
  }
285
285
  setVisibility(i) {
286
286
  return r(this, null, function* () {
287
287
  const t = this._visibility, e = yield this.actions.trigger(P, this, i, t);
288
- if (!p.isDefined(e != null ? e : i)) throw new Error("visibility must be a DisplayMode constant");
289
- this._visibility = p.fromAny(e != null ? e : i), this.actions.trigger(E, this, this._visibility, t);
288
+ if (!y.isDefined(e != null ? e : i)) throw new Error("visibility must be a DisplayMode constant");
289
+ this._visibility = y.fromAny(e != null ? e : i), this.actions.trigger(E, this, this._visibility, t);
290
290
  });
291
291
  }
292
292
  get enabled() {
@@ -324,7 +324,7 @@ class y {
324
324
  function k(n, i) {
325
325
  return (n == null ? void 0 : n.label) == null && (n == null ? void 0 : n.icon) == null ? i : n;
326
326
  }
327
- class A extends y {
327
+ class A extends p {
328
328
  constructor(t) {
329
329
  super();
330
330
  u(this, "_value");
@@ -373,7 +373,7 @@ class A extends y {
373
373
  this.actions.trigger(F, this, t);
374
374
  }
375
375
  }
376
- class m extends y {
376
+ class m extends p {
377
377
  constructor(t) {
378
378
  super();
379
379
  u(this, "_value");
@@ -409,7 +409,7 @@ const rt = m.create({ value: "EmptyField" }).registerAction(new g(
409
409
  console.warn("Working with EmptyField! This should not happen");
410
410
  })
411
411
  ));
412
- class b extends y {
412
+ class b extends p {
413
413
  constructor(t, e) {
414
414
  super();
415
415
  u(this, "_fields");
@@ -432,12 +432,12 @@ class b extends y {
432
432
  }
433
433
  static isValidFields(t) {
434
434
  function e(s) {
435
- return s instanceof y;
435
+ return s instanceof p;
436
436
  }
437
437
  return typeof t == "object" && t !== null && Object.entries(t).every(([, s]) => e(s));
438
438
  }
439
439
  static createFromFormData(t) {
440
- if (t instanceof y)
440
+ if (t instanceof p)
441
441
  throw new Error("data is already a Form structure, should be a simple object");
442
442
  return new b(
443
443
  t == null ? {} : Object.fromEntries(
@@ -498,7 +498,7 @@ class b extends y {
498
498
  }));
499
499
  }
500
500
  }
501
- class B extends y {
501
+ class B extends p {
502
502
  constructor(t, e) {
503
503
  super();
504
504
  u(this, "_value", null);
@@ -577,13 +577,14 @@ const ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
577
577
  AbortEventHandlingException: W,
578
578
  Action: A,
579
579
  ActionsMap: $,
580
- DisplayMode: p,
580
+ DisplayMode: y,
581
581
  EmptyField: rt,
582
582
  EnabledChangedAction: I,
583
583
  EnabledChangingAction: O,
584
584
  ExecuteAction: F,
585
585
  Field: m,
586
586
  FieldActionBase: o,
587
+ FieldBase: p,
587
588
  Group: b,
588
589
  List: B,
589
590
  ListItemAddedAction: C,
@@ -599,13 +600,14 @@ export {
599
600
  W as AbortEventHandlingException,
600
601
  A as Action,
601
602
  $ as ActionsMap,
602
- p as DisplayMode,
603
+ y as DisplayMode,
603
604
  rt as EmptyField,
604
605
  I as EnabledChangedAction,
605
606
  O as EnabledChangingAction,
606
607
  F as ExecuteAction,
607
608
  m as Field,
608
609
  o as FieldActionBase,
610
+ p as FieldBase,
609
611
  b as Group,
610
612
  B as List,
611
613
  C as ListItemAddedAction,
@@ -1 +1 @@
1
- {"version":3,"file":"dynamicforms-vue-forms.js","sources":["../src/display-mode.ts","../src/validation-error.ts","../src/actions/field-action-base.ts","../src/field.interface.ts","../src/actions/actions-map.ts","../src/actions/enabled-actions.ts","../src/actions/execute-action.ts","../src/actions/visibility-actions.ts","../src/actions/valid-changed-action.ts","../src/actions/value-changed-action.ts","../src/actions/list-item-added-action.ts","../src/actions/list-item-removed-action.ts","../src/field-base.ts","../src/action.ts","../src/field.ts","../src/group.ts","../src/list.ts"],"sourcesContent":["/**\n * DisplayMode enum provides an enumeration for supported ways of rendering a particular object in the DOM\n */\nenum DisplayMode {\n // This enum is actually declared in dynamicforms.mixins.field_render.py\n SUPPRESS = 1, // Field will be entirely suppressed. it will not render (not even to JSON) and will not parse for PUT\n HIDDEN = 5, // Field will render as <input type=\"hidden\"> or <tr data-field_name>\n INVISIBLE = 8, // Field will render completely, but with display: none. Equal to setting its style = {display: none}\n FULL = 10, // Field will render completely\n}\n\nexport const defaultDisplayMode = DisplayMode.FULL;\n\nnamespace DisplayMode {\n export function fromString(mode: string): DisplayMode {\n if (mode.toUpperCase() === 'SUPPRESS') return DisplayMode.SUPPRESS;\n if (mode.toUpperCase() === 'HIDDEN') return DisplayMode.HIDDEN;\n if (mode.toUpperCase() === 'INVISIBLE') return DisplayMode.INVISIBLE;\n return defaultDisplayMode;\n }\n\n export function fromAny(mode: any): DisplayMode {\n const input = (typeof mode === 'number') ? mode : DisplayMode.fromString(mode as string);\n if (Object.values(DisplayMode).includes(input)) return input;\n return defaultDisplayMode;\n }\n\n export function isDefined(mode: number | string): boolean {\n const check = (typeof mode === 'number') ? mode : DisplayMode.fromString(mode as string);\n return Object.values(DisplayMode).includes(check);\n }\n}\n\nObject.freeze(DisplayMode);\n\nexport default DisplayMode;\n","/* eslint-disable max-classes-per-file */\nexport class ValidationError {\n get componentName() { return 'Comment'; } // eslint-disable-line class-methods-use-this\n\n get componentBindings() { return {}; } // eslint-disable-line class-methods-use-this\n}\n\nexport class ValidationErrorText extends ValidationError {\n text: string;\n\n constructor(text: string) {\n super();\n this.text = text;\n }\n\n get componentName() { return 'v-sheet'; } // eslint-disable-line class-methods-use-this\n\n get componentBindings() { return { class: 'text-body-1' }; } // eslint-disable-line class-methods-use-this\n}\n\n/** ********************************************************************************************************************\n *\n at some point there will be classes here that will support links or action buttons or something even more complex\n *\n ******************************************************************************************************************** */\n","// eslint-disable-next-line max-classes-per-file\nimport {\n FieldActionExecute,\n type IField,\n type IFieldAction,\n} from '@/field.interface';\n\ntype ActionExecutor = (field: IField, supr: FieldActionExecute, ...params: any[]) => Promise<any>;\n\nexport default abstract class FieldActionBase implements IFieldAction {\n public abstract get classIdentifier(): symbol;\n private readonly executorFn: ActionExecutor;\n\n constructor(executorFn: ActionExecutor) {\n this.executorFn = executorFn;\n }\n\n async execute(field: IField, supr: IFieldAction['execute'], ...params: any[]): Promise<any> {\n return this.executorFn(field, supr, ...params);\n }\n}\n","import { ComputedRef } from 'vue';\n\nimport type DisplayMode from './display-mode';\nimport { type ValidationError } from './validation-error';\n\nexport interface IField<T = any> {\n value: T;\n reactiveValue: ComputedRef<T>;\n fullValue: T;\n originalValue: T;\n valid: boolean;\n errors: ValidationError[];\n enabled: boolean;\n visibility: DisplayMode;\n\n parent?: any; // Group when member of a Group, parent will specify that group\n fieldName?: string; // when member of a Group, fieldName specifies the name of this field\n\n clone(overrides?: Partial<IField<T>>): IField<T>;\n // events\n registerAction(action: IFieldAction<T>): this;\n triggerAction<T2 extends IFieldAction<T>>(actionClass: abstract new (...args: any[]) => T2, ...params: any[]): any;\n\n // API\n validate(): void;\n isChanged: boolean;\n}\n\nexport class AbortEventHandlingException extends Error {}\n\nexport type FieldActionExecute<T = any> = (field: IField<T>, ...params: any[]) => Promise<any>;\nexport interface IFieldAction<T = any> {\n execute(field: IField<T>, supr: FieldActionExecute<T>, ...params: any[]): any;\n}\n","import { type FieldActionExecute, type IField, AbortEventHandlingException } from '../field.interface';\n\nimport FieldActionBase from './field-action-base';\n\nexport default class ActionsMap extends Map<symbol, FieldActionExecute> {\n register(action: FieldActionBase) {\n if (!(action instanceof FieldActionBase)) {\n throw new Error('Invalid action type');\n }\n\n const actionType = action.classIdentifier;\n const existingExecute = this.get(actionType) || (() => null);\n\n function ex(field: IField, ...params: any[]) {\n return action.execute(field, existingExecute, ...params);\n }\n this.set(actionType, ex);\n }\n\n trigger<T extends FieldActionBase>(\n ActionClass: new (...args: any[]) => T,\n field: IField,\n ...params: any[]\n ): any {\n const identifier = new ActionClass(() => {}).classIdentifier;\n const execute = this.get(identifier);\n try {\n if (execute) return execute(field, ...params);\n } catch (error) {\n if (!(error instanceof AbortEventHandlingException)) throw error;\n }\n return null;\n }\n}\n","// eslint-disable-next-line max-classes-per-file\nimport FieldActionBase from './field-action-base';\n\nimport { FieldActionExecute, type IField } from '@/field.interface';\n\nconst EnabledChangingActionClassIdentifier = Symbol('EnabledChangingAction');\n\nexport class EnabledChangingAction extends FieldActionBase {\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(\n executorFn: (\n field: IField, supr: FieldActionExecute, newValue: boolean, oldValue: boolean\n ) => Promise<boolean>,\n ) {\n super(executorFn);\n }\n\n // eslint-disable-next-line class-methods-use-this\n get classIdentifier() { return EnabledChangingActionClassIdentifier; }\n\n async execute(field: IField, supr: FieldActionExecute, newValue: boolean, oldValue: boolean)\n : Promise<boolean> {\n return super.execute(field, supr, newValue, oldValue);\n }\n}\n\nconst EnabledChangedActionClassIdentifier = Symbol('EnabledChangedAction');\n\nexport class EnabledChangedAction extends FieldActionBase {\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(\n executorFn: (\n field: IField, supr: FieldActionExecute, newValue: boolean, oldValue: boolean\n ) => Promise<void>,\n ) {\n super(executorFn);\n }\n\n // eslint-disable-next-line class-methods-use-this\n get classIdentifier() { return EnabledChangedActionClassIdentifier; }\n\n async execute(\n field: IField,\n supr: FieldActionExecute,\n newValue: boolean,\n oldValue: boolean,\n ): Promise<void> {\n return super.execute(field, supr, newValue, oldValue);\n }\n}\n","import FieldActionBase from './field-action-base';\n\nimport { FieldActionExecute, type IField } from '@/field.interface';\n\nconst ExecuteActionClassIdentifier = Symbol('ExecuteAction');\n\n// eslint-disable-next-line import/prefer-default-export\nexport class ExecuteAction extends FieldActionBase {\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(\n executorFn: (field: IField, supr: FieldActionExecute, params: any) => Promise<any>,\n ) {\n super(executorFn);\n }\n\n // eslint-disable-next-line class-methods-use-this\n get classIdentifier() { return ExecuteActionClassIdentifier; }\n\n async execute(field: IField, supr: FieldActionExecute, params: any): Promise<any> {\n return super.execute(field, supr, params);\n }\n}\n","// eslint-disable-next-line max-classes-per-file\nimport FieldActionBase from './field-action-base';\n\nimport DisplayMode from '@/display-mode';\nimport { FieldActionExecute, type IField } from '@/field.interface';\n\nconst VisibilityChangingActionClassIdentifier = Symbol('VisibilityChangingAction');\n\nexport class VisibilityChangingAction extends FieldActionBase {\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(\n executorFn: (\n field: IField, supr: FieldActionExecute, newValue: DisplayMode, oldValue: DisplayMode\n ) => Promise<DisplayMode>,\n ) {\n super(executorFn);\n }\n\n // eslint-disable-next-line class-methods-use-this\n get classIdentifier() { return VisibilityChangingActionClassIdentifier; }\n\n async execute(\n field: IField,\n supr: FieldActionExecute,\n newValue: DisplayMode,\n oldValue: DisplayMode,\n ): Promise<DisplayMode> {\n return super.execute(field, supr, newValue, oldValue);\n }\n}\n\nconst VisibilityChangedActionClassIdentifier = Symbol('VisibilityChangedAction');\n\nexport class VisibilityChangedAction extends FieldActionBase {\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(\n executorFn: (\n field: IField, supr: FieldActionExecute, newValue: DisplayMode, oldValue: DisplayMode,\n ) => Promise<void>,\n ) {\n super(executorFn);\n }\n\n // eslint-disable-next-line class-methods-use-this\n get classIdentifier() { return VisibilityChangedActionClassIdentifier; }\n\n async execute(\n field: IField,\n supr: FieldActionExecute,\n newValue: DisplayMode,\n oldValue: DisplayMode,\n ): Promise<void> {\n return super.execute(field, supr, newValue, oldValue);\n }\n}\n","import FieldActionBase from './field-action-base';\n\nimport { FieldActionExecute, type IField } from '@/field.interface';\n\nconst ValidChangedActionClassIdentifier = Symbol('ValidChangedAction');\n\n// eslint-disable-next-line import/prefer-default-export\nexport class ValidChangedAction extends FieldActionBase {\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(\n executorFn: (\n field: IField, supr: FieldActionExecute, newValue: boolean, oldValue: boolean,\n ) => Promise<void>,\n ) {\n super(executorFn);\n }\n\n // eslint-disable-next-line class-methods-use-this\n get classIdentifier() { return ValidChangedActionClassIdentifier; }\n\n async execute(\n field: IField,\n supr: FieldActionExecute,\n newValue: boolean,\n oldValue: boolean,\n ): Promise<void> {\n return super.execute(field, supr, newValue, oldValue);\n }\n}\n","import FieldActionBase from './field-action-base';\n\nimport { FieldActionExecute, type IField } from '@/field.interface';\n\nconst ValueChangedActionClassIdentifier = Symbol('ValueChangedAction');\n\n// eslint-disable-next-line import/prefer-default-export\nexport class ValueChangedAction<T = any> extends FieldActionBase {\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(\n executorFn: (\n field: IField<T>, supr: FieldActionExecute<T>, newValue: T, oldValue: T,\n ) => Promise<void>,\n ) {\n super(executorFn);\n }\n\n // eslint-disable-next-line class-methods-use-this\n get classIdentifier() { return ValueChangedActionClassIdentifier; }\n\n async execute(\n field: IField<T>,\n supr: FieldActionExecute<T>,\n newValue: T,\n oldValue: T,\n ): Promise<void> {\n return super.execute(field, supr, newValue, oldValue);\n }\n}\n","import FieldActionBase from './field-action-base';\n\nimport { FieldActionExecute, type IField } from '@/field.interface';\n\nconst ListItemAddedActionClassIdentifier = Symbol('ListItemAddedAction');\n\n// eslint-disable-next-line import/prefer-default-export\nexport class ListItemAddedAction extends FieldActionBase {\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(\n executorFn: (field: IField, supr: FieldActionExecute, item: any, index: number) => Promise<void>,\n ) {\n super(executorFn);\n }\n\n // eslint-disable-next-line class-methods-use-this\n get classIdentifier() { return ListItemAddedActionClassIdentifier; }\n\n async execute(field: IField, supr: FieldActionExecute, item: any, index: number): Promise<void> {\n return super.execute(field, supr, item, index);\n }\n}\n","import FieldActionBase from './field-action-base';\n\nimport { FieldActionExecute, type IField } from '@/field.interface';\n\nconst ListItemRemovedActionClassIdentifier = Symbol('ListItemRemovedAction');\n\n// eslint-disable-next-line import/prefer-default-export\nexport class ListItemRemovedAction extends FieldActionBase {\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(\n executorFn: (field: IField, supr: FieldActionExecute, item: any, index: number) => Promise<void>,\n ) {\n super(executorFn);\n }\n\n // eslint-disable-next-line class-methods-use-this\n get classIdentifier() { return ListItemRemovedActionClassIdentifier; }\n\n async execute(field: IField, supr: FieldActionExecute, item: any, index: number): Promise<void> {\n return super.execute(field, supr, item, index);\n }\n}\n","import { isBoolean, isEqual } from 'lodash-es';\nimport { computed } from 'vue';\n\nimport {\n ActionsMap,\n EnabledChangedAction,\n EnabledChangingAction,\n ValidChangedAction,\n VisibilityChangedAction,\n VisibilityChangingAction,\n} from './actions';\nimport FieldActionBase from './actions/field-action-base';\nimport DisplayMode from './display-mode';\nimport { IField, IFieldAction } from './field.interface';\nimport { type Group } from './group';\nimport { ValidationError } from './validation-error';\n\n// eslint-disable-next-line import/prefer-default-export\nexport abstract class FieldBase<T = any> implements IField<T> {\n abstract get value(): T;\n abstract set value(newValue: T);\n public readonly reactiveValue = computed(() => this.value);\n\n abstract clone(overrides?: Partial<IField<T>>): IField<T>;\n\n declare originalValue: T; // contains original field value as was provided at creation\n\n valid: boolean = true; // is current value valid as per FE and BE validators?\n\n errors: ValidationError[] = []; // list of errors\n\n declare parent?: Group; // when member of a Group, parent will specify that group\n\n declare fieldName?: string; // when member of a Group, fieldName specifies the name of this field\n\n protected actions: ActionsMap = new ActionsMap();\n\n // default property handlers\n private _visibility: DisplayMode = DisplayMode.FULL;\n\n get visibility(): DisplayMode { return this._visibility; }\n\n set visibility(newValue: DisplayMode) {\n const oldValue = this._visibility;\n if (!DisplayMode.isDefined(newValue)) throw new Error('visibility must be a DisplayMode constant');\n this._visibility = DisplayMode.fromAny(newValue);\n this.actions.trigger(VisibilityChangedAction, this, this._visibility, oldValue);\n }\n\n async setVisibility(newValue: DisplayMode) {\n const oldValue = this._visibility;\n const alteredValue = await this.actions.trigger(VisibilityChangingAction, this, newValue, oldValue);\n if (!DisplayMode.isDefined(alteredValue ?? newValue)) throw new Error('visibility must be a DisplayMode constant');\n this._visibility = DisplayMode.fromAny(alteredValue ?? newValue);\n this.actions.trigger(VisibilityChangedAction, this, this._visibility, oldValue);\n }\n\n private _enabled: boolean = true;\n\n get enabled(): boolean { return this._enabled; }\n\n set enabled(newValue: boolean) {\n const oldValue = this._enabled;\n if (!isBoolean(newValue)) throw new Error('Enabled value must be boolean');\n this._enabled = newValue;\n this.actions.trigger(EnabledChangedAction, this, this._enabled, oldValue);\n }\n\n async setEnabled(newValue: boolean) {\n const oldValue = this._enabled;\n const alteredValue = await this.actions.trigger(EnabledChangingAction, this, newValue, oldValue);\n if (!isBoolean(alteredValue ?? newValue)) throw new Error('Enabled value must be boolean');\n this._enabled = alteredValue ?? newValue;\n this.actions.trigger(EnabledChangedAction, this, this._enabled, oldValue);\n }\n\n validate() {\n const oldValid = this.valid;\n this.valid = this.errors.length === 0;\n if (this.valid !== oldValid) this.actions.trigger(ValidChangedAction, this, this.valid, oldValid);\n }\n\n get fullValue(): any {\n return this.value;\n }\n\n get isChanged() : boolean {\n return !isEqual(this.value, this.originalValue);\n }\n\n registerAction(action: IFieldAction<T>): this {\n this.actions.register(action as FieldActionBase);\n return this;\n }\n\n triggerAction<T2 extends IFieldAction<T>>(\n actionClass: new (...args: any[]) => T2,\n ...params: any[]\n ): any {\n return this.actions.trigger(actionClass as any, this, ...params);\n }\n}\n","import { reactive } from 'vue';\n\nimport { ExecuteAction, ValueChangedAction } from './actions';\nimport { FieldBase } from './field-base';\nimport { IField } from './field.interface';\n\nexport interface ActionValue {\n label?: string;\n icon?: string;\n}\n\nfunction isValEmpty(val: ActionValue, defaultIfTrue: ActionValue): ActionValue {\n if (val?.label == null && val?.icon == null) return defaultIfTrue;\n return val;\n}\n\nexport class Action extends FieldBase {\n private readonly _value: ActionValue;\n\n protected constructor(params?: Partial<IField<ActionValue>>) {\n super();\n if (params) {\n const { value: paramValue, originalValue, ...otherParams } = params;\n Object.assign(this, otherParams);\n const val = { label: paramValue?.label, icon: paramValue?.icon } as ActionValue;\n const orgVal = Object.freeze({ label: originalValue?.label, icon: originalValue?.icon } as ActionValue);\n this._value = reactive(isValEmpty(val, orgVal));\n this.originalValue = isValEmpty(orgVal, val);\n } else {\n this._value = reactive({ label: undefined, icon: undefined });\n }\n }\n\n static create(params?: Partial<IField<ActionValue>>): Action {\n return reactive(new Action(params)) as Action;\n }\n\n get value(): ActionValue { return this._value; }\n\n set value(newValue: ActionValue) {\n if (!this.enabled) return; // a disabled field does not allow changing value\n const oldValue = this._value;\n this._value.icon = newValue?.icon;\n this._value.label = newValue?.label;\n this.actions.trigger(ValueChangedAction, this, newValue, oldValue);\n if (this.parent) this.parent.notifyValueChanged();\n this.validate();\n }\n\n get icon(): string | undefined {\n return this.value.icon;\n }\n\n set icon(newValue: string | undefined) {\n this.value = { label: this.label, icon: newValue };\n }\n\n get label(): string | undefined {\n return this.value.label;\n }\n\n set label(newValue: string | undefined) {\n this.value = { label: newValue, icon: this.value.icon };\n }\n\n clone(overrides?: Partial<IField>): Action {\n return Action.create({\n value: overrides?.value ?? this.value,\n ...(overrides && 'originalValue' in overrides ? { originalValue: overrides.originalValue } : { }),\n errors: [...(overrides?.errors ?? this.errors)],\n enabled: overrides?.enabled ?? this.enabled,\n visibility: overrides?.visibility ?? this.visibility,\n });\n }\n\n execute(params: any) {\n this.actions.trigger(ExecuteAction, this, params);\n }\n}\n\nexport type NullableAction = Action | null;\n","import { reactive } from 'vue';\n\nimport { ValueChangedAction } from './actions';\nimport { FieldBase } from './field-base';\nimport { IField } from './field.interface';\n\nexport class Field<T = any> extends FieldBase {\n private _value: T = undefined!;\n\n protected constructor(params?: Partial<IField<T>>) {\n super();\n if (params) {\n const { value: paramValue, ...otherParams } = params;\n Object.assign(this, otherParams);\n this._value = paramValue ?? this.originalValue;\n if (this.originalValue === undefined) this.originalValue = this._value;\n }\n }\n\n static create<T = any>(params?: Partial<IField<T>>): Field<T> {\n return reactive(new Field(params)) as Field<T>;\n }\n\n get value() { return this._value; }\n\n set value(newValue: T) {\n if (!this.enabled) return; // a disabled field does not allow changing value\n const oldValue = this._value;\n this._value = newValue;\n this.actions.trigger(ValueChangedAction, this, newValue, oldValue);\n if (this.parent) this.parent.notifyValueChanged();\n this.validate();\n }\n\n clone(overrides?: Partial<IField<T>>): Field<T> {\n return Field.create<T>({\n value: overrides?.value ?? this.value,\n ...(overrides && 'originalValue' in overrides ? { originalValue: overrides.originalValue } : { }),\n errors: [...(overrides?.errors ?? this.errors)],\n enabled: overrides?.enabled ?? this.enabled,\n visibility: overrides?.visibility ?? this.visibility,\n });\n }\n}\n\nexport type NullableField<T = any> = Field<T> | null;\n\nexport const EmptyField = Field.create({ value: 'EmptyField' })\n .registerAction(new ValueChangedAction(\n async () => {\n console.warn('Working with EmptyField! This should not happen');\n },\n ));\n","import { isEmpty, isEqual } from 'lodash-es';\n\nimport { ValueChangedAction } from './actions';\nimport { Field } from './field';\nimport { FieldBase } from './field-base';\nimport { IField } from './field.interface';\n\nexport type GenericFieldsInterface = Record<string, IField>;\n\nexport class Group<T extends GenericFieldsInterface = GenericFieldsInterface> extends FieldBase {\n private readonly _fields: T;\n\n private _value: Record<string, any> | null = null;\n\n private suppressNotifyValueChanged: boolean = false;\n\n constructor(fields: T, params?: Partial<IField>) {\n super();\n\n if (!Group.isValidFields(fields)) throw new Error('Invalid fields object provided');\n this._fields = {} as T;\n Object.entries(fields).forEach(([name, field]) => {\n Object.defineProperty(field, 'parent', { get: () => this, configurable: false, enumerable: false });\n Object.defineProperty(field, 'fieldName', { get: () => name, configurable: false, enumerable: false });\n Object.defineProperty(\n this._fields,\n name,\n { get() { return field; }, configurable: false, enumerable: true },\n );\n });\n\n if (params) {\n const { value: paramValue, ...otherParams } = params;\n Object.assign(this, otherParams);\n this.value = paramValue ?? this.originalValue;\n }\n\n if (this.originalValue === undefined) this.originalValue = this.value;\n\n // if (Object.keys(this._fields).length) console.log('group created', this, Error().stack);\n }\n\n private static isValidFields(flds: unknown): flds is Record<string, FieldBase> {\n function isFieldAll(field: unknown): field is FieldBase {\n return field instanceof FieldBase;\n }\n\n return typeof flds === 'object' &&\n flds !== null &&\n Object.entries(flds).every(([, field]) => isFieldAll(field));\n }\n\n static createFromFormData(data: Record<string, any> | null): Group {\n if (data instanceof FieldBase) {\n throw new Error('data is already a Form structure, should be a simple object');\n }\n return new Group(\n data == null ?\n { } :\n Object.fromEntries(\n Object.entries(data).map(([key, value]) => [key, Field.create({ value })]),\n ),\n );\n }\n\n field(fieldName: string): IField | null {\n return this._fields[fieldName] ?? null;\n }\n\n get fields(): T {\n return this._fields;\n }\n\n get value(): Record<string, any> | null {\n const value: Record<string, any> = {};\n Object.entries(this._fields).forEach(([name, field]) => {\n const fieldValue = field.value;\n if (field.enabled) {\n // readOnly fields do not serialize\n value[name] = fieldValue;\n } else if (field instanceof Group && !isEmpty(fieldValue)) {\n // readOnly group only serializes if it is non-empty (some of its fields are not readOnly)\n value[name] = fieldValue;\n }\n });\n return isEmpty(value) ? null : value;\n }\n\n set value(newValue: Record<string, any> | null) {\n this.suppressNotifyValueChanged = true;\n try {\n Object.entries(this._fields).forEach(([name, field]) => {\n if (newValue == null || name in newValue) {\n field.value = newValue == null ? null : newValue[name];\n }\n });\n } finally {\n this.suppressNotifyValueChanged = false;\n }\n this.notifyValueChanged();\n }\n\n get fullValue(): Record<string, any> {\n const value: Record<string, any> = {};\n Object.entries(this._fields).forEach(([name, field]) => { value[name] = field.fullValue; });\n return value;\n }\n\n notifyValueChanged() {\n if (this.suppressNotifyValueChanged) return;\n const newValue = this.value;\n if (!isEqual(newValue, this._value)) {\n const oldValue = this._value;\n this._value = newValue;\n this.actions.trigger(ValueChangedAction, this, newValue, oldValue);\n if (this.parent) this.parent.notifyValueChanged();\n }\n }\n\n clone(overrides?: Partial<IField>): Group<T> {\n const newFields = {} as T;\n Object.entries(this._fields).forEach(([name, field]) => {\n newFields[name as keyof T] = field.clone() as any;\n });\n\n return new Group(newFields, {\n value: overrides?.value ?? this.value,\n ...(overrides && 'originalValue' in overrides ? { originalValue: overrides.originalValue } : { }),\n errors: [...(overrides?.errors ?? [])],\n enabled: overrides?.enabled ?? this.enabled,\n visibility: overrides?.visibility ?? this.visibility,\n });\n }\n}\n\nexport type NullableGroup = Group | null;\n","import { isEmpty, isEqual } from 'lodash-es';\n\nimport { ListItemAddedAction, ListItemRemovedAction, ValueChangedAction } from './actions';\nimport { FieldBase } from './field-base';\nimport { IField } from './field.interface';\nimport { GenericFieldsInterface, Group } from './group';\n\nexport class List<T extends GenericFieldsInterface = GenericFieldsInterface> extends FieldBase {\n private _value: Group<T>[] | null = null;\n\n private _itemTemplate?: Group<T>;\n\n private _previousValue: Record<string, any>[] | null;\n\n constructor(itemTemplate?: Group<T>, params?: Partial<IField>) {\n super();\n\n this._itemTemplate = itemTemplate;\n\n if (params) {\n const { value: paramValue, ...otherParams } = params;\n Object.assign(this, otherParams);\n\n if (paramValue) this.setValue(paramValue);\n }\n\n if (this.originalValue === undefined) this.originalValue = this.value;\n this._previousValue = this.value;\n // if (Object.keys(this._fields).length) console.log('formGroup created', this, Error().stack);\n }\n\n private processSetValueItem(item: any) : Group<T> {\n let res: Group<T>;\n // If item is already a Group, use it\n if (item instanceof Group) res = item;\n // Otherwise create a Group from item\n else if (this._itemTemplate) res = this._itemTemplate.clone({ value: item });\n else res = Group.createFromFormData(item) as Group<T>;\n\n Object.defineProperty(res, 'parent', { get: () => this, configurable: false, enumerable: false });\n\n return res;\n }\n\n private setValue(newValue: any[]) {\n if (Array.isArray(newValue)) {\n this._value = newValue.map((item: any) => this.processSetValueItem(item));\n }\n }\n\n get value(): Record<string, any>[] | null {\n const value = this._value?.map((item) => item.value);\n return isEmpty(value) ? null : <Record<string, any>[]> value;\n }\n\n set value(newValue: Record<string, any>[]) {\n const oldValue = this.value;\n this.setValue(newValue);\n this.actions.trigger(ValueChangedAction, this, this.value, oldValue);\n if (this.parent) this.parent.notifyValueChanged();\n }\n\n clone(overrides?: Partial<IField>): List<T> {\n return new List(this._itemTemplate?.clone(), {\n value: [...(overrides?.value ?? this.value)],\n ...(overrides && 'originalValue' in overrides ? { originalValue: overrides.originalValue } : { }),\n errors: [...(overrides?.errors ?? [])],\n enabled: overrides?.enabled ?? this.enabled,\n visibility: overrides?.visibility ?? this.visibility,\n });\n }\n\n notifyValueChanged() {\n const newValue = this.value;\n if (!isEqual(newValue, this._previousValue)) {\n const oldValue = this._previousValue;\n this._previousValue = newValue;\n this.actions.trigger(ValueChangedAction, this, newValue, oldValue);\n if (this.parent) this.parent.notifyValueChanged();\n }\n }\n\n get(index: number): Group<T> | undefined {\n return this._value != null ? this._value[index] : undefined;\n }\n\n push(item: any): number {\n return this.insert(item, this._value?.length ?? 0) + 1;\n }\n\n pop(): Group<T> | undefined {\n return this.remove((this._value?.length ?? 0) - 1);\n }\n\n remove(index: number): Group<T> | undefined {\n if (this._value == null || index < 0 || this._value.length <= index) return undefined;\n\n let removedItem = this._value.splice(index, 1)?.[0];\n\n if (removedItem) {\n // Remove parent reference\n removedItem = removedItem.clone();\n\n // Trigger events\n this.actions.trigger(ListItemRemovedAction, this, removedItem, index);\n this.notifyValueChanged();\n }\n\n return removedItem;\n }\n\n insert(item: any, index: number): number {\n if (this._value == null) this._value = [];\n while (this._value.length < index) {\n // if the index is too large for current array size, we add as many as necessary\n const itm = this.processSetValueItem(null);\n const idx = this._value.push(itm);\n this.actions.trigger(ListItemAddedAction, this, itm, idx);\n }\n const itm = this.processSetValueItem(item);\n this._value.splice(index, 0, itm);\n\n this.actions.trigger(ListItemAddedAction, this, itm, index);\n this.notifyValueChanged();\n\n return index;\n }\n\n clear() {\n this._value = null;\n this.notifyValueChanged();\n }\n}\n\nexport type NullableList = List | null;\n"],"names":["DisplayMode","defaultDisplayMode","fromString","mode","fromAny","input","isDefined","check","DisplayMode$1","ValidationError","ValidationErrorText","text","__publicField","FieldActionBase","executorFn","field","supr","params","__async","AbortEventHandlingException","ActionsMap","action","actionType","existingExecute","ex","ActionClass","identifier","execute","error","EnabledChangingActionClassIdentifier","EnabledChangingAction","newValue","oldValue","__superGet","EnabledChangedActionClassIdentifier","EnabledChangedAction","ExecuteActionClassIdentifier","ExecuteAction","VisibilityChangingActionClassIdentifier","VisibilityChangingAction","VisibilityChangedActionClassIdentifier","VisibilityChangedAction","ValidChangedActionClassIdentifier","ValidChangedAction","ValueChangedActionClassIdentifier","ValueChangedAction","ListItemAddedActionClassIdentifier","ListItemAddedAction","item","index","ListItemRemovedActionClassIdentifier","ListItemRemovedAction","FieldBase","computed","alteredValue","isBoolean","oldValid","isEqual","actionClass","isValEmpty","val","defaultIfTrue","Action","_a","paramValue","originalValue","otherParams","__objRest","orgVal","reactive","overrides","__spreadProps","__spreadValues","_b","_c","_d","Field","EmptyField","Group","fields","name","flds","isFieldAll","data","key","value","fieldName","fieldValue","isEmpty","newFields","List","itemTemplate","res","_e","removedItem","itm","idx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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mBAAmB,IAGnB6C;AAAA,EAAA;AAAA,EAGT,OAAO9C,GAAWC,GAAuB;AAEhC,SADH,KAAK,UAAU,SAAM,KAAK,SAAS,CAAC,IACjC,KAAK,OAAO,SAASA,KAAO;AAE3B8C,YAAAA,IAAM,KAAK,oBAAoB,IAAI,GACnCC,IAAM,KAAK,OAAO,KAAKD,CAAG;AAChC,WAAK,QAAQ,QAAQhD,GAAqB,MAAMgD,GAAKC,CAAG;AAAA,IAAA;AAEpD,UAAAD,IAAM,KAAK,oBAAoB/C,CAAI;AACzC,gBAAK,OAAO,OAAOC,GAAO,GAAG8C,CAAG,GAEhC,KAAK,QAAQ,QAAQhD,GAAqB,MAAMgD,GAAK9C,CAAK,GAC1D,KAAK,mBAAmB,GAEjBA;AAAA,EAAA;AAAA,EAGT,QAAQ;AACN,SAAK,SAAS,MACd,KAAK,mBAAmB;AAAA,EAAA;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dynamicforms-vue-forms.js","sources":["../src/display-mode.ts","../src/validation-error.ts","../src/actions/field-action-base.ts","../src/field.interface.ts","../src/actions/actions-map.ts","../src/actions/enabled-actions.ts","../src/actions/execute-action.ts","../src/actions/visibility-actions.ts","../src/actions/valid-changed-action.ts","../src/actions/value-changed-action.ts","../src/actions/list-item-added-action.ts","../src/actions/list-item-removed-action.ts","../src/field-base.ts","../src/action.ts","../src/field.ts","../src/group.ts","../src/list.ts"],"sourcesContent":["/**\n * DisplayMode enum provides an enumeration for supported ways of rendering a particular object in the DOM\n */\nenum DisplayMode {\n // This enum is actually declared in dynamicforms.mixins.field_render.py\n SUPPRESS = 1, // Field will be entirely suppressed. it will not render (not even to JSON) and will not parse for PUT\n HIDDEN = 5, // Field will render as <input type=\"hidden\"> or <tr data-field_name>\n INVISIBLE = 8, // Field will render completely, but with display: none. Equal to setting its style = {display: none}\n FULL = 10, // Field will render completely\n}\n\nexport const defaultDisplayMode = DisplayMode.FULL;\n\nnamespace DisplayMode {\n export function fromString(mode: string): DisplayMode {\n if (mode.toUpperCase() === 'SUPPRESS') return DisplayMode.SUPPRESS;\n if (mode.toUpperCase() === 'HIDDEN') return DisplayMode.HIDDEN;\n if (mode.toUpperCase() === 'INVISIBLE') return DisplayMode.INVISIBLE;\n return defaultDisplayMode;\n }\n\n export function fromAny(mode: any): DisplayMode {\n const input = (typeof mode === 'number') ? mode : DisplayMode.fromString(mode as string);\n if (Object.values(DisplayMode).includes(input)) return input;\n return defaultDisplayMode;\n }\n\n export function isDefined(mode: number | string): boolean {\n const check = (typeof mode === 'number') ? mode : DisplayMode.fromString(mode as string);\n return Object.values(DisplayMode).includes(check);\n }\n}\n\nObject.freeze(DisplayMode);\n\nexport default DisplayMode;\n","/* eslint-disable max-classes-per-file */\nexport class ValidationError {\n get componentName() { return 'Comment'; } // eslint-disable-line class-methods-use-this\n\n get componentBindings() { return {}; } // eslint-disable-line class-methods-use-this\n}\n\nexport class ValidationErrorText extends ValidationError {\n text: string;\n\n constructor(text: string) {\n super();\n this.text = text;\n }\n\n get componentName() { return 'v-sheet'; } // eslint-disable-line class-methods-use-this\n\n get componentBindings() { return { class: 'text-body-1' }; } // eslint-disable-line class-methods-use-this\n}\n\n/** ********************************************************************************************************************\n *\n at some point there will be classes here that will support links or action buttons or something even more complex\n *\n ******************************************************************************************************************** */\n","// eslint-disable-next-line max-classes-per-file\nimport {\n FieldActionExecute,\n type IField,\n type IFieldAction,\n} from '@/field.interface';\n\ntype ActionExecutor = (field: IField, supr: FieldActionExecute, ...params: any[]) => Promise<any>;\n\nexport default abstract class FieldActionBase implements IFieldAction {\n public abstract get classIdentifier(): symbol;\n private readonly executorFn: ActionExecutor;\n\n constructor(executorFn: ActionExecutor) {\n this.executorFn = executorFn;\n }\n\n async execute(field: IField, supr: IFieldAction['execute'], ...params: any[]): Promise<any> {\n return this.executorFn(field, supr, ...params);\n }\n}\n","import { ComputedRef } from 'vue';\n\nimport type DisplayMode from './display-mode';\nimport { type ValidationError } from './validation-error';\n\nexport interface IField<T = any> {\n value: T;\n reactiveValue: ComputedRef<T>;\n fullValue: T;\n originalValue: T;\n valid: boolean;\n errors: ValidationError[];\n enabled: boolean;\n visibility: DisplayMode;\n\n parent?: any; // Group when member of a Group, parent will specify that group\n fieldName?: string; // when member of a Group, fieldName specifies the name of this field\n\n clone(overrides?: Partial<IField<T>>): IField<T>;\n // events\n registerAction(action: IFieldAction<T>): this;\n triggerAction<T2 extends IFieldAction<T>>(actionClass: abstract new (...args: any[]) => T2, ...params: any[]): any;\n\n // API\n validate(): void;\n isChanged: boolean;\n}\n\nexport class AbortEventHandlingException extends Error {}\n\nexport type FieldActionExecute<T = any> = (field: IField<T>, ...params: any[]) => Promise<any>;\nexport interface IFieldAction<T = any> {\n execute(field: IField<T>, supr: FieldActionExecute<T>, ...params: any[]): any;\n}\n","import { type FieldActionExecute, type IField, AbortEventHandlingException } from '../field.interface';\n\nimport FieldActionBase from './field-action-base';\n\nexport default class ActionsMap extends Map<symbol, FieldActionExecute> {\n register(action: FieldActionBase) {\n if (!(action instanceof FieldActionBase)) {\n throw new Error('Invalid action type');\n }\n\n const actionType = action.classIdentifier;\n const existingExecute = this.get(actionType) || (() => null);\n\n function ex(field: IField, ...params: any[]) {\n return action.execute(field, existingExecute, ...params);\n }\n this.set(actionType, ex);\n }\n\n trigger<T extends FieldActionBase>(\n ActionClass: new (...args: any[]) => T,\n field: IField,\n ...params: any[]\n ): any {\n const identifier = new ActionClass(() => {}).classIdentifier;\n const execute = this.get(identifier);\n try {\n if (execute) return execute(field, ...params);\n } catch (error) {\n if (!(error instanceof AbortEventHandlingException)) throw error;\n }\n return null;\n }\n}\n","// eslint-disable-next-line max-classes-per-file\nimport FieldActionBase from './field-action-base';\n\nimport { FieldActionExecute, type IField } from '@/field.interface';\n\nconst EnabledChangingActionClassIdentifier = Symbol('EnabledChangingAction');\n\nexport class EnabledChangingAction extends FieldActionBase {\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(\n executorFn: (\n field: IField, supr: FieldActionExecute, newValue: boolean, oldValue: boolean\n ) => Promise<boolean>,\n ) {\n super(executorFn);\n }\n\n // eslint-disable-next-line class-methods-use-this\n get classIdentifier() { return EnabledChangingActionClassIdentifier; }\n\n async execute(field: IField, supr: FieldActionExecute, newValue: boolean, oldValue: boolean)\n : Promise<boolean> {\n return super.execute(field, supr, newValue, oldValue);\n }\n}\n\nconst EnabledChangedActionClassIdentifier = Symbol('EnabledChangedAction');\n\nexport class EnabledChangedAction extends FieldActionBase {\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(\n executorFn: (\n field: IField, supr: FieldActionExecute, newValue: boolean, oldValue: boolean\n ) => Promise<void>,\n ) {\n super(executorFn);\n }\n\n // eslint-disable-next-line class-methods-use-this\n get classIdentifier() { return EnabledChangedActionClassIdentifier; }\n\n async execute(\n field: IField,\n supr: FieldActionExecute,\n newValue: boolean,\n oldValue: boolean,\n ): Promise<void> {\n return super.execute(field, supr, newValue, oldValue);\n }\n}\n","import FieldActionBase from './field-action-base';\n\nimport { FieldActionExecute, type IField } from '@/field.interface';\n\nconst ExecuteActionClassIdentifier = Symbol('ExecuteAction');\n\n// eslint-disable-next-line import/prefer-default-export\nexport class ExecuteAction extends FieldActionBase {\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(\n executorFn: (field: IField, supr: FieldActionExecute, params: any) => Promise<any>,\n ) {\n super(executorFn);\n }\n\n // eslint-disable-next-line class-methods-use-this\n get classIdentifier() { return ExecuteActionClassIdentifier; }\n\n async execute(field: IField, supr: FieldActionExecute, params: any): Promise<any> {\n return super.execute(field, supr, params);\n }\n}\n","// eslint-disable-next-line max-classes-per-file\nimport FieldActionBase from './field-action-base';\n\nimport DisplayMode from '@/display-mode';\nimport { FieldActionExecute, type IField } from '@/field.interface';\n\nconst VisibilityChangingActionClassIdentifier = Symbol('VisibilityChangingAction');\n\nexport class VisibilityChangingAction extends FieldActionBase {\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(\n executorFn: (\n field: IField, supr: FieldActionExecute, newValue: DisplayMode, oldValue: DisplayMode\n ) => Promise<DisplayMode>,\n ) {\n super(executorFn);\n }\n\n // eslint-disable-next-line class-methods-use-this\n get classIdentifier() { return VisibilityChangingActionClassIdentifier; }\n\n async execute(\n field: IField,\n supr: FieldActionExecute,\n newValue: DisplayMode,\n oldValue: DisplayMode,\n ): Promise<DisplayMode> {\n return super.execute(field, supr, newValue, oldValue);\n }\n}\n\nconst VisibilityChangedActionClassIdentifier = Symbol('VisibilityChangedAction');\n\nexport class VisibilityChangedAction extends FieldActionBase {\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(\n executorFn: (\n field: IField, supr: FieldActionExecute, newValue: DisplayMode, oldValue: DisplayMode,\n ) => Promise<void>,\n ) {\n super(executorFn);\n }\n\n // eslint-disable-next-line class-methods-use-this\n get classIdentifier() { return VisibilityChangedActionClassIdentifier; }\n\n async execute(\n field: IField,\n supr: FieldActionExecute,\n newValue: DisplayMode,\n oldValue: DisplayMode,\n ): Promise<void> {\n return super.execute(field, supr, newValue, oldValue);\n }\n}\n","import FieldActionBase from './field-action-base';\n\nimport { FieldActionExecute, type IField } from '@/field.interface';\n\nconst ValidChangedActionClassIdentifier = Symbol('ValidChangedAction');\n\n// eslint-disable-next-line import/prefer-default-export\nexport class ValidChangedAction extends FieldActionBase {\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(\n executorFn: (\n field: IField, supr: FieldActionExecute, newValue: boolean, oldValue: boolean,\n ) => Promise<void>,\n ) {\n super(executorFn);\n }\n\n // eslint-disable-next-line class-methods-use-this\n get classIdentifier() { return ValidChangedActionClassIdentifier; }\n\n async execute(\n field: IField,\n supr: FieldActionExecute,\n newValue: boolean,\n oldValue: boolean,\n ): Promise<void> {\n return super.execute(field, supr, newValue, oldValue);\n }\n}\n","import FieldActionBase from './field-action-base';\n\nimport { FieldActionExecute, type IField } from '@/field.interface';\n\nconst ValueChangedActionClassIdentifier = Symbol('ValueChangedAction');\n\n// eslint-disable-next-line import/prefer-default-export\nexport class ValueChangedAction<T = any> extends FieldActionBase {\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(\n executorFn: (\n field: IField<T>, supr: FieldActionExecute<T>, newValue: T, oldValue: T,\n ) => Promise<void>,\n ) {\n super(executorFn);\n }\n\n // eslint-disable-next-line class-methods-use-this\n get classIdentifier() { return ValueChangedActionClassIdentifier; }\n\n async execute(\n field: IField<T>,\n supr: FieldActionExecute<T>,\n newValue: T,\n oldValue: T,\n ): Promise<void> {\n return super.execute(field, supr, newValue, oldValue);\n }\n}\n","import FieldActionBase from './field-action-base';\n\nimport { FieldActionExecute, type IField } from '@/field.interface';\n\nconst ListItemAddedActionClassIdentifier = Symbol('ListItemAddedAction');\n\n// eslint-disable-next-line import/prefer-default-export\nexport class ListItemAddedAction extends FieldActionBase {\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(\n executorFn: (field: IField, supr: FieldActionExecute, item: any, index: number) => Promise<void>,\n ) {\n super(executorFn);\n }\n\n // eslint-disable-next-line class-methods-use-this\n get classIdentifier() { return ListItemAddedActionClassIdentifier; }\n\n async execute(field: IField, supr: FieldActionExecute, item: any, index: number): Promise<void> {\n return super.execute(field, supr, item, index);\n }\n}\n","import FieldActionBase from './field-action-base';\n\nimport { FieldActionExecute, type IField } from '@/field.interface';\n\nconst ListItemRemovedActionClassIdentifier = Symbol('ListItemRemovedAction');\n\n// eslint-disable-next-line import/prefer-default-export\nexport class ListItemRemovedAction extends FieldActionBase {\n // eslint-disable-next-line @typescript-eslint/no-useless-constructor\n constructor(\n executorFn: (field: IField, supr: FieldActionExecute, item: any, index: number) => Promise<void>,\n ) {\n super(executorFn);\n }\n\n // eslint-disable-next-line class-methods-use-this\n get classIdentifier() { return ListItemRemovedActionClassIdentifier; }\n\n async execute(field: IField, supr: FieldActionExecute, item: any, index: number): Promise<void> {\n return super.execute(field, supr, item, index);\n }\n}\n","import { isBoolean, isEqual } from 'lodash-es';\nimport { computed } from 'vue';\n\nimport {\n ActionsMap,\n EnabledChangedAction,\n EnabledChangingAction,\n ValidChangedAction,\n VisibilityChangedAction,\n VisibilityChangingAction,\n} from './actions';\nimport FieldActionBase from './actions/field-action-base';\nimport DisplayMode from './display-mode';\nimport { IField, IFieldAction } from './field.interface';\nimport { type Group } from './group';\nimport { ValidationError } from './validation-error';\n\n// eslint-disable-next-line import/prefer-default-export\nexport abstract class FieldBase<T = any> implements IField<T> {\n abstract get value(): T;\n abstract set value(newValue: T);\n public readonly reactiveValue = computed(() => this.value);\n\n abstract clone(overrides?: Partial<IField<T>>): IField<T>;\n\n declare originalValue: T; // contains original field value as was provided at creation\n\n valid: boolean = true; // is current value valid as per FE and BE validators?\n\n errors: ValidationError[] = []; // list of errors\n\n declare parent?: Group; // when member of a Group, parent will specify that group\n\n declare fieldName?: string; // when member of a Group, fieldName specifies the name of this field\n\n protected actions: ActionsMap = new ActionsMap();\n\n // default property handlers\n private _visibility: DisplayMode = DisplayMode.FULL;\n\n get visibility(): DisplayMode { return this._visibility; }\n\n set visibility(newValue: DisplayMode) {\n const oldValue = this._visibility;\n if (!DisplayMode.isDefined(newValue)) throw new Error('visibility must be a DisplayMode constant');\n this._visibility = DisplayMode.fromAny(newValue);\n this.actions.trigger(VisibilityChangedAction, this, this._visibility, oldValue);\n }\n\n async setVisibility(newValue: DisplayMode) {\n const oldValue = this._visibility;\n const alteredValue = await this.actions.trigger(VisibilityChangingAction, this, newValue, oldValue);\n if (!DisplayMode.isDefined(alteredValue ?? newValue)) throw new Error('visibility must be a DisplayMode constant');\n this._visibility = DisplayMode.fromAny(alteredValue ?? newValue);\n this.actions.trigger(VisibilityChangedAction, this, this._visibility, oldValue);\n }\n\n private _enabled: boolean = true;\n\n get enabled(): boolean { return this._enabled; }\n\n set enabled(newValue: boolean) {\n const oldValue = this._enabled;\n if (!isBoolean(newValue)) throw new Error('Enabled value must be boolean');\n this._enabled = newValue;\n this.actions.trigger(EnabledChangedAction, this, this._enabled, oldValue);\n }\n\n async setEnabled(newValue: boolean) {\n const oldValue = this._enabled;\n const alteredValue = await this.actions.trigger(EnabledChangingAction, this, newValue, oldValue);\n if (!isBoolean(alteredValue ?? newValue)) throw new Error('Enabled value must be boolean');\n this._enabled = alteredValue ?? newValue;\n this.actions.trigger(EnabledChangedAction, this, this._enabled, oldValue);\n }\n\n validate() {\n const oldValid = this.valid;\n this.valid = this.errors.length === 0;\n if (this.valid !== oldValid) this.actions.trigger(ValidChangedAction, this, this.valid, oldValid);\n }\n\n get fullValue(): any {\n return this.value;\n }\n\n get isChanged() : boolean {\n return !isEqual(this.value, this.originalValue);\n }\n\n registerAction(action: IFieldAction<T>): this {\n this.actions.register(action as FieldActionBase);\n return this;\n }\n\n triggerAction<T2 extends IFieldAction<T>>(\n actionClass: new (...args: any[]) => T2,\n ...params: any[]\n ): any {\n return this.actions.trigger(actionClass as any, this, ...params);\n }\n}\n","import { reactive } from 'vue';\n\nimport { ExecuteAction, ValueChangedAction } from './actions';\nimport { FieldBase } from './field-base';\nimport { IField } from './field.interface';\n\nexport interface ActionValue {\n label?: string;\n icon?: string;\n}\n\nfunction isValEmpty(val: ActionValue, defaultIfTrue: ActionValue): ActionValue {\n if (val?.label == null && val?.icon == null) return defaultIfTrue;\n return val;\n}\n\nexport class Action extends FieldBase {\n private readonly _value: ActionValue;\n\n protected constructor(params?: Partial<IField<ActionValue>>) {\n super();\n if (params) {\n const { value: paramValue, originalValue, ...otherParams } = params;\n Object.assign(this, otherParams);\n const val = { label: paramValue?.label, icon: paramValue?.icon } as ActionValue;\n const orgVal = Object.freeze({ label: originalValue?.label, icon: originalValue?.icon } as ActionValue);\n this._value = reactive(isValEmpty(val, orgVal));\n this.originalValue = isValEmpty(orgVal, val);\n } else {\n this._value = reactive({ label: undefined, icon: undefined });\n }\n }\n\n static create(params?: Partial<IField<ActionValue>>): Action {\n return reactive(new Action(params)) as Action;\n }\n\n get value(): ActionValue { return this._value; }\n\n set value(newValue: ActionValue) {\n if (!this.enabled) return; // a disabled field does not allow changing value\n const oldValue = this._value;\n this._value.icon = newValue?.icon;\n this._value.label = newValue?.label;\n this.actions.trigger(ValueChangedAction, this, newValue, oldValue);\n if (this.parent) this.parent.notifyValueChanged();\n this.validate();\n }\n\n get icon(): string | undefined {\n return this.value.icon;\n }\n\n set icon(newValue: string | undefined) {\n this.value = { label: this.label, icon: newValue };\n }\n\n get label(): string | undefined {\n return this.value.label;\n }\n\n set label(newValue: string | undefined) {\n this.value = { label: newValue, icon: this.value.icon };\n }\n\n clone(overrides?: Partial<IField>): Action {\n return Action.create({\n value: overrides?.value ?? this.value,\n ...(overrides && 'originalValue' in overrides ? { originalValue: overrides.originalValue } : { }),\n errors: [...(overrides?.errors ?? this.errors)],\n enabled: overrides?.enabled ?? this.enabled,\n visibility: overrides?.visibility ?? this.visibility,\n });\n }\n\n execute(params: any) {\n this.actions.trigger(ExecuteAction, this, params);\n }\n}\n\nexport type NullableAction = Action | null;\n","import { reactive } from 'vue';\n\nimport { ValueChangedAction } from './actions';\nimport { FieldBase } from './field-base';\nimport { IField } from './field.interface';\n\nexport class Field<T = any> extends FieldBase {\n private _value: T = undefined!;\n\n protected constructor(params?: Partial<IField<T>>) {\n super();\n if (params) {\n const { value: paramValue, ...otherParams } = params;\n Object.assign(this, otherParams);\n this._value = paramValue ?? this.originalValue;\n if (this.originalValue === undefined) this.originalValue = this._value;\n }\n }\n\n static create<T = any>(params?: Partial<IField<T>>): Field<T> {\n return reactive(new Field(params)) as Field<T>;\n }\n\n get value() { return this._value; }\n\n set value(newValue: T) {\n if (!this.enabled) return; // a disabled field does not allow changing value\n const oldValue = this._value;\n this._value = newValue;\n this.actions.trigger(ValueChangedAction, this, newValue, oldValue);\n if (this.parent) this.parent.notifyValueChanged();\n this.validate();\n }\n\n clone(overrides?: Partial<IField<T>>): Field<T> {\n return Field.create<T>({\n value: overrides?.value ?? this.value,\n ...(overrides && 'originalValue' in overrides ? { originalValue: overrides.originalValue } : { }),\n errors: [...(overrides?.errors ?? this.errors)],\n enabled: overrides?.enabled ?? this.enabled,\n visibility: overrides?.visibility ?? this.visibility,\n });\n }\n}\n\nexport type NullableField<T = any> = Field<T> | null;\n\nexport const EmptyField = Field.create({ value: 'EmptyField' })\n .registerAction(new ValueChangedAction(\n async () => {\n console.warn('Working with EmptyField! This should not happen');\n },\n ));\n","import { isEmpty, isEqual } from 'lodash-es';\n\nimport { ValueChangedAction } from './actions';\nimport { Field } from './field';\nimport { FieldBase } from './field-base';\nimport { IField } from './field.interface';\n\nexport type GenericFieldsInterface = Record<string, IField>;\n\nexport class Group<T extends GenericFieldsInterface = GenericFieldsInterface> extends FieldBase {\n private readonly _fields: T;\n\n private _value: Record<string, any> | null = null;\n\n private suppressNotifyValueChanged: boolean = false;\n\n constructor(fields: T, params?: Partial<IField>) {\n super();\n\n if (!Group.isValidFields(fields)) throw new Error('Invalid fields object provided');\n this._fields = {} as T;\n Object.entries(fields).forEach(([name, field]) => {\n Object.defineProperty(field, 'parent', { get: () => this, configurable: false, enumerable: false });\n Object.defineProperty(field, 'fieldName', { get: () => name, configurable: false, enumerable: false });\n Object.defineProperty(\n this._fields,\n name,\n { get() { return field; }, configurable: false, enumerable: true },\n );\n });\n\n if (params) {\n const { value: paramValue, ...otherParams } = params;\n Object.assign(this, otherParams);\n this.value = paramValue ?? this.originalValue;\n }\n\n if (this.originalValue === undefined) this.originalValue = this.value;\n\n // if (Object.keys(this._fields).length) console.log('group created', this, Error().stack);\n }\n\n private static isValidFields(flds: unknown): flds is Record<string, FieldBase> {\n function isFieldAll(field: unknown): field is FieldBase {\n return field instanceof FieldBase;\n }\n\n return typeof flds === 'object' &&\n flds !== null &&\n Object.entries(flds).every(([, field]) => isFieldAll(field));\n }\n\n static createFromFormData(data: Record<string, any> | null): Group {\n if (data instanceof FieldBase) {\n throw new Error('data is already a Form structure, should be a simple object');\n }\n return new Group(\n data == null ?\n { } :\n Object.fromEntries(\n Object.entries(data).map(([key, value]) => [key, Field.create({ value })]),\n ),\n );\n }\n\n field(fieldName: string): IField | null {\n return this._fields[fieldName] ?? null;\n }\n\n get fields(): T {\n return this._fields;\n }\n\n get value(): Record<string, any> | null {\n const value: Record<string, any> = {};\n Object.entries(this._fields).forEach(([name, field]) => {\n const fieldValue = field.value;\n if (field.enabled) {\n // readOnly fields do not serialize\n value[name] = fieldValue;\n } else if (field instanceof Group && !isEmpty(fieldValue)) {\n // readOnly group only serializes if it is non-empty (some of its fields are not readOnly)\n value[name] = fieldValue;\n }\n });\n return isEmpty(value) ? null : value;\n }\n\n set value(newValue: Record<string, any> | null) {\n this.suppressNotifyValueChanged = true;\n try {\n Object.entries(this._fields).forEach(([name, field]) => {\n if (newValue == null || name in newValue) {\n field.value = newValue == null ? null : newValue[name];\n }\n });\n } finally {\n this.suppressNotifyValueChanged = false;\n }\n this.notifyValueChanged();\n }\n\n get fullValue(): Record<string, any> {\n const value: Record<string, any> = {};\n Object.entries(this._fields).forEach(([name, field]) => { value[name] = field.fullValue; });\n return value;\n }\n\n notifyValueChanged() {\n if (this.suppressNotifyValueChanged) return;\n const newValue = this.value;\n if (!isEqual(newValue, this._value)) {\n const oldValue = this._value;\n this._value = newValue;\n this.actions.trigger(ValueChangedAction, this, newValue, oldValue);\n if (this.parent) this.parent.notifyValueChanged();\n }\n }\n\n clone(overrides?: Partial<IField>): Group<T> {\n const newFields = {} as T;\n Object.entries(this._fields).forEach(([name, field]) => {\n newFields[name as keyof T] = field.clone() as any;\n });\n\n return new Group(newFields, {\n value: overrides?.value ?? this.value,\n ...(overrides && 'originalValue' in overrides ? { originalValue: overrides.originalValue } : { }),\n errors: [...(overrides?.errors ?? [])],\n enabled: overrides?.enabled ?? this.enabled,\n visibility: overrides?.visibility ?? this.visibility,\n });\n }\n}\n\nexport type NullableGroup = Group | null;\n","import { isEmpty, isEqual } from 'lodash-es';\n\nimport { ListItemAddedAction, ListItemRemovedAction, ValueChangedAction } from './actions';\nimport { FieldBase } from './field-base';\nimport { IField } from './field.interface';\nimport { GenericFieldsInterface, Group } from './group';\n\nexport class List<T extends GenericFieldsInterface = GenericFieldsInterface> extends FieldBase {\n private _value: Group<T>[] | null = null;\n\n private _itemTemplate?: Group<T>;\n\n private _previousValue: Record<string, any>[] | null;\n\n constructor(itemTemplate?: Group<T>, params?: Partial<IField>) {\n super();\n\n this._itemTemplate = itemTemplate;\n\n if (params) {\n const { value: paramValue, ...otherParams } = params;\n Object.assign(this, otherParams);\n\n if (paramValue) this.setValue(paramValue);\n }\n\n if (this.originalValue === undefined) this.originalValue = this.value;\n this._previousValue = this.value;\n // if (Object.keys(this._fields).length) console.log('formGroup created', this, Error().stack);\n }\n\n private processSetValueItem(item: any) : Group<T> {\n let res: Group<T>;\n // If item is already a Group, use it\n if (item instanceof Group) res = item;\n // Otherwise create a Group from item\n else if (this._itemTemplate) res = this._itemTemplate.clone({ value: item });\n else res = Group.createFromFormData(item) as Group<T>;\n\n Object.defineProperty(res, 'parent', { get: () => this, configurable: false, enumerable: false });\n\n return res;\n }\n\n private setValue(newValue: any[]) {\n if (Array.isArray(newValue)) {\n this._value = newValue.map((item: any) => this.processSetValueItem(item));\n }\n }\n\n get value(): Record<string, any>[] | null {\n const value = this._value?.map((item) => item.value);\n return isEmpty(value) ? null : <Record<string, any>[]> value;\n }\n\n set value(newValue: Record<string, any>[]) {\n const oldValue = this.value;\n this.setValue(newValue);\n this.actions.trigger(ValueChangedAction, this, this.value, oldValue);\n if (this.parent) this.parent.notifyValueChanged();\n }\n\n clone(overrides?: Partial<IField>): List<T> {\n return new List(this._itemTemplate?.clone(), {\n value: [...(overrides?.value ?? this.value)],\n ...(overrides && 'originalValue' in overrides ? { originalValue: overrides.originalValue } : { }),\n errors: [...(overrides?.errors ?? [])],\n enabled: overrides?.enabled ?? this.enabled,\n visibility: overrides?.visibility ?? this.visibility,\n });\n }\n\n notifyValueChanged() {\n const newValue = this.value;\n if (!isEqual(newValue, this._previousValue)) {\n const oldValue = this._previousValue;\n this._previousValue = newValue;\n this.actions.trigger(ValueChangedAction, this, newValue, oldValue);\n if (this.parent) this.parent.notifyValueChanged();\n }\n }\n\n get(index: number): Group<T> | undefined {\n return this._value != null ? this._value[index] : undefined;\n }\n\n push(item: any): number {\n return this.insert(item, this._value?.length ?? 0) + 1;\n }\n\n pop(): Group<T> | undefined {\n return this.remove((this._value?.length ?? 0) - 1);\n }\n\n remove(index: number): Group<T> | undefined {\n if (this._value == null || index < 0 || this._value.length <= index) return undefined;\n\n let removedItem = this._value.splice(index, 1)?.[0];\n\n if (removedItem) {\n // Remove parent reference\n removedItem = removedItem.clone();\n\n // Trigger events\n this.actions.trigger(ListItemRemovedAction, this, removedItem, index);\n this.notifyValueChanged();\n }\n\n return removedItem;\n }\n\n insert(item: any, index: number): number {\n if (this._value == null) this._value = [];\n while (this._value.length < index) {\n // if the index is too large for current array size, we add as many as necessary\n const itm = this.processSetValueItem(null);\n const idx = this._value.push(itm);\n this.actions.trigger(ListItemAddedAction, this, itm, idx);\n }\n const itm = this.processSetValueItem(item);\n this._value.splice(index, 0, itm);\n\n this.actions.trigger(ListItemAddedAction, this, itm, index);\n this.notifyValueChanged();\n\n return index;\n }\n\n clear() {\n this._value = null;\n this.notifyValueChanged();\n }\n}\n\nexport type NullableList = List | null;\n"],"names":["DisplayMode","defaultDisplayMode","fromString","mode","fromAny","input","isDefined","check","DisplayMode$1","ValidationError","ValidationErrorText","text","__publicField","FieldActionBase","executorFn","field","supr","params","__async","AbortEventHandlingException","ActionsMap","action","actionType","existingExecute","ex","ActionClass","identifier","execute","error","EnabledChangingActionClassIdentifier","EnabledChangingAction","newValue","oldValue","__superGet","EnabledChangedActionClassIdentifier","EnabledChangedAction","ExecuteActionClassIdentifier","ExecuteAction","VisibilityChangingActionClassIdentifier","VisibilityChangingAction","VisibilityChangedActionClassIdentifier","VisibilityChangedAction","ValidChangedActionClassIdentifier","ValidChangedAction","ValueChangedActionClassIdentifier","ValueChangedAction","ListItemAddedActionClassIdentifier","ListItemAddedAction","item","index","ListItemRemovedActionClassIdentifier","ListItemRemovedAction","FieldBase","computed","alteredValue","isBoolean","oldValid","isEqual","actionClass","isValEmpty","val","defaultIfTrue","Action","_a","paramValue","originalValue","otherParams","__objRest","orgVal","reactive","overrides","__spreadProps","__spreadValues","_b","_c","_d","Field","EmptyField","Group","fields","name","flds","isFieldAll","data","key","value","fieldName","fieldValue","isEmpty","newFields","List","itemTemplate","res","_e","removedItem","itm","idx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAKA,sBAAAA,OAEHA,EAAAA,EAAA,WAAW,CAAX,IAAA,YACAA,EAAAA,EAAA,SAAS,CAAT,IAAA,UACAA,EAAAA,EAAA,YAAY,CAAZ,IAAA,aACAA,EAAAA,EAAA,OAAO,EAAP,IAAA,QALGA,IAAAA,KAAA,CAAA,CAAA;AAQE,MAAMC,IAAqB;AAAA,CAElC,CAAUD,MAAV;AACS,WAASE,EAAWC,GAA2B;AACpD,WAAIA,EAAK,kBAAkB,aAAmB,IAC1CA,EAAK,kBAAkB,WAAiB,IACxCA,EAAK,kBAAkB,cAAoB,IACxCF;AAAA,EAAA;AAJFD,EAAAA,EAAS,aAAAE;AAOT,WAASE,EAAQD,GAAwB;AAC9C,UAAME,IAAS,OAAOF,KAAS,WAAYA,IAAOH,EAAY,WAAWG,CAAc;AACvF,WAAI,OAAO,OAAOH,CAAW,EAAE,SAASK,CAAK,IAAUA,IAChDJ;AAAA,EAAA;AAHFD,EAAAA,EAAS,UAAAI;AAMT,WAASE,EAAUH,GAAgC;AACxD,UAAMI,IAAS,OAAOJ,KAAS,WAAYA,IAAOH,EAAY,WAAWG,CAAc;AACvF,WAAO,OAAO,OAAOH,CAAW,EAAE,SAASO,CAAK;AAAA,EAAA;AAF3CP,EAAAA,EAAS,YAAAM;AAAA,GAdRN,MAAAA,IAAA,CAAA,EAAA;AAoBV,OAAO,OAAOA,CAAW;AAEzB,MAAAQ,IAAeR;AClCR,MAAMS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uB,KAAK,CAAC;AAAA,EAAA;AAAA,EAGnD,OAAOxB,GAAqC;;AACtC,QAAA,KAAK,UAAU,QAAQA,IAAQ,KAAK,KAAK,OAAO,UAAUA,EAAc;AAE5E,QAAI6C,KAAc/B,IAAA,KAAK,OAAO,OAAOd,GAAO,CAAC,MAA3B,gBAAAc,EAA+B;AAEjD,WAAI+B,MAEFA,IAAcA,EAAY,MAAM,GAGhC,KAAK,QAAQ,QAAQ3C,GAAuB,MAAM2C,GAAa7C,CAAK,GACpE,KAAK,mBAAmB,IAGnB6C;AAAA,EAAA;AAAA,EAGT,OAAO9C,GAAWC,GAAuB;AAEhC,SADH,KAAK,UAAU,SAAM,KAAK,SAAS,CAAC,IACjC,KAAK,OAAO,SAASA,KAAO;AAE3B8C,YAAAA,IAAM,KAAK,oBAAoB,IAAI,GACnCC,IAAM,KAAK,OAAO,KAAKD,CAAG;AAChC,WAAK,QAAQ,QAAQhD,GAAqB,MAAMgD,GAAKC,CAAG;AAAA,IAAA;AAEpD,UAAAD,IAAM,KAAK,oBAAoB/C,CAAI;AACzC,gBAAK,OAAO,OAAOC,GAAO,GAAG8C,CAAG,GAEhC,KAAK,QAAQ,QAAQhD,GAAqB,MAAMgD,GAAK9C,CAAK,GAC1D,KAAK,mBAAmB,GAEjBA;AAAA,EAAA;AAAA,EAGT,QAAQ;AACN,SAAK,SAAS,MACd,KAAK,mBAAmB;AAAA,EAAA;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- (function(s,a){typeof exports=="object"&&typeof module!="undefined"?a(exports,require("vue"),require("lodash-es")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es"],a):(s=typeof globalThis!="undefined"?globalThis:s||self,a((s["dynamicforms-vue-forms"]=s["dynamicforms-vue-forms"]||{},s["dynamicforms-vue-forms"]["[name]"]={}),s.vue,s["lodash-es"]))})(this,function(s,a,u){"use strict";var nt=Object.defineProperty,st=Object.defineProperties;var lt=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols,at=Object.getPrototypeOf,W=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,ut=Reflect.get;var R=(s,a,u)=>a in s?nt(s,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):s[a]=u,T=(s,a)=>{for(var u in a||(a={}))W.call(a,u)&&R(s,u,a[u]);if(D)for(var u of D(a))$.call(a,u)&&R(s,u,a[u]);return s},w=(s,a)=>st(s,lt(a));var B=(s,a)=>{var u={};for(var o in s)W.call(s,o)&&a.indexOf(o)<0&&(u[o]=s[o]);if(s!=null&&D)for(var o of D(s))a.indexOf(o)<0&&$.call(s,o)&&(u[o]=s[o]);return u};var f=(s,a,u)=>R(s,typeof a!="symbol"?a+"":a,u);var y=(s,a,u)=>ut(at(s),u,a);var g=(s,a,u)=>new Promise((o,S)=>{var d=h=>{try{V(u.next(h))}catch(v){S(v)}},x=h=>{try{V(u.throw(h))}catch(v){S(v)}},V=h=>h.done?o(h.value):Promise.resolve(h.value).then(d,x);V((u=u.apply(s,a)).next())});var o=(c=>(c[c.SUPPRESS=1]="SUPPRESS",c[c.HIDDEN=5]="HIDDEN",c[c.INVISIBLE=8]="INVISIBLE",c[c.FULL=10]="FULL",c))(o||{});const S=10;(c=>{function n(i){return i.toUpperCase()==="SUPPRESS"?1:i.toUpperCase()==="HIDDEN"?5:i.toUpperCase()==="INVISIBLE"?8:S}c.fromString=n;function t(i){const l=typeof i=="number"?i:c.fromString(i);return Object.values(c).includes(l)?l:S}c.fromAny=t;function e(i){const l=typeof i=="number"?i:c.fromString(i);return Object.values(c).includes(l)}c.isDefined=e})(o||(o={})),Object.freeze(o);const d=o;class x{get componentName(){return"Comment"}get componentBindings(){return{}}}class V extends x{constructor(t){super();f(this,"text");this.text=t}get componentName(){return"v-sheet"}get componentBindings(){return{class:"text-body-1"}}}class h{constructor(n){f(this,"executorFn");this.executorFn=n}execute(n,t,...e){return g(this,null,function*(){return this.executorFn(n,t,...e)})}}class v extends Error{}class H extends Map{register(n){if(!(n instanceof h))throw new Error("Invalid action type");const t=n.classIdentifier,e=this.get(t)||(()=>null);function i(l,...r){return n.execute(l,e,...r)}this.set(t,i)}trigger(n,t,...e){const i=new n(()=>{}).classIdentifier,l=this.get(i);try{if(l)return l(t,...e)}catch(r){if(!(r instanceof v))throw r}return null}}const J=Symbol("EnabledChangingAction");class j extends h{constructor(n){super(n)}get classIdentifier(){return J}execute(n,t,e,i){return g(this,null,function*(){return y(j.prototype,this,"execute").call(this,n,t,e,i)})}}const K=Symbol("EnabledChangedAction");class E extends h{constructor(n){super(n)}get classIdentifier(){return K}execute(n,t,e,i){return g(this,null,function*(){return y(E.prototype,this,"execute").call(this,n,t,e,i)})}}const Q=Symbol("ExecuteAction");class F extends h{constructor(n){super(n)}get classIdentifier(){return Q}execute(n,t,e){return g(this,null,function*(){return y(F.prototype,this,"execute").call(this,n,t,e)})}}const X=Symbol("VisibilityChangingAction");class O extends h{constructor(n){super(n)}get classIdentifier(){return X}execute(n,t,e,i){return g(this,null,function*(){return y(O.prototype,this,"execute").call(this,n,t,e,i)})}}const Y=Symbol("VisibilityChangedAction");class I extends h{constructor(n){super(n)}get classIdentifier(){return Y}execute(n,t,e,i){return g(this,null,function*(){return y(I.prototype,this,"execute").call(this,n,t,e,i)})}}const Z=Symbol("ValidChangedAction");class P extends h{constructor(n){super(n)}get classIdentifier(){return Z}execute(n,t,e,i){return g(this,null,function*(){return y(P.prototype,this,"execute").call(this,n,t,e,i)})}}const M=Symbol("ValueChangedAction");class b extends h{constructor(n){super(n)}get classIdentifier(){return M}execute(n,t,e,i){return g(this,null,function*(){return y(b.prototype,this,"execute").call(this,n,t,e,i)})}}const G=Symbol("ListItemAddedAction");class C extends h{constructor(n){super(n)}get classIdentifier(){return G}execute(n,t,e,i){return g(this,null,function*(){return y(C.prototype,this,"execute").call(this,n,t,e,i)})}}const tt=Symbol("ListItemRemovedAction");class L extends h{constructor(n){super(n)}get classIdentifier(){return tt}execute(n,t,e,i){return g(this,null,function*(){return y(L.prototype,this,"execute").call(this,n,t,e,i)})}}class A{constructor(){f(this,"reactiveValue",a.computed(()=>this.value));f(this,"valid",!0);f(this,"errors",[]);f(this,"actions",new H);f(this,"_visibility",d.FULL);f(this,"_enabled",!0)}get visibility(){return this._visibility}set visibility(n){const t=this._visibility;if(!d.isDefined(n))throw new Error("visibility must be a DisplayMode constant");this._visibility=d.fromAny(n),this.actions.trigger(I,this,this._visibility,t)}setVisibility(n){return g(this,null,function*(){const t=this._visibility,e=yield this.actions.trigger(O,this,n,t);if(!d.isDefined(e!=null?e:n))throw new Error("visibility must be a DisplayMode constant");this._visibility=d.fromAny(e!=null?e:n),this.actions.trigger(I,this,this._visibility,t)})}get enabled(){return this._enabled}set enabled(n){const t=this._enabled;if(!u.isBoolean(n))throw new Error("Enabled value must be boolean");this._enabled=n,this.actions.trigger(E,this,this._enabled,t)}setEnabled(n){return g(this,null,function*(){const t=this._enabled,e=yield this.actions.trigger(j,this,n,t);if(!u.isBoolean(e!=null?e:n))throw new Error("Enabled value must be boolean");this._enabled=e!=null?e:n,this.actions.trigger(E,this,this._enabled,t)})}validate(){const n=this.valid;this.valid=this.errors.length===0,this.valid!==n&&this.actions.trigger(P,this,this.valid,n)}get fullValue(){return this.value}get isChanged(){return!u.isEqual(this.value,this.originalValue)}registerAction(n){return this.actions.register(n),this}triggerAction(n,...t){return this.actions.trigger(n,this,...t)}}function z(c,n){return(c==null?void 0:c.label)==null&&(c==null?void 0:c.icon)==null?n:c}class N extends A{constructor(t){super();f(this,"_value");if(t){const e=t,{value:i,originalValue:l}=e,r=B(e,["value","originalValue"]);Object.assign(this,r);const p={label:i==null?void 0:i.label,icon:i==null?void 0:i.icon},q=Object.freeze({label:l==null?void 0:l.label,icon:l==null?void 0:l.icon});this._value=a.reactive(z(p,q)),this.originalValue=z(q,p)}else this._value=a.reactive({label:void 0,icon:void 0})}static create(t){return a.reactive(new N(t))}get value(){return this._value}set value(t){if(!this.enabled)return;const e=this._value;this._value.icon=t==null?void 0:t.icon,this._value.label=t==null?void 0:t.label,this.actions.trigger(b,this,t,e),this.parent&&this.parent.notifyValueChanged(),this.validate()}get icon(){return this.value.icon}set icon(t){this.value={label:this.label,icon:t}}get label(){return this.value.label}set label(t){this.value={label:t,icon:this.value.icon}}clone(t){var e,i,l,r;return N.create(w(T({value:(e=t==null?void 0:t.value)!=null?e:this.value},t&&"originalValue"in t?{originalValue:t.originalValue}:{}),{errors:[...(i=t==null?void 0:t.errors)!=null?i:this.errors],enabled:(l=t==null?void 0:t.enabled)!=null?l:this.enabled,visibility:(r=t==null?void 0:t.visibility)!=null?r:this.visibility}))}execute(t){this.actions.trigger(F,this,t)}}class _ extends A{constructor(t){super();f(this,"_value");if(t){const e=t,{value:i}=e,l=B(e,["value"]);Object.assign(this,l),this._value=i!=null?i:this.originalValue,this.originalValue===void 0&&(this.originalValue=this._value)}}static create(t){return a.reactive(new _(t))}get value(){return this._value}set value(t){if(!this.enabled)return;const e=this._value;this._value=t,this.actions.trigger(b,this,t,e),this.parent&&this.parent.notifyValueChanged(),this.validate()}clone(t){var e,i,l,r;return _.create(w(T({value:(e=t==null?void 0:t.value)!=null?e:this.value},t&&"originalValue"in t?{originalValue:t.originalValue}:{}),{errors:[...(i=t==null?void 0:t.errors)!=null?i:this.errors],enabled:(l=t==null?void 0:t.enabled)!=null?l:this.enabled,visibility:(r=t==null?void 0:t.visibility)!=null?r:this.visibility}))}}const k=_.create({value:"EmptyField"}).registerAction(new b(()=>g(this,null,function*(){console.warn("Working with EmptyField! This should not happen")})));class m extends A{constructor(t,e){super();f(this,"_fields");f(this,"_value",null);f(this,"suppressNotifyValueChanged",!1);if(!m.isValidFields(t))throw new Error("Invalid fields object provided");if(this._fields={},Object.entries(t).forEach(([l,r])=>{Object.defineProperty(r,"parent",{get:()=>this,configurable:!1,enumerable:!1}),Object.defineProperty(r,"fieldName",{get:()=>l,configurable:!1,enumerable:!1}),Object.defineProperty(this._fields,l,{get(){return r},configurable:!1,enumerable:!0})}),e){const i=e,{value:l}=i,r=B(i,["value"]);Object.assign(this,r),this.value=l!=null?l:this.originalValue}this.originalValue===void 0&&(this.originalValue=this.value)}static isValidFields(t){function e(i){return i instanceof A}return typeof t=="object"&&t!==null&&Object.entries(t).every(([,i])=>e(i))}static createFromFormData(t){if(t instanceof A)throw new Error("data is already a Form structure, should be a simple object");return new m(t==null?{}:Object.fromEntries(Object.entries(t).map(([e,i])=>[e,_.create({value:i})])))}field(t){var e;return(e=this._fields[t])!=null?e:null}get fields(){return this._fields}get value(){const t={};return Object.entries(this._fields).forEach(([e,i])=>{const l=i.value;(i.enabled||i instanceof m&&!u.isEmpty(l))&&(t[e]=l)}),u.isEmpty(t)?null:t}set value(t){this.suppressNotifyValueChanged=!0;try{Object.entries(this._fields).forEach(([e,i])=>{(t==null||e in t)&&(i.value=t==null?null:t[e])})}finally{this.suppressNotifyValueChanged=!1}this.notifyValueChanged()}get fullValue(){const t={};return Object.entries(this._fields).forEach(([e,i])=>{t[e]=i.fullValue}),t}notifyValueChanged(){if(this.suppressNotifyValueChanged)return;const t=this.value;if(!u.isEqual(t,this._value)){const e=this._value;this._value=t,this.actions.trigger(b,this,t,e),this.parent&&this.parent.notifyValueChanged()}}clone(t){var i,l,r,p;const e={};return Object.entries(this._fields).forEach(([q,it])=>{e[q]=it.clone()}),new m(e,w(T({value:(i=t==null?void 0:t.value)!=null?i:this.value},t&&"originalValue"in t?{originalValue:t.originalValue}:{}),{errors:[...(l=t==null?void 0:t.errors)!=null?l:[]],enabled:(r=t==null?void 0:t.enabled)!=null?r:this.enabled,visibility:(p=t==null?void 0:t.visibility)!=null?p:this.visibility}))}}class U extends A{constructor(t,e){super();f(this,"_value",null);f(this,"_itemTemplate");f(this,"_previousValue");if(this._itemTemplate=t,e){const i=e,{value:l}=i,r=B(i,["value"]);Object.assign(this,r),l&&this.setValue(l)}this.originalValue===void 0&&(this.originalValue=this.value),this._previousValue=this.value}processSetValueItem(t){let e;return t instanceof m?e=t:this._itemTemplate?e=this._itemTemplate.clone({value:t}):e=m.createFromFormData(t),Object.defineProperty(e,"parent",{get:()=>this,configurable:!1,enumerable:!1}),e}setValue(t){Array.isArray(t)&&(this._value=t.map(e=>this.processSetValueItem(e)))}get value(){var e;const t=(e=this._value)==null?void 0:e.map(i=>i.value);return u.isEmpty(t)?null:t}set value(t){const e=this.value;this.setValue(t),this.actions.trigger(b,this,this.value,e),this.parent&&this.parent.notifyValueChanged()}clone(t){var e,i,l,r,p;return new U((e=this._itemTemplate)==null?void 0:e.clone(),w(T({value:[...(i=t==null?void 0:t.value)!=null?i:this.value]},t&&"originalValue"in t?{originalValue:t.originalValue}:{}),{errors:[...(l=t==null?void 0:t.errors)!=null?l:[]],enabled:(r=t==null?void 0:t.enabled)!=null?r:this.enabled,visibility:(p=t==null?void 0:t.visibility)!=null?p:this.visibility}))}notifyValueChanged(){const t=this.value;if(!u.isEqual(t,this._previousValue)){const e=this._previousValue;this._previousValue=t,this.actions.trigger(b,this,t,e),this.parent&&this.parent.notifyValueChanged()}}get(t){return this._value!=null?this._value[t]:void 0}push(t){var e,i;return this.insert(t,(i=(e=this._value)==null?void 0:e.length)!=null?i:0)+1}pop(){var t,e;return this.remove(((e=(t=this._value)==null?void 0:t.length)!=null?e:0)-1)}remove(t){var i;if(this._value==null||t<0||this._value.length<=t)return;let e=(i=this._value.splice(t,1))==null?void 0:i[0];return e&&(e=e.clone(),this.actions.trigger(L,this,e,t),this.notifyValueChanged()),e}insert(t,e){for(this._value==null&&(this._value=[]);this._value.length<e;){const l=this.processSetValueItem(null),r=this._value.push(l);this.actions.trigger(C,this,l,r)}const i=this.processSetValueItem(t);return this._value.splice(e,0,i),this.actions.trigger(C,this,i,e),this.notifyValueChanged(),e}clear(){this._value=null,this.notifyValueChanged()}}const et=Object.freeze(Object.defineProperty({__proto__:null,AbortEventHandlingException:v,Action:N,ActionsMap:H,DisplayMode:d,EmptyField:k,EnabledChangedAction:E,EnabledChangingAction:j,ExecuteAction:F,Field:_,FieldActionBase:h,Group:m,List:U,ListItemAddedAction:C,ListItemRemovedAction:L,ValidChangedAction:P,ValidationError:x,ValidationErrorText:V,ValueChangedAction:b,VisibilityChangedAction:I,VisibilityChangingAction:O},Symbol.toStringTag,{value:"Module"}));s.AbortEventHandlingException=v,s.Action=N,s.ActionsMap=H,s.DisplayMode=d,s.EmptyField=k,s.EnabledChangedAction=E,s.EnabledChangingAction=j,s.ExecuteAction=F,s.Field=_,s.FieldActionBase=h,s.Group=m,s.List=U,s.ListItemAddedAction=C,s.ListItemRemovedAction=L,s.ValidChangedAction=P,s.ValidationError=x,s.ValidationErrorText=V,s.ValueChangedAction=b,s.VisibilityChangedAction=I,s.VisibilityChangingAction=O,s.default=et,Object.defineProperties(s,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(s,a){typeof exports=="object"&&typeof module!="undefined"?a(exports,require("vue"),require("lodash-es")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es"],a):(s=typeof globalThis!="undefined"?globalThis:s||self,a((s["dynamicforms-vue-forms"]=s["dynamicforms-vue-forms"]||{},s["dynamicforms-vue-forms"]["[name]"]={}),s.vue,s["lodash-es"]))})(this,function(s,a,u){"use strict";var nt=Object.defineProperty,st=Object.defineProperties;var lt=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols,at=Object.getPrototypeOf,W=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,ut=Reflect.get;var R=(s,a,u)=>a in s?nt(s,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):s[a]=u,T=(s,a)=>{for(var u in a||(a={}))W.call(a,u)&&R(s,u,a[u]);if(D)for(var u of D(a))$.call(a,u)&&R(s,u,a[u]);return s},B=(s,a)=>st(s,lt(a));var w=(s,a)=>{var u={};for(var o in s)W.call(s,o)&&a.indexOf(o)<0&&(u[o]=s[o]);if(s!=null&&D)for(var o of D(s))a.indexOf(o)<0&&$.call(s,o)&&(u[o]=s[o]);return u};var f=(s,a,u)=>R(s,typeof a!="symbol"?a+"":a,u);var y=(s,a,u)=>ut(at(s),u,a);var g=(s,a,u)=>new Promise((o,S)=>{var d=h=>{try{E(u.next(h))}catch(_){S(_)}},x=h=>{try{E(u.throw(h))}catch(_){S(_)}},E=h=>h.done?o(h.value):Promise.resolve(h.value).then(d,x);E((u=u.apply(s,a)).next())});var o=(c=>(c[c.SUPPRESS=1]="SUPPRESS",c[c.HIDDEN=5]="HIDDEN",c[c.INVISIBLE=8]="INVISIBLE",c[c.FULL=10]="FULL",c))(o||{});const S=10;(c=>{function n(i){return i.toUpperCase()==="SUPPRESS"?1:i.toUpperCase()==="HIDDEN"?5:i.toUpperCase()==="INVISIBLE"?8:S}c.fromString=n;function t(i){const l=typeof i=="number"?i:c.fromString(i);return Object.values(c).includes(l)?l:S}c.fromAny=t;function e(i){const l=typeof i=="number"?i:c.fromString(i);return Object.values(c).includes(l)}c.isDefined=e})(o||(o={})),Object.freeze(o);const d=o;class x{get componentName(){return"Comment"}get componentBindings(){return{}}}class E extends x{constructor(t){super();f(this,"text");this.text=t}get componentName(){return"v-sheet"}get componentBindings(){return{class:"text-body-1"}}}class h{constructor(n){f(this,"executorFn");this.executorFn=n}execute(n,t,...e){return g(this,null,function*(){return this.executorFn(n,t,...e)})}}class _ extends Error{}class H extends Map{register(n){if(!(n instanceof h))throw new Error("Invalid action type");const t=n.classIdentifier,e=this.get(t)||(()=>null);function i(l,...r){return n.execute(l,e,...r)}this.set(t,i)}trigger(n,t,...e){const i=new n(()=>{}).classIdentifier,l=this.get(i);try{if(l)return l(t,...e)}catch(r){if(!(r instanceof _))throw r}return null}}const J=Symbol("EnabledChangingAction");class j extends h{constructor(n){super(n)}get classIdentifier(){return J}execute(n,t,e,i){return g(this,null,function*(){return y(j.prototype,this,"execute").call(this,n,t,e,i)})}}const K=Symbol("EnabledChangedAction");class I extends h{constructor(n){super(n)}get classIdentifier(){return K}execute(n,t,e,i){return g(this,null,function*(){return y(I.prototype,this,"execute").call(this,n,t,e,i)})}}const Q=Symbol("ExecuteAction");class F extends h{constructor(n){super(n)}get classIdentifier(){return Q}execute(n,t,e){return g(this,null,function*(){return y(F.prototype,this,"execute").call(this,n,t,e)})}}const X=Symbol("VisibilityChangingAction");class O extends h{constructor(n){super(n)}get classIdentifier(){return X}execute(n,t,e,i){return g(this,null,function*(){return y(O.prototype,this,"execute").call(this,n,t,e,i)})}}const Y=Symbol("VisibilityChangedAction");class C extends h{constructor(n){super(n)}get classIdentifier(){return Y}execute(n,t,e,i){return g(this,null,function*(){return y(C.prototype,this,"execute").call(this,n,t,e,i)})}}const Z=Symbol("ValidChangedAction");class P extends h{constructor(n){super(n)}get classIdentifier(){return Z}execute(n,t,e,i){return g(this,null,function*(){return y(P.prototype,this,"execute").call(this,n,t,e,i)})}}const M=Symbol("ValueChangedAction");class b extends h{constructor(n){super(n)}get classIdentifier(){return M}execute(n,t,e,i){return g(this,null,function*(){return y(b.prototype,this,"execute").call(this,n,t,e,i)})}}const G=Symbol("ListItemAddedAction");class A extends h{constructor(n){super(n)}get classIdentifier(){return G}execute(n,t,e,i){return g(this,null,function*(){return y(A.prototype,this,"execute").call(this,n,t,e,i)})}}const tt=Symbol("ListItemRemovedAction");class L extends h{constructor(n){super(n)}get classIdentifier(){return tt}execute(n,t,e,i){return g(this,null,function*(){return y(L.prototype,this,"execute").call(this,n,t,e,i)})}}class p{constructor(){f(this,"reactiveValue",a.computed(()=>this.value));f(this,"valid",!0);f(this,"errors",[]);f(this,"actions",new H);f(this,"_visibility",d.FULL);f(this,"_enabled",!0)}get visibility(){return this._visibility}set visibility(n){const t=this._visibility;if(!d.isDefined(n))throw new Error("visibility must be a DisplayMode constant");this._visibility=d.fromAny(n),this.actions.trigger(C,this,this._visibility,t)}setVisibility(n){return g(this,null,function*(){const t=this._visibility,e=yield this.actions.trigger(O,this,n,t);if(!d.isDefined(e!=null?e:n))throw new Error("visibility must be a DisplayMode constant");this._visibility=d.fromAny(e!=null?e:n),this.actions.trigger(C,this,this._visibility,t)})}get enabled(){return this._enabled}set enabled(n){const t=this._enabled;if(!u.isBoolean(n))throw new Error("Enabled value must be boolean");this._enabled=n,this.actions.trigger(I,this,this._enabled,t)}setEnabled(n){return g(this,null,function*(){const t=this._enabled,e=yield this.actions.trigger(j,this,n,t);if(!u.isBoolean(e!=null?e:n))throw new Error("Enabled value must be boolean");this._enabled=e!=null?e:n,this.actions.trigger(I,this,this._enabled,t)})}validate(){const n=this.valid;this.valid=this.errors.length===0,this.valid!==n&&this.actions.trigger(P,this,this.valid,n)}get fullValue(){return this.value}get isChanged(){return!u.isEqual(this.value,this.originalValue)}registerAction(n){return this.actions.register(n),this}triggerAction(n,...t){return this.actions.trigger(n,this,...t)}}function z(c,n){return(c==null?void 0:c.label)==null&&(c==null?void 0:c.icon)==null?n:c}class N extends p{constructor(t){super();f(this,"_value");if(t){const e=t,{value:i,originalValue:l}=e,r=w(e,["value","originalValue"]);Object.assign(this,r);const v={label:i==null?void 0:i.label,icon:i==null?void 0:i.icon},q=Object.freeze({label:l==null?void 0:l.label,icon:l==null?void 0:l.icon});this._value=a.reactive(z(v,q)),this.originalValue=z(q,v)}else this._value=a.reactive({label:void 0,icon:void 0})}static create(t){return a.reactive(new N(t))}get value(){return this._value}set value(t){if(!this.enabled)return;const e=this._value;this._value.icon=t==null?void 0:t.icon,this._value.label=t==null?void 0:t.label,this.actions.trigger(b,this,t,e),this.parent&&this.parent.notifyValueChanged(),this.validate()}get icon(){return this.value.icon}set icon(t){this.value={label:this.label,icon:t}}get label(){return this.value.label}set label(t){this.value={label:t,icon:this.value.icon}}clone(t){var e,i,l,r;return N.create(B(T({value:(e=t==null?void 0:t.value)!=null?e:this.value},t&&"originalValue"in t?{originalValue:t.originalValue}:{}),{errors:[...(i=t==null?void 0:t.errors)!=null?i:this.errors],enabled:(l=t==null?void 0:t.enabled)!=null?l:this.enabled,visibility:(r=t==null?void 0:t.visibility)!=null?r:this.visibility}))}execute(t){this.actions.trigger(F,this,t)}}class V extends p{constructor(t){super();f(this,"_value");if(t){const e=t,{value:i}=e,l=w(e,["value"]);Object.assign(this,l),this._value=i!=null?i:this.originalValue,this.originalValue===void 0&&(this.originalValue=this._value)}}static create(t){return a.reactive(new V(t))}get value(){return this._value}set value(t){if(!this.enabled)return;const e=this._value;this._value=t,this.actions.trigger(b,this,t,e),this.parent&&this.parent.notifyValueChanged(),this.validate()}clone(t){var e,i,l,r;return V.create(B(T({value:(e=t==null?void 0:t.value)!=null?e:this.value},t&&"originalValue"in t?{originalValue:t.originalValue}:{}),{errors:[...(i=t==null?void 0:t.errors)!=null?i:this.errors],enabled:(l=t==null?void 0:t.enabled)!=null?l:this.enabled,visibility:(r=t==null?void 0:t.visibility)!=null?r:this.visibility}))}}const k=V.create({value:"EmptyField"}).registerAction(new b(()=>g(this,null,function*(){console.warn("Working with EmptyField! This should not happen")})));class m extends p{constructor(t,e){super();f(this,"_fields");f(this,"_value",null);f(this,"suppressNotifyValueChanged",!1);if(!m.isValidFields(t))throw new Error("Invalid fields object provided");if(this._fields={},Object.entries(t).forEach(([l,r])=>{Object.defineProperty(r,"parent",{get:()=>this,configurable:!1,enumerable:!1}),Object.defineProperty(r,"fieldName",{get:()=>l,configurable:!1,enumerable:!1}),Object.defineProperty(this._fields,l,{get(){return r},configurable:!1,enumerable:!0})}),e){const i=e,{value:l}=i,r=w(i,["value"]);Object.assign(this,r),this.value=l!=null?l:this.originalValue}this.originalValue===void 0&&(this.originalValue=this.value)}static isValidFields(t){function e(i){return i instanceof p}return typeof t=="object"&&t!==null&&Object.entries(t).every(([,i])=>e(i))}static createFromFormData(t){if(t instanceof p)throw new Error("data is already a Form structure, should be a simple object");return new m(t==null?{}:Object.fromEntries(Object.entries(t).map(([e,i])=>[e,V.create({value:i})])))}field(t){var e;return(e=this._fields[t])!=null?e:null}get fields(){return this._fields}get value(){const t={};return Object.entries(this._fields).forEach(([e,i])=>{const l=i.value;(i.enabled||i instanceof m&&!u.isEmpty(l))&&(t[e]=l)}),u.isEmpty(t)?null:t}set value(t){this.suppressNotifyValueChanged=!0;try{Object.entries(this._fields).forEach(([e,i])=>{(t==null||e in t)&&(i.value=t==null?null:t[e])})}finally{this.suppressNotifyValueChanged=!1}this.notifyValueChanged()}get fullValue(){const t={};return Object.entries(this._fields).forEach(([e,i])=>{t[e]=i.fullValue}),t}notifyValueChanged(){if(this.suppressNotifyValueChanged)return;const t=this.value;if(!u.isEqual(t,this._value)){const e=this._value;this._value=t,this.actions.trigger(b,this,t,e),this.parent&&this.parent.notifyValueChanged()}}clone(t){var i,l,r,v;const e={};return Object.entries(this._fields).forEach(([q,it])=>{e[q]=it.clone()}),new m(e,B(T({value:(i=t==null?void 0:t.value)!=null?i:this.value},t&&"originalValue"in t?{originalValue:t.originalValue}:{}),{errors:[...(l=t==null?void 0:t.errors)!=null?l:[]],enabled:(r=t==null?void 0:t.enabled)!=null?r:this.enabled,visibility:(v=t==null?void 0:t.visibility)!=null?v:this.visibility}))}}class U extends p{constructor(t,e){super();f(this,"_value",null);f(this,"_itemTemplate");f(this,"_previousValue");if(this._itemTemplate=t,e){const i=e,{value:l}=i,r=w(i,["value"]);Object.assign(this,r),l&&this.setValue(l)}this.originalValue===void 0&&(this.originalValue=this.value),this._previousValue=this.value}processSetValueItem(t){let e;return t instanceof m?e=t:this._itemTemplate?e=this._itemTemplate.clone({value:t}):e=m.createFromFormData(t),Object.defineProperty(e,"parent",{get:()=>this,configurable:!1,enumerable:!1}),e}setValue(t){Array.isArray(t)&&(this._value=t.map(e=>this.processSetValueItem(e)))}get value(){var e;const t=(e=this._value)==null?void 0:e.map(i=>i.value);return u.isEmpty(t)?null:t}set value(t){const e=this.value;this.setValue(t),this.actions.trigger(b,this,this.value,e),this.parent&&this.parent.notifyValueChanged()}clone(t){var e,i,l,r,v;return new U((e=this._itemTemplate)==null?void 0:e.clone(),B(T({value:[...(i=t==null?void 0:t.value)!=null?i:this.value]},t&&"originalValue"in t?{originalValue:t.originalValue}:{}),{errors:[...(l=t==null?void 0:t.errors)!=null?l:[]],enabled:(r=t==null?void 0:t.enabled)!=null?r:this.enabled,visibility:(v=t==null?void 0:t.visibility)!=null?v:this.visibility}))}notifyValueChanged(){const t=this.value;if(!u.isEqual(t,this._previousValue)){const e=this._previousValue;this._previousValue=t,this.actions.trigger(b,this,t,e),this.parent&&this.parent.notifyValueChanged()}}get(t){return this._value!=null?this._value[t]:void 0}push(t){var e,i;return this.insert(t,(i=(e=this._value)==null?void 0:e.length)!=null?i:0)+1}pop(){var t,e;return this.remove(((e=(t=this._value)==null?void 0:t.length)!=null?e:0)-1)}remove(t){var i;if(this._value==null||t<0||this._value.length<=t)return;let e=(i=this._value.splice(t,1))==null?void 0:i[0];return e&&(e=e.clone(),this.actions.trigger(L,this,e,t),this.notifyValueChanged()),e}insert(t,e){for(this._value==null&&(this._value=[]);this._value.length<e;){const l=this.processSetValueItem(null),r=this._value.push(l);this.actions.trigger(A,this,l,r)}const i=this.processSetValueItem(t);return this._value.splice(e,0,i),this.actions.trigger(A,this,i,e),this.notifyValueChanged(),e}clear(){this._value=null,this.notifyValueChanged()}}const et=Object.freeze(Object.defineProperty({__proto__:null,AbortEventHandlingException:_,Action:N,ActionsMap:H,DisplayMode:d,EmptyField:k,EnabledChangedAction:I,EnabledChangingAction:j,ExecuteAction:F,Field:V,FieldActionBase:h,FieldBase:p,Group:m,List:U,ListItemAddedAction:A,ListItemRemovedAction:L,ValidChangedAction:P,ValidationError:x,ValidationErrorText:E,ValueChangedAction:b,VisibilityChangedAction:C,VisibilityChangingAction:O},Symbol.toStringTag,{value:"Module"}));s.AbortEventHandlingException=_,s.Action=N,s.ActionsMap=H,s.DisplayMode=d,s.EmptyField=k,s.EnabledChangedAction=I,s.EnabledChangingAction=j,s.ExecuteAction=F,s.Field=V,s.FieldActionBase=h,s.FieldBase=p,s.Group=m,s.List=U,s.ListItemAddedAction=A,s.ListItemRemovedAction=L,s.ValidChangedAction=P,s.ValidationError=x,s.ValidationErrorText=E,s.ValueChangedAction=b,s.VisibilityChangedAction=C,s.VisibilityChangingAction=O,s.default=et,Object.defineProperties(s,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
2
2
  //# sourceMappingURL=dynamicforms-vue-forms.umd.cjs.map
package/dist/index.d.ts CHANGED
@@ -83,7 +83,7 @@ export declare abstract class FieldActionBase implements IFieldAction {
83
83
 
84
84
  export declare type FieldActionExecute<T = any> = (field: IField<T>, ...params: any[]) => Promise<any>;
85
85
 
86
- declare abstract class FieldBase<T = any> implements IField<T> {
86
+ export declare abstract class FieldBase<T = any> implements IField<T> {
87
87
  abstract get value(): T;
88
88
  abstract set value(newValue: T);
89
89
  readonly reactiveValue: ComputedRef<T>;
@@ -135,6 +135,7 @@ declare namespace Form {
135
135
  AbortEventHandlingException,
136
136
  FieldActionExecute,
137
137
  IFieldAction,
138
+ FieldBase,
138
139
  GenericFieldsInterface,
139
140
  Group,
140
141
  NullableGroup,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dynamicforms/vue-forms",
3
3
  "private": false,
4
- "version": "0.1.4",
4
+ "version": "0.1.5",
5
5
  "type": "module",
6
6
  "description": "Data entry forms for vue - logic (no controls here)",
7
7
  "author": "Jure Erznožnik",