@vc-shell/framework 1.0.315 → 1.0.317

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 (126) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/{azuread-ro_7UIeB.js → azuread-CzkVV9sc.js} +2 -2
  3. package/dist/{external-provider-DIJSQNDN.js → external-provider-CPsTBAfq.js} +1 -1
  4. package/dist/{external-provider.vue_vue_type_script_setup_true_lang-CA11mQRb.js → external-provider.vue_vue_type_script_setup_true_lang-CDpDapgk.js} +1 -1
  5. package/dist/external-providers-DXvj7iZI.js +4 -0
  6. package/dist/framework.js +1 -1
  7. package/dist/{index-CgGITXaa.js → index-BBFraQ5T.js} +1 -1
  8. package/dist/{index-C2i7kY9v.js → index-BH1SWYuT.js} +1 -1
  9. package/dist/{index-DxAmNnWQ.js → index-B_-PsIBV.js} +1 -1
  10. package/dist/{index-DaZ7PLVa.js → index-Bq1JV4YO.js} +1 -1
  11. package/dist/{index-UAIJpfpg.js → index-BuvUtKmW.js} +1 -1
  12. package/dist/{index-NSvb_rwM.js → index-ByZzd7pM.js} +1 -1
  13. package/dist/{index-Be5RmfZ4.js → index-CVz5_LNN.js} +1 -1
  14. package/dist/{index-kmtVz5uo.js → index-Cg9ANNT7.js} +3850 -3844
  15. package/dist/{index-_iCNHJpV.js → index-DBsWYmzw.js} +1 -1
  16. package/dist/{index-BEEZ0xdg.js → index-DT1yjDi6.js} +1 -1
  17. package/dist/{index-CnHCPuYe.js → index-DXj7lY_8.js} +1 -1
  18. package/dist/{index-DKRn9i7P.js → index-DZ9WtXgZ.js} +1 -1
  19. package/dist/{index-KTXdpPqB.js → index-DdHIKwAZ.js} +1 -1
  20. package/dist/{index-BieKeX7e.js → index-DgPCJvJl.js} +1 -1
  21. package/dist/{index-CbLjMkjt.js → index-Dn0aZ23J.js} +1 -1
  22. package/dist/{index-B4vEqgyq.js → index-VHgRkdCh.js} +1 -1
  23. package/dist/{index-BO1wI3tF.js → index-Z8V8A_9d.js} +1 -1
  24. package/dist/shared/modules/dynamic/components/SchemaRender.d.ts.map +1 -1
  25. package/dist/shared/modules/dynamic/components/fields/Button.d.ts +1 -0
  26. package/dist/shared/modules/dynamic/components/fields/Button.d.ts.map +1 -1
  27. package/dist/shared/modules/dynamic/components/fields/Card.d.ts +1 -0
  28. package/dist/shared/modules/dynamic/components/fields/Card.d.ts.map +1 -1
  29. package/dist/shared/modules/dynamic/components/fields/Checkbox.d.ts +1 -0
  30. package/dist/shared/modules/dynamic/components/fields/Checkbox.d.ts.map +1 -1
  31. package/dist/shared/modules/dynamic/components/fields/ContentField.d.ts +1 -0
  32. package/dist/shared/modules/dynamic/components/fields/ContentField.d.ts.map +1 -1
  33. package/dist/shared/modules/dynamic/components/fields/CustomComponent.d.ts +1 -0
  34. package/dist/shared/modules/dynamic/components/fields/CustomComponent.d.ts.map +1 -1
  35. package/dist/shared/modules/dynamic/components/fields/DynamicProperty.d.ts +1 -0
  36. package/dist/shared/modules/dynamic/components/fields/DynamicProperty.d.ts.map +1 -1
  37. package/dist/shared/modules/dynamic/components/fields/EditorField.d.ts +1 -0
  38. package/dist/shared/modules/dynamic/components/fields/EditorField.d.ts.map +1 -1
  39. package/dist/shared/modules/dynamic/components/fields/Fieldset.d.ts +1 -0
  40. package/dist/shared/modules/dynamic/components/fields/Fieldset.d.ts.map +1 -1
  41. package/dist/shared/modules/dynamic/components/fields/GalleryField.d.ts +1 -0
  42. package/dist/shared/modules/dynamic/components/fields/GalleryField.d.ts.map +1 -1
  43. package/dist/shared/modules/dynamic/components/fields/ImageField.d.ts +1 -0
  44. package/dist/shared/modules/dynamic/components/fields/ImageField.d.ts.map +1 -1
  45. package/dist/shared/modules/dynamic/components/fields/InputCurrency.d.ts +1 -0
  46. package/dist/shared/modules/dynamic/components/fields/InputCurrency.d.ts.map +1 -1
  47. package/dist/shared/modules/dynamic/components/fields/InputField.d.ts +1 -0
  48. package/dist/shared/modules/dynamic/components/fields/InputField.d.ts.map +1 -1
  49. package/dist/shared/modules/dynamic/components/fields/MultivalueField.d.ts +1 -0
  50. package/dist/shared/modules/dynamic/components/fields/MultivalueField.d.ts.map +1 -1
  51. package/dist/shared/modules/dynamic/components/fields/RadioButtonGroup.d.ts +1 -0
  52. package/dist/shared/modules/dynamic/components/fields/RadioButtonGroup.d.ts.map +1 -1
  53. package/dist/shared/modules/dynamic/components/fields/RatingField.d.ts +1 -0
  54. package/dist/shared/modules/dynamic/components/fields/RatingField.d.ts.map +1 -1
  55. package/dist/shared/modules/dynamic/components/fields/SelectField.d.ts +1 -0
  56. package/dist/shared/modules/dynamic/components/fields/SelectField.d.ts.map +1 -1
  57. package/dist/shared/modules/dynamic/components/fields/StatusField.d.ts +1 -0
  58. package/dist/shared/modules/dynamic/components/fields/StatusField.d.ts.map +1 -1
  59. package/dist/shared/modules/dynamic/components/fields/SwitchField.d.ts +1 -0
  60. package/dist/shared/modules/dynamic/components/fields/SwitchField.d.ts.map +1 -1
  61. package/dist/shared/modules/dynamic/components/fields/Table.d.ts +1 -0
  62. package/dist/shared/modules/dynamic/components/fields/Table.d.ts.map +1 -1
  63. package/dist/shared/modules/dynamic/components/fields/TextareaField.d.ts +1 -0
  64. package/dist/shared/modules/dynamic/components/fields/TextareaField.d.ts.map +1 -1
  65. package/dist/shared/modules/dynamic/components/fields/VideoField.d.ts +1 -0
  66. package/dist/shared/modules/dynamic/components/fields/VideoField.d.ts.map +1 -1
  67. package/dist/shared/modules/dynamic/components/fields/props.d.ts +1 -0
  68. package/dist/shared/modules/dynamic/components/fields/props.d.ts.map +1 -1
  69. package/dist/shared/modules/dynamic/components/fields/storybook/Button.stories.d.ts +3 -0
  70. package/dist/shared/modules/dynamic/components/fields/storybook/Button.stories.d.ts.map +1 -1
  71. package/dist/shared/modules/dynamic/components/fields/storybook/Card.stories.d.ts +3 -0
  72. package/dist/shared/modules/dynamic/components/fields/storybook/Card.stories.d.ts.map +1 -1
  73. package/dist/shared/modules/dynamic/components/fields/storybook/Checkbox.stories.d.ts +3 -0
  74. package/dist/shared/modules/dynamic/components/fields/storybook/Checkbox.stories.d.ts.map +1 -1
  75. package/dist/shared/modules/dynamic/components/fields/storybook/ContentField.stories.d.ts +3 -0
  76. package/dist/shared/modules/dynamic/components/fields/storybook/ContentField.stories.d.ts.map +1 -1
  77. package/dist/shared/modules/dynamic/components/fields/storybook/EditorField.stories.d.ts +3 -0
  78. package/dist/shared/modules/dynamic/components/fields/storybook/EditorField.stories.d.ts.map +1 -1
  79. package/dist/shared/modules/dynamic/components/fields/storybook/Fieldset.stories.d.ts +3 -0
  80. package/dist/shared/modules/dynamic/components/fields/storybook/Fieldset.stories.d.ts.map +1 -1
  81. package/dist/shared/modules/dynamic/components/fields/storybook/GalleryField.stories.d.ts +3 -0
  82. package/dist/shared/modules/dynamic/components/fields/storybook/GalleryField.stories.d.ts.map +1 -1
  83. package/dist/shared/modules/dynamic/components/fields/storybook/ImageField.stories.d.ts +3 -0
  84. package/dist/shared/modules/dynamic/components/fields/storybook/ImageField.stories.d.ts.map +1 -1
  85. package/dist/shared/modules/dynamic/components/fields/storybook/InputCurrency.stories.d.ts +3 -0
  86. package/dist/shared/modules/dynamic/components/fields/storybook/InputCurrency.stories.d.ts.map +1 -1
  87. package/dist/shared/modules/dynamic/components/fields/storybook/InputField.stories.d.ts +3 -0
  88. package/dist/shared/modules/dynamic/components/fields/storybook/InputField.stories.d.ts.map +1 -1
  89. package/dist/shared/modules/dynamic/components/fields/storybook/MultivalueField.stories.d.ts +3 -0
  90. package/dist/shared/modules/dynamic/components/fields/storybook/MultivalueField.stories.d.ts.map +1 -1
  91. package/dist/shared/modules/dynamic/components/fields/storybook/RadioButtonGroup.stories.d.ts +3 -0
  92. package/dist/shared/modules/dynamic/components/fields/storybook/RadioButtonGroup.stories.d.ts.map +1 -1
  93. package/dist/shared/modules/dynamic/components/fields/storybook/RatingField.stories.d.ts +3 -0
  94. package/dist/shared/modules/dynamic/components/fields/storybook/RatingField.stories.d.ts.map +1 -1
  95. package/dist/shared/modules/dynamic/components/fields/storybook/SelectField.stories.d.ts +3 -0
  96. package/dist/shared/modules/dynamic/components/fields/storybook/SelectField.stories.d.ts.map +1 -1
  97. package/dist/shared/modules/dynamic/components/fields/storybook/StatusField.stories.d.ts +3 -0
  98. package/dist/shared/modules/dynamic/components/fields/storybook/StatusField.stories.d.ts.map +1 -1
  99. package/dist/shared/modules/dynamic/components/fields/storybook/TextareaField.stories.d.ts +3 -0
  100. package/dist/shared/modules/dynamic/components/fields/storybook/TextareaField.stories.d.ts.map +1 -1
  101. package/dist/shared/modules/dynamic/components/fields/storybook/VideoField.stories.d.ts +3 -0
  102. package/dist/shared/modules/dynamic/components/fields/storybook/VideoField.stories.d.ts.map +1 -1
  103. package/dist/shared/modules/dynamic/components/fields/storybook/pages/DynamicRender.d.ts +3 -0
  104. package/dist/shared/modules/dynamic/components/fields/storybook/pages/DynamicRender.d.ts.map +1 -1
  105. package/dist/shared/modules/dynamic/factories/types/index.d.ts +1 -0
  106. package/dist/shared/modules/dynamic/factories/types/index.d.ts.map +1 -1
  107. package/dist/shared/modules/dynamic/helpers/methodHandler.d.ts +4 -0
  108. package/dist/shared/modules/dynamic/helpers/methodHandler.d.ts.map +1 -0
  109. package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts +2 -0
  110. package/dist/shared/modules/dynamic/pages/dynamic-blade-form.vue.d.ts.map +1 -1
  111. package/dist/shared/modules/dynamic/types/index.d.ts +7 -0
  112. package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
  113. package/dist/tsconfig.tsbuildinfo +1 -1
  114. package/dist/ui/components/molecules/vc-multivalue/vc-multivalue.vue.d.ts.map +1 -1
  115. package/package.json +4 -4
  116. package/shared/modules/dynamic/components/SchemaRender.ts +9 -5
  117. package/shared/modules/dynamic/components/fields/DynamicProperty.ts +3 -0
  118. package/shared/modules/dynamic/components/fields/InputField.ts +9 -1
  119. package/shared/modules/dynamic/factories/types/index.ts +1 -0
  120. package/shared/modules/dynamic/helpers/{visibilityHandler.ts → methodHandler.ts} +2 -2
  121. package/shared/modules/dynamic/helpers/nodeBuilder.ts +3 -3
  122. package/shared/modules/dynamic/types/index.ts +7 -0
  123. package/ui/components/molecules/vc-multivalue/vc-multivalue.vue +7 -0
  124. package/dist/external-providers-CvCHkuwZ.js +0 -4
  125. package/dist/shared/modules/dynamic/helpers/visibilityHandler.d.ts +0 -4
  126. package/dist/shared/modules/dynamic/helpers/visibilityHandler.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"vc-multivalue.vue.d.ts","sourceRoot":"","sources":["../../../../../ui/components/molecules/vc-multivalue/vc-multivalue.vue.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,KAAK,CAAC,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,EAAE,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,KAAK,CAAC,CAAC;IACtB,CAAC,KAAK,EAAE,oBAAoB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AAC,KAAG,IAAI;;;;;;;;;;;;;;;;;;;;;;;;oBAAzC,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;;cApnBuB,GAAG;;;;oBAC8C,MAAM,IAAI;cAAO,GAAG;cAC9F,IAAI;eACH,IAAI;;;;cAHoB,GAAG;;;;oBAC8C,MAAM,IAAI;cAAO,GAAG;cAC9F,IAAI;eACH,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAgnBG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;eAClD,GAAG;;;;kBApnBuB,GAAG;;;;wBAC8C,MAAM,IAAI;kBAAO,GAAG;kBAC9F,IAAI;mBACH,IAAI;;;;kBAHoB,GAAG;;;;wBAC8C,MAAM,IAAI;kBAAO,GAAG;kBAC9F,IAAI;mBACH,IAAI;;;;;AA/Bb,wBAqpB2E;AAQ3E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vc-shell/framework",
3
- "version": "1.0.315",
3
+ "version": "1.0.317",
4
4
  "type": "module",
5
5
  "main": "./dist/framework.js",
6
6
  "types": "./dist/index.d.ts",
@@ -59,9 +59,9 @@
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/dompurify": "^3.0.5",
62
- "@vc-shell/api-client-generator": "^1.0.315",
63
- "@vc-shell/config-generator": "^1.0.315",
64
- "@vc-shell/ts-config": "^1.0.315",
62
+ "@vc-shell/api-client-generator": "^1.0.317",
63
+ "@vc-shell/config-generator": "^1.0.317",
64
+ "@vc-shell/ts-config": "^1.0.317",
65
65
  "@vitejs/plugin-vue": "5.0.3",
66
66
  "cypress-signalr-mock": "^1.5.0",
67
67
  "sass": "^1.69.6",
@@ -15,7 +15,7 @@ import { ControlSchema } from "../types";
15
15
  import * as _ from "lodash-es";
16
16
  import { DetailsBladeContext } from "../factories/types";
17
17
  import { nodeBuilder } from "../helpers/nodeBuilder";
18
- import { visibilityHandler } from "../helpers/visibilityHandler";
18
+ import { methodHandler } from "../helpers/methodHandler";
19
19
  import { toValue } from "@vueuse/core";
20
20
  import { safeIn } from "../helpers/safeIn";
21
21
  import { unrefNested } from "../helpers/unrefNested";
@@ -53,14 +53,18 @@ export default defineComponent({
53
53
 
54
54
  watch(
55
55
  () => props.modelValue,
56
- (newVal) => {
57
- Object.assign(internalFormData, toRefs(newVal));
56
+ (newVal): void => {
57
+ if (!_.isEqual(internalFormData, toRefs(newVal))) {
58
+ Object.assign(internalFormData, toRefs(newVal));
59
+ }
58
60
  },
59
61
  { deep: true, immediate: true },
60
62
  );
61
63
 
62
64
  function updateFormData(newVal: ToRefs<unknown>) {
63
- ctx.emit("update:modelValue", unrefNested(newVal));
65
+ if (!_.isEqual(toRefs(newVal), internalFormData)) {
66
+ ctx.emit("update:modelValue", unrefNested(newVal));
67
+ }
64
68
  }
65
69
 
66
70
  return () =>
@@ -75,7 +79,7 @@ export default defineComponent({
75
79
  if (
76
80
  safeIn("visibility", field) &&
77
81
  field.visibility?.method &&
78
- !visibilityHandler(toValue(props.context?.scope)?.[field.visibility.method], props.context, field)
82
+ !methodHandler(toValue(props.context?.scope)?.[field.visibility.method], props.context, field)
79
83
  ) {
80
84
  return arr;
81
85
  }
@@ -71,6 +71,8 @@ export default {
71
71
  exclude: props.element?.exclude,
72
72
  });
73
73
 
74
+ const initialProps = _.cloneDeep(dynamicProps.value);
75
+
74
76
  const properties: UnwrapNestedRefs<IDynamicProperties[]> = reactiveComputed(() => {
75
77
  return (dynamicProps.value || [])?.map((prop) =>
76
78
  DynamicProperties({
@@ -99,6 +101,7 @@ export default {
99
101
  value: args.value,
100
102
  dictionary: args.dictionary,
101
103
  locale: args.locale,
104
+ initialProp: _.cloneDeep(initialProps?.find((x) => x.id === prop.id)),
102
105
  });
103
106
  if (props.fieldContext) {
104
107
  setModel({ context: props.fieldContext, property: props.element.property, value: internalModel.value });
@@ -1,10 +1,11 @@
1
- import { ExtractPropTypes, h, VNode, Component } from "vue";
1
+ import { ExtractPropTypes, h, VNode, Component, toValue } from "vue";
2
2
  import { InputField } from "../factories";
3
3
  import componentProps from "./props";
4
4
  import ValidationField from "./ValidationField";
5
5
  import { InputSchema, ControlSchema } from "../../types";
6
6
  import { nodeBuilder } from "../../helpers/nodeBuilder";
7
7
  import { unrefNested } from "../../helpers/unrefNested";
8
+ import { methodHandler } from "../../helpers/methodHandler";
8
9
 
9
10
  const slotsMap = {
10
11
  append: "append",
@@ -27,6 +28,13 @@ export default {
27
28
  clearable: props.element.clearable || false,
28
29
  maxlength: props.element.maxlength,
29
30
  datePickerOptions: props.element.datePickerOptions,
31
+ loading: props.element.loading?.method
32
+ ? methodHandler(
33
+ toValue(props.bladeContext?.scope)?.[props.element.loading?.method],
34
+ props.fieldContext,
35
+ props.element,
36
+ )
37
+ : false,
30
38
  },
31
39
  unrefNested(props.baseProps),
32
40
  {
@@ -167,6 +167,7 @@ export interface DetailsBaseBladeScope<Item = Record<string, any>> extends BaseB
167
167
  value: string | Record<string, any>[];
168
168
  dictionary?: Record<string, any>[];
169
169
  locale?: string;
170
+ initialProp?: Record<string, any>;
170
171
  }) => void;
171
172
  };
172
173
  assetsHandler?: {
@@ -1,8 +1,8 @@
1
- import { ControlSchema } from "./../types/index";
1
+ import { ControlSchema } from "../types/index";
2
2
  /* eslint-disable @typescript-eslint/no-explicit-any */
3
3
  import { ComputedRef, toValue } from "vue";
4
4
 
5
- export const visibilityHandler = (
5
+ export const methodHandler = (
6
6
  visibility:
7
7
  | ComputedRef<boolean | undefined>
8
8
  | ((schema: ControlSchema, fieldContext: Record<string, any> | undefined) => boolean)
@@ -9,7 +9,7 @@ import { unwrapInterpolation } from "./unwrapInterpolation";
9
9
  import { DetailsBladeContext } from "../factories";
10
10
  import { safeIn } from "./safeIn";
11
11
  import { i18n } from "./../../../../core/plugins/i18n";
12
- import { visibilityHandler } from "./visibilityHandler";
12
+ import { methodHandler } from "./methodHandler";
13
13
  import { toRefs } from "@vueuse/core";
14
14
  import { unrefNested } from "./unrefNested";
15
15
  import { usePermissions } from "../../../../core/composables";
@@ -176,7 +176,7 @@ function nodeBuilder<
176
176
  if (
177
177
  safeIn("visibility", fieldItem) &&
178
178
  fieldItem.visibility?.method &&
179
- !visibilityHandler(bladeContext.scope?.[fieldItem.visibility?.method], modelItem, fieldItem)
179
+ !methodHandler(bladeContext.scope?.[fieldItem.visibility?.method], modelItem, fieldItem)
180
180
  ) {
181
181
  return arr;
182
182
  }
@@ -205,7 +205,7 @@ function nodeBuilder<
205
205
  if (
206
206
  safeIn("visibility", field) &&
207
207
  field.visibility?.method &&
208
- !visibilityHandler(bladeContext.scope?.[field.visibility?.method], internalContext, field)
208
+ !methodHandler(bladeContext.scope?.[field.visibility?.method], internalContext, field)
209
209
  ) {
210
210
  return arr;
211
211
  }
@@ -495,6 +495,13 @@ export interface InputSchema extends SchemaBase {
495
495
  * Datepicker options.
496
496
  */
497
497
  datePickerOptions?: ComponentProps<typeof VcInput>["datePickerOptions"];
498
+ /**
499
+ * Whether the input is in loading state or not.
500
+ * @type {boolean}
501
+ */
502
+ loading?: {
503
+ method: string;
504
+ };
498
505
  }
499
506
 
500
507
  /**
@@ -278,6 +278,13 @@ const internalTypeComputed = computed({
278
278
  function onKeyDown(e: KeyboardEvent) {
279
279
  const allowedKeys = ["Backspace", "Delete", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Enter"];
280
280
  const keypressed = e.key;
281
+
282
+ if (props.type === "number" || props.type === "integer") {
283
+ if (keypressed === "-" || keypressed === "e" || keypressed === "+") {
284
+ e.preventDefault();
285
+ }
286
+ }
287
+
281
288
  if (props.type === "integer") {
282
289
  if (!/^\d$/.test(keypressed) && !allowedKeys.includes(keypressed)) {
283
290
  e.preventDefault();
@@ -1,4 +0,0 @@
1
- import { b as f } from "./index-kmtVz5uo.js";
2
- export {
3
- f as default
4
- };
@@ -1,4 +0,0 @@
1
- import { ControlSchema } from "./../types/index";
2
- import { ComputedRef } from "vue";
3
- export declare const visibilityHandler: (visibility: ComputedRef<boolean | undefined> | ((schema: ControlSchema, fieldContext: Record<string, any> | undefined) => boolean) | undefined, fieldContext: Record<string, any> | undefined, schema: ControlSchema) => boolean | undefined;
4
- //# sourceMappingURL=visibilityHandler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"visibilityHandler.d.ts","sourceRoot":"","sources":["../../../../../shared/modules/dynamic/helpers/visibilityHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAW,MAAM,KAAK,CAAC;AAE3C,eAAO,MAAM,iBAAiB,4DAGd,aAAa,gBAAgB,OAAO,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,KAAK,OAAO,6BAExE,OAAO,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,UACrC,aAAa,wBAWtB,CAAC"}