@axdspub/axiom-ui-forms 0.3.3-experimental.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/library/axiom-ui-forms.d.ts +32 -15
  2. package/library/esm/_virtual/index12.js +2 -2
  3. package/library/esm/_virtual/index13.js +2 -2
  4. package/library/esm/_virtual/index14.js +2 -2
  5. package/library/esm/_virtual/index4.js +2 -2
  6. package/library/esm/_virtual/index5.js +2 -2
  7. package/library/esm/_virtual/index9.js +2 -2
  8. package/library/esm/node_modules/@axdspub/axiom-maps/library/index.js +1 -1
  9. package/library/esm/node_modules/@axdspub/axiom-maps/library/openlayers/index.esm.js +1 -1
  10. package/library/esm/node_modules/@axdspub/axiom-maps/node_modules/@axdspub/axiom-ui-utilities/library/index.js +15219 -0
  11. package/library/esm/node_modules/@axdspub/axiom-maps/node_modules/@axdspub/axiom-ui-utilities/library/index.js.map +1 -0
  12. package/library/esm/node_modules/@axdspub/axiom-ui-utilities/library/index.js +122 -90
  13. package/library/esm/node_modules/@axdspub/axiom-ui-utilities/library/index.js.map +1 -1
  14. package/library/esm/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js +23 -1
  15. package/library/esm/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js.map +1 -1
  16. package/library/esm/node_modules/ajv/dist/compile/codegen/index.js +1 -1
  17. package/library/esm/node_modules/ajv/dist/compile/validate/index.js +1 -1
  18. package/library/esm/node_modules/ajv/dist/vocabularies/format/index.js +1 -1
  19. package/library/esm/node_modules/ajv/dist/vocabularies/validation/index.js +1 -1
  20. package/library/esm/node_modules/fast-uri/index.js +1 -1
  21. package/library/esm/node_modules/json-schema-traverse/index.js +1 -1
  22. package/library/esm/node_modules/lodash-es/_SetCache.js +28 -0
  23. package/library/esm/node_modules/lodash-es/_SetCache.js.map +1 -0
  24. package/library/esm/node_modules/lodash-es/_arrayLikeKeys.js +8 -1
  25. package/library/esm/node_modules/lodash-es/_arrayLikeKeys.js.map +1 -1
  26. package/library/esm/node_modules/lodash-es/_arraySome.js +24 -0
  27. package/library/esm/node_modules/lodash-es/_arraySome.js.map +1 -0
  28. package/library/esm/node_modules/lodash-es/_baseIsEqual.js +29 -0
  29. package/library/esm/node_modules/lodash-es/_baseIsEqual.js.map +1 -0
  30. package/library/esm/node_modules/lodash-es/_baseIsEqualDeep.js +84 -0
  31. package/library/esm/node_modules/lodash-es/_baseIsEqualDeep.js.map +1 -0
  32. package/library/esm/node_modules/lodash-es/_baseKeys.js +31 -0
  33. package/library/esm/node_modules/lodash-es/_baseKeys.js.map +1 -0
  34. package/library/esm/node_modules/lodash-es/_baseTrim.js +20 -0
  35. package/library/esm/node_modules/lodash-es/_baseTrim.js.map +1 -0
  36. package/library/esm/node_modules/lodash-es/_cacheHas.js +14 -0
  37. package/library/esm/node_modules/lodash-es/_cacheHas.js.map +1 -0
  38. package/library/esm/node_modules/lodash-es/_equalArrays.js +85 -0
  39. package/library/esm/node_modules/lodash-es/_equalArrays.js.map +1 -0
  40. package/library/esm/node_modules/lodash-es/_equalByTag.js +113 -0
  41. package/library/esm/node_modules/lodash-es/_equalByTag.js.map +1 -0
  42. package/library/esm/node_modules/lodash-es/_equalObjects.js +91 -0
  43. package/library/esm/node_modules/lodash-es/_equalObjects.js.map +1 -0
  44. package/library/esm/node_modules/lodash-es/_getAllKeys.js +17 -0
  45. package/library/esm/node_modules/lodash-es/_getAllKeys.js.map +1 -0
  46. package/library/esm/node_modules/lodash-es/_mapToArray.js +19 -0
  47. package/library/esm/node_modules/lodash-es/_mapToArray.js.map +1 -0
  48. package/library/esm/node_modules/lodash-es/_nativeKeys.js +7 -0
  49. package/library/esm/node_modules/lodash-es/_nativeKeys.js.map +1 -0
  50. package/library/esm/node_modules/lodash-es/_setCacheAdd.js +20 -0
  51. package/library/esm/node_modules/lodash-es/_setCacheAdd.js.map +1 -0
  52. package/library/esm/node_modules/lodash-es/_setCacheHas.js +15 -0
  53. package/library/esm/node_modules/lodash-es/_setCacheHas.js.map +1 -0
  54. package/library/esm/node_modules/lodash-es/_setToArray.js +19 -0
  55. package/library/esm/node_modules/lodash-es/_setToArray.js.map +1 -0
  56. package/library/esm/node_modules/lodash-es/_trimmedEndIndex.js +20 -0
  57. package/library/esm/node_modules/lodash-es/_trimmedEndIndex.js.map +1 -0
  58. package/library/esm/node_modules/lodash-es/debounce.js +192 -0
  59. package/library/esm/node_modules/lodash-es/debounce.js.map +1 -0
  60. package/library/esm/node_modules/lodash-es/isEqual.js +36 -0
  61. package/library/esm/node_modules/lodash-es/isEqual.js.map +1 -0
  62. package/library/esm/node_modules/lodash-es/keys.js +38 -0
  63. package/library/esm/node_modules/lodash-es/keys.js.map +1 -0
  64. package/library/esm/node_modules/lodash-es/keysIn.js +1 -1
  65. package/library/esm/node_modules/lodash-es/keysIn.js.map +1 -1
  66. package/library/esm/node_modules/lodash-es/now.js +24 -0
  67. package/library/esm/node_modules/lodash-es/now.js.map +1 -0
  68. package/library/esm/node_modules/lodash-es/toNumber.js +65 -0
  69. package/library/esm/node_modules/lodash-es/toNumber.js.map +1 -0
  70. package/library/esm/src/Form/Components/FieldCreator.js +25 -14
  71. package/library/esm/src/Form/Components/FieldCreator.js.map +1 -1
  72. package/library/esm/src/Form/Components/FieldLabel.js +27 -13
  73. package/library/esm/src/Form/Components/FieldLabel.js.map +1 -1
  74. package/library/esm/src/Form/Components/InlineMarkdown.js +4 -0
  75. package/library/esm/src/Form/Components/InlineMarkdown.js.map +1 -1
  76. package/library/esm/src/Form/Components/Inputs/Boolean.js +4 -5
  77. package/library/esm/src/Form/Components/Inputs/Boolean.js.map +1 -1
  78. package/library/esm/src/Form/Components/Inputs/Date.js +3 -4
  79. package/library/esm/src/Form/Components/Inputs/Date.js.map +1 -1
  80. package/library/esm/src/Form/Components/Inputs/DateTime.js +3 -4
  81. package/library/esm/src/Form/Components/Inputs/DateTime.js.map +1 -1
  82. package/library/esm/src/Form/Components/Inputs/GeoJSON.js +5 -4
  83. package/library/esm/src/Form/Components/Inputs/GeoJSON.js.map +1 -1
  84. package/library/esm/src/Form/Components/Inputs/Geometry.js +20 -11
  85. package/library/esm/src/Form/Components/Inputs/Geometry.js.map +1 -1
  86. package/library/esm/src/Form/Components/Inputs/JSON.js +7 -6
  87. package/library/esm/src/Form/Components/Inputs/JSON.js.map +1 -1
  88. package/library/esm/src/Form/Components/Inputs/LongString.js +5 -5
  89. package/library/esm/src/Form/Components/Inputs/LongString.js.map +1 -1
  90. package/library/esm/src/Form/Components/Inputs/Number.js +48 -33
  91. package/library/esm/src/Form/Components/Inputs/Number.js.map +1 -1
  92. package/library/esm/src/Form/Components/Inputs/Object.js +16 -6
  93. package/library/esm/src/Form/Components/Inputs/Object.js.map +1 -1
  94. package/library/esm/src/Form/Components/Inputs/RadioGroup.js +2 -3
  95. package/library/esm/src/Form/Components/Inputs/RadioGroup.js.map +1 -1
  96. package/library/esm/src/Form/Components/Inputs/SingleSelect.js +2 -3
  97. package/library/esm/src/Form/Components/Inputs/SingleSelect.js.map +1 -1
  98. package/library/esm/src/Form/Components/Inputs/String.js +5 -11
  99. package/library/esm/src/Form/Components/Inputs/String.js.map +1 -1
  100. package/library/esm/src/Form/Components/Inputs/Time.js +2 -3
  101. package/library/esm/src/Form/Components/Inputs/Time.js.map +1 -1
  102. package/library/esm/src/Form/Creator/FormCreator.js +2 -2
  103. package/library/esm/src/Form/Creator/FormCreator.js.map +1 -1
  104. package/library/esm/src/Form/Creator/FormSection.js +1 -1
  105. package/library/esm/src/Form/Creator/FormSection.js.map +1 -1
  106. package/library/esm/src/Form/Creator/Page.js +7 -2
  107. package/library/esm/src/Form/Creator/Page.js.map +1 -1
  108. package/library/esm/src/Form/Creator/Wizard.js +3 -3
  109. package/library/esm/src/Form/Creator/Wizard.js.map +1 -1
  110. package/library/esm/src/utils/helpers.js +11 -0
  111. package/library/esm/src/utils/helpers.js.map +1 -0
  112. package/library/esm/src/utils/manipulators.js +4 -1
  113. package/library/esm/src/utils/manipulators.js.map +1 -1
  114. package/library/esm/src/utils/schemaToFormHelpers.js +2 -2
  115. package/library/esm/src/utils/schemaToFormHelpers.js.map +1 -1
  116. package/library/esm/src/utils/validators.js +82 -15
  117. package/library/esm/src/utils/validators.js.map +1 -1
  118. package/package.json +3 -3
@@ -21,9 +21,19 @@ type IValueType = undefined | null | ValueOf<IValueTypes>;
21
21
  type IFormField = ITextField | IConstantField | INumberField | ILongTextField | IJSONField | ISelectField | IRadioField | ICheckboxField | IDateField | ITimeField | IDateTimeField | IBooleanField | IObjectField | IObjectListField | IOneOfField | IGeoJSONField | IGeometryField | IFormFieldSection | ICustomField;
22
22
  type IFormFieldType = 'text' | 'long_text' | 'number' | 'json' | 'select' | 'radio' | 'checkbox' | 'date' | 'time' | 'datetime' | 'boolean' | 'object' | 'objectList' | 'oneOf' | 'geojson' | 'geometry' | `custom:${string}`;
23
23
  type ISectionFormFieldType = 'section' | 'page';
24
- interface IFieldConditions {
25
- dependsOn: string | string[];
24
+ type IFieldConditionResult = 'exclude' | 'include' | 'disable' | 'enable';
25
+ interface IFieldConditionsSet {
26
+ logic?: 'and' | 'or';
27
+ conditions: Array<Omit<IFieldCondition, 'result'>>;
28
+ result?: IFieldConditionResult;
29
+ }
30
+ type IFieldConditionOperator = '=' | 'eq' | '>' | 'gt' | '>=' | 'gte' | '<' | 'lt' | '<=' | 'lte' | '!=' | '!eq';
31
+ interface IFieldCondition {
32
+ dependsOn?: string | string[];
33
+ field?: string | string[];
26
34
  value: string | number | boolean;
35
+ operator?: IFieldConditionOperator;
36
+ result?: IFieldConditionResult;
27
37
  }
28
38
  type IFieldConstraints = Record<string, unknown>;
29
39
  interface IFormFieldRoot {
@@ -39,7 +49,8 @@ interface IFormFieldRoot {
39
49
  level?: number;
40
50
  index?: number;
41
51
  defaultValue?: IValueType | IValueType[];
42
- conditions?: IFieldConditions;
52
+ conditions?: IFieldCondition;
53
+ conditionsSet?: IFieldConditionsSet;
43
54
  constraints?: IFieldConstraints;
44
55
  settings?: Record<string, unknown>;
45
56
  }
@@ -263,6 +274,7 @@ interface IFieldInputProps {
263
274
  onChange: IValueChangeFn;
264
275
  value?: IValueType;
265
276
  className?: string;
277
+ disabled?: boolean;
266
278
  }
267
279
 
268
280
  /**
@@ -387,8 +399,12 @@ type IFormSectionStatus = Record<string, {
387
399
  valid: boolean;
388
400
  }>;
389
401
 
390
- declare const checkCondition: (field: IFormField, formValues: IFormValues) => boolean;
391
- declare const calculateSectionStatus: (sections: IFormSection[], formValueState: IFormValueState) => IFormSectionStatus;
402
+ interface ICheckConditionResult {
403
+ pass: boolean;
404
+ result: IFieldConditionResult;
405
+ }
406
+ declare const checkCondition: (field: IFormField, formValues: IFormValues) => ICheckConditionResult;
407
+ declare const calculateSectionStatus: (sections: IFormSection[], formValues: IFormValues) => IFormSectionStatus;
392
408
 
393
409
  declare const validators_calculateSectionStatus: typeof calculateSectionStatus;
394
410
  declare const validators_checkCondition: typeof checkCondition;
@@ -439,28 +455,29 @@ interface IFieldCreator {
439
455
  className?: string;
440
456
  defaultClassName?: string;
441
457
  value?: IValueType | IValueType[];
458
+ disabled?: boolean;
442
459
  }
443
- declare const FieldCreator: ({ field, value, onChange, className, defaultClassName }: IFieldCreator) => ReactElement | null;
460
+ declare const FieldCreator: ({ field, value, onChange, className, disabled, defaultClassName }: IFieldCreator) => ReactElement | null;
444
461
 
445
- declare const BooleanInput: ({ field, onChange, value }: IFieldInputProps) => ReactElement;
462
+ declare const BooleanInput: ({ field, onChange, value, disabled }: IFieldInputProps) => ReactElement;
446
463
 
447
464
  declare const JSONInputLoader: (props: IFieldInputProps) => ReactElement;
448
465
 
449
- declare const NumberInput: ({ field, onChange, value }: IFieldInputProps) => ReactElement;
466
+ declare const NumberInput: ({ field, onChange, value, disabled }: IFieldInputProps) => ReactElement;
450
467
 
451
- declare const StringInput: ({ field, onChange, value }: IFieldInputProps) => ReactElement;
468
+ declare const StringInput: ({ field, onChange, value, disabled }: IFieldInputProps) => ReactElement;
452
469
 
453
- declare const LongStringInput: ({ field, onChange, value, className }: IFieldInputProps) => ReactElement;
470
+ declare const LongStringInput: ({ field, onChange, value, className, disabled }: IFieldInputProps) => ReactElement;
454
471
 
455
- declare const SingleSelectInput: ({ field, onChange, value }: IFieldInputProps) => ReactElement;
472
+ declare const SingleSelectInput: ({ field, onChange, value, disabled }: IFieldInputProps) => ReactElement;
456
473
 
457
474
  declare const GeoJSONInputLoader: (props: IFieldInputProps) => ReactElement;
458
475
 
459
- declare const DateTimeInput: ({ field, onChange, value }: IFieldInputProps) => ReactElement;
476
+ declare const DateTimeInput: ({ field, onChange, value, disabled }: IFieldInputProps) => ReactElement;
460
477
 
461
- declare const DateInput: ({ field, onChange, value }: IFieldInputProps) => ReactElement;
478
+ declare const DateInput: ({ field, onChange, value, disabled }: IFieldInputProps) => ReactElement;
462
479
 
463
- declare const TimeInput: ({ field, onChange, value }: IFieldInputProps) => ReactElement;
480
+ declare const TimeInput: ({ field, onChange, value, disabled }: IFieldInputProps) => ReactElement;
464
481
 
465
482
  declare const index_BooleanInput: typeof BooleanInput;
466
483
  declare const index_DateInput: typeof DateInput;
@@ -471,4 +488,4 @@ declare namespace index {
471
488
  export { index_BooleanInput as BooleanInput, index_DateInput as DateInput, index_DateTimeInput as DateTimeInput, GeoJSONInputLoader as GeoJSONInput, JSONInputLoader as JSONInput, LongStringInput as LongTextInput, index_NumberInput as NumberInput, SingleSelectInput as SelectInput, StringInput as TextInput, index_TimeInput as TimeInput };
472
489
  }
473
490
 
474
- export { FieldCreator, FormCreator, type IBooleanField, type ICheckboxField, type ICompositeValueType, type IConstantField, type IFieldInputProps, type IForm, type IFormField, type IFormFieldOverride, type IFormFieldPage, type IFormFieldProps, type IFormFieldSection, type IFormFieldType, type IFormInputComponent, type IFormOverride, type IFormSection, type IFormSectionOverride, type IFormSettings, type IFormValueState, type IFormValues, type IFormWithPages, type IGeoJSONField, type IGeometryField, type IJSONField, type INumberField, type IObjectField, type IObjectFormFieldOverride, type IObjectListField, type IOneOfField, type IPage, type IRadioField, type ISectionFormFieldType, type ISelectField, type IValidContainerField, type IValueChangeFn, type IValueType, type IWizardStep, index as Inputs, getters, manipulators, schemaToFormHelpers as schemToFormHelpers, schemaToFormHelpers as schemaToFormUtils, validators };
491
+ export { FieldCreator, FormCreator, type IBooleanField, type ICheckboxField, type ICompositeValueType, type IConstantField, type IFieldCondition, type IFieldConditionOperator, type IFieldConditionResult, type IFieldConditionsSet, type IFieldInputProps, type IForm, type IFormField, type IFormFieldOverride, type IFormFieldPage, type IFormFieldProps, type IFormFieldSection, type IFormFieldType, type IFormInputComponent, type IFormOverride, type IFormSection, type IFormSectionOverride, type IFormSettings, type IFormValueState, type IFormValues, type IFormWithPages, type IGeoJSONField, type IGeometryField, type IJSONField, type INumberField, type IObjectField, type IObjectFormFieldOverride, type IObjectListField, type IOneOfField, type IPage, type IRadioField, type ISectionFormFieldType, type ISelectField, type ITextField, type IValidContainerField, type IValueChangeFn, type IValueType, type IWizardStep, index as Inputs, getters, manipulators, schemaToFormHelpers as schemToFormHelpers, schemaToFormHelpers as schemaToFormUtils, validators };
@@ -1,4 +1,4 @@
1
- var validation = {};
1
+ var format = {};
2
2
 
3
- export { validation as __exports };
3
+ export { format as __exports };
4
4
  //# sourceMappingURL=index12.js.map
@@ -1,4 +1,4 @@
1
- var jsonSchemaTraverse = {exports: {}};
1
+ var fastUri = {exports: {}};
2
2
 
3
- export { jsonSchemaTraverse as __module };
3
+ export { fastUri as __module };
4
4
  //# sourceMappingURL=index13.js.map
@@ -1,4 +1,4 @@
1
- var fastUri = {exports: {}};
1
+ var jsonSchemaTraverse = {exports: {}};
2
2
 
3
- export { fastUri as __module };
3
+ export { jsonSchemaTraverse as __module };
4
4
  //# sourceMappingURL=index14.js.map
@@ -1,4 +1,4 @@
1
- var validate = {};
1
+ var codegen = {};
2
2
 
3
- export { validate as __exports };
3
+ export { codegen as __exports };
4
4
  //# sourceMappingURL=index4.js.map
@@ -1,4 +1,4 @@
1
- var codegen = {};
1
+ var validate = {};
2
2
 
3
- export { codegen as __exports };
3
+ export { validate as __exports };
4
4
  //# sourceMappingURL=index5.js.map
@@ -1,4 +1,4 @@
1
- var format = {};
1
+ var validation = {};
2
2
 
3
- export { format as __exports };
3
+ export { validation as __exports };
4
4
  //# sourceMappingURL=index9.js.map
@@ -1,4 +1,4 @@
1
- import { EventWithData, EventManager } from '../../axiom-ui-utilities/library/index.js';
1
+ import { EventWithData, EventManager } from '../node_modules/@axdspub/axiom-ui-utilities/library/index.js';
2
2
  import { createContext } from 'react';
3
3
 
4
4
  /******************************************************************************
@@ -1,6 +1,6 @@
1
1
  import global from '../../../../../_virtual/_polyfill-node.global.js';
2
2
  import browser$1 from '../../../../../_virtual/_polyfill-node.process.js';
3
- import { utils as index$1, EventManager, EventWithData } from '../../../axiom-ui-utilities/library/index.js';
3
+ import { utils as index$1, EventManager, EventWithData } from '../../node_modules/@axdspub/axiom-ui-utilities/library/index.js';
4
4
  import React__default, { useRef, useState, useEffect, createContext } from 'react';
5
5
  import omit from '../../../../lodash-es/omit.js';
6
6
  import pick from '../../../../lodash-es/pick.js';