@flyanra/vue-core 0.3.0 → 1.0.0

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/dist/types/components/basic/fly-button/FlyButton.types.d.ts +2 -3
  2. package/dist/types/components/basic/typography/FlyCollapseTitleRenderer.vue.d.ts +16 -0
  3. package/dist/types/components/feedback/tooltip/FlyInfoTooltip.vue.d.ts +36 -0
  4. package/dist/types/components/feedback/tooltip/FlyTooltip.vue.d.ts +1 -0
  5. package/dist/types/components/form/form.utils.d.ts +11 -0
  6. package/dist/types/components/form/index.d.ts +5 -0
  7. package/dist/types/components/form/input-renderers/boolean/FlyBoolean.types.d.ts +14 -0
  8. package/dist/types/components/form/input-renderers/boolean/FlyBoolean.vue.d.ts +15 -0
  9. package/dist/types/components/form/input-renderers/date-time/FlyDateTime.types.d.ts +20 -0
  10. package/dist/types/components/form/input-renderers/date-time/FlyDateTime.vue.d.ts +19 -0
  11. package/dist/types/components/form/input-renderers/form-item-renderer/FlyFormItemRenderer.vue.d.ts +19 -0
  12. package/dist/types/components/form/input-renderers/form-item-renderer/index.d.ts +3 -0
  13. package/dist/types/components/form/input-renderers/form-schema-renderer/FlyFormSchemaRenderer.types.d.ts +2 -0
  14. package/dist/types/components/form/input-renderers/form-schema-renderer/FlyFormSchemaRenderer.utils.d.ts +21 -0
  15. package/dist/types/components/form/input-renderers/form-schema-renderer/FlyFormSchemaRenderer.vue.d.ts +17 -0
  16. package/dist/types/components/form/input-renderers/form-schema-renderer/UseFormSchemaRenderer.d.ts +25 -0
  17. package/dist/types/components/form/input-renderers/form-schema.types.d.ts +77 -0
  18. package/dist/types/components/form/input-renderers/input-renderer/FlyInputRenderer.vue.d.ts +18 -0
  19. package/dist/types/components/form/input-renderers/input-renderer/index.d.ts +3 -0
  20. package/dist/types/components/form/input-renderers/input-renderer.types.d.ts +30 -0
  21. package/dist/types/components/form/input-renderers/input-renderer.utils.d.ts +2 -0
  22. package/dist/types/components/form/input-renderers/number/FlyNumber.types.d.ts +13 -0
  23. package/dist/types/components/form/input-renderers/number/FlyNumber.utils.d.ts +1 -0
  24. package/dist/types/components/form/input-renderers/number/FlyNumber.vue.d.ts +19 -0
  25. package/dist/types/components/form/input-renderers/regional-tenant-form-renderer/FlyRegionalTenantFormRenderer.types.d.ts +13 -0
  26. package/dist/types/components/form/input-renderers/regional-tenant-form-renderer/FlyRegionalTenantFormRenderer.vue.d.ts +20 -0
  27. package/dist/types/components/form/input-renderers/select/FlySelect.types.d.ts +22 -0
  28. package/dist/types/components/form/input-renderers/select/FlySelect.utils.d.ts +2 -0
  29. package/dist/types/components/form/input-renderers/select/FlySelect.vue.d.ts +19 -0
  30. package/dist/types/components/form/input-renderers/text/FlyText.types.d.ts +18 -0
  31. package/dist/types/components/form/input-renderers/text/FlyText.vue.d.ts +19 -0
  32. package/dist/types/components/form/input-renderers/value-unit/FlyValueUnit.types.d.ts +23 -0
  33. package/dist/types/components/form/input-renderers/value-unit/FlyValueUnit.vue.d.ts +19 -0
  34. package/dist/types/components/form/input-validators.d.ts +12 -0
  35. package/dist/types/components/general/fly-icon-v2/FlyIconV2.types.d.ts +5 -0
  36. package/dist/types/components/general/fly-icon-v2/FlyIconV2.vue.d.ts +4 -0
  37. package/dist/types/components/general/fly-icon-v2/index.d.ts +4 -0
  38. package/dist/types/components/general/index.d.ts +2 -0
  39. package/dist/types/components/index.d.ts +1 -4
  40. package/dist/types/components/navigation/menu/fly-mini-sidebar/FlyMiniSidebar.types.d.ts +2 -2
  41. package/dist/types/components/navigation/menu/fly-sidebar/FlySidebar.types.d.ts +2 -2
  42. package/dist/types/composables/UseLocaleInjector.d.ts +8 -0
  43. package/dist/types/composables/index.d.ts +1 -0
  44. package/dist/types/utils/pure-functions.d.ts +1 -0
  45. package/dist/types/utils/validators.d.ts +8 -0
  46. package/package.json +26 -8
  47. package/src/components/basic/fly-button/FlyButton.types.ts +2 -3
  48. package/src/components/basic/fly-button/FlyButton.vue +4 -6
  49. package/src/components/basic/typography/FlyCollapseTitleRenderer.vue +46 -0
  50. package/src/components/feedback/tooltip/FlyInfoTooltip.vue +49 -0
  51. package/src/components/feedback/tooltip/FlyTooltip.element.scss +1 -1
  52. package/src/components/feedback/tooltip/FlyTooltip.vue +1 -0
  53. package/src/components/form/form.utils.ts +72 -0
  54. package/src/components/form/index.ts +6 -0
  55. package/src/components/form/input-renderers/boolean/FlyBoolean.scss +1 -0
  56. package/src/components/form/input-renderers/boolean/FlyBoolean.types.ts +16 -0
  57. package/src/components/form/input-renderers/boolean/FlyBoolean.vue +48 -0
  58. package/src/components/form/input-renderers/date-time/FlyDateTime.scss +1 -0
  59. package/src/components/form/input-renderers/date-time/FlyDateTime.types.ts +21 -0
  60. package/src/components/form/input-renderers/date-time/FlyDateTime.vue +85 -0
  61. package/src/components/form/input-renderers/form-item-renderer/FlyFormItemRenderer.scss +4 -0
  62. package/src/components/form/input-renderers/form-item-renderer/FlyFormItemRenderer.vue +48 -0
  63. package/src/components/form/input-renderers/form-item-renderer/index.ts +4 -0
  64. package/src/components/form/input-renderers/form-schema-renderer/FlyFormSchemaRenderer.types.ts +3 -0
  65. package/src/components/form/input-renderers/form-schema-renderer/FlyFormSchemaRenderer.utils.ts +221 -0
  66. package/src/components/form/input-renderers/form-schema-renderer/FlyFormSchemaRenderer.vue +75 -0
  67. package/src/components/form/input-renderers/form-schema-renderer/UseFormSchemaRenderer.ts +97 -0
  68. package/src/components/form/input-renderers/form-schema.types.ts +95 -0
  69. package/src/components/form/input-renderers/input-renderer/FlyInputRenderer.vue +49 -0
  70. package/src/components/form/input-renderers/input-renderer/index.ts +4 -0
  71. package/src/components/form/input-renderers/input-renderer.types.ts +49 -0
  72. package/src/components/form/input-renderers/input-renderer.utils.ts +18 -0
  73. package/src/components/form/input-renderers/number/FlyNumber.scss +1 -0
  74. package/src/components/form/input-renderers/number/FlyNumber.types.ts +13 -0
  75. package/src/components/form/input-renderers/number/FlyNumber.utils.ts +6 -0
  76. package/src/components/form/input-renderers/number/FlyNumber.vue +64 -0
  77. package/src/components/form/input-renderers/regional-tenant-form-renderer/FlyRegionalTenantFormRenderer.types.ts +15 -0
  78. package/src/components/form/input-renderers/regional-tenant-form-renderer/FlyRegionalTenantFormRenderer.vue +99 -0
  79. package/src/components/form/input-renderers/select/FlySelect.scss +1 -0
  80. package/src/components/form/input-renderers/select/FlySelect.types.ts +25 -0
  81. package/src/components/form/input-renderers/select/FlySelect.utils.ts +37 -0
  82. package/src/components/form/input-renderers/select/FlySelect.vue +48 -0
  83. package/src/components/form/input-renderers/text/FlyText.scss +1 -0
  84. package/src/components/form/input-renderers/text/FlyText.types.ts +20 -0
  85. package/src/components/form/input-renderers/text/FlyText.vue +70 -0
  86. package/src/components/form/input-renderers/value-unit/FlyValueUnit.scss +2 -0
  87. package/src/components/form/input-renderers/value-unit/FlyValueUnit.types.ts +28 -0
  88. package/src/components/form/input-renderers/value-unit/FlyValueUnit.vue +102 -0
  89. package/src/components/form/input-validators.ts +99 -0
  90. package/src/components/general/fly-icon-v2/FlyIconV2.types.ts +6 -0
  91. package/src/components/general/fly-icon-v2/FlyIconV2.vue +17 -0
  92. package/src/components/general/fly-icon-v2/index.ts +6 -0
  93. package/src/components/general/index.ts +3 -0
  94. package/src/components/index.ts +2 -6
  95. package/src/components/navigation/menu/fly-mini-sidebar/FlyMiniSidebar.types.ts +2 -2
  96. package/src/components/navigation/menu/fly-mini-sidebar/FlyMiniSidebarItem.vue +2 -2
  97. package/src/components/navigation/menu/fly-sidebar/FlySidebar.types.ts +2 -2
  98. package/src/components/navigation/menu/fly-sidebar/FlySidebar.vue +5 -4
  99. package/src/components/navigation/menu/fly-sidebar/FlySidebarNode.vue +3 -3
  100. package/src/styles/element/mixins/collapse.scss +2 -2
  101. package/src/styles/element/overrides/date-time.scss +11 -0
  102. package/src/styles/element/overrides/form.scss +26 -12
  103. package/src/styles/element/overrides/message-box.scss +2 -0
  104. package/src/styles/element/overrides/radio.scss +2 -0
  105. package/src/styles/element/overrides/select.scss +9 -0
  106. package/dist/types/components/AppButton/AppButton.types.d.ts +0 -8
  107. package/dist/types/components/AppButton/AppButton.vue.d.ts +0 -20
  108. package/dist/types/components/AppButton/index.d.ts +0 -4
  109. package/dist/types/components/AppCard/AppCard.types.d.ts +0 -5
  110. package/dist/types/components/AppCard/AppCard.vue.d.ts +0 -17
  111. package/dist/types/components/AppCard/index.d.ts +0 -4
  112. package/src/components/AppButton/AppButton.element.scss +0 -2
  113. package/src/components/AppButton/AppButton.types.ts +0 -10
  114. package/src/components/AppButton/AppButton.vue +0 -65
  115. package/src/components/AppButton/index.ts +0 -6
  116. package/src/components/AppCard/AppCard.types.ts +0 -5
  117. package/src/components/AppCard/AppCard.vue +0 -58
  118. package/src/components/AppCard/index.ts +0 -6
@@ -1,5 +1,5 @@
1
1
  import type { ButtonType, ElButton, UseTooltipProps } from 'element-plus';
2
- import type { T_FlyIconTypes } from '../../general/fly-icon/FlyIcon.types';
2
+ import type { T_FlyIconV2Props } from '../../general';
3
3
  export type FlyButtonIconPosition = 'left' | 'right';
4
4
  export type FlyButtonSizes = InstanceType<typeof ElButton>['$props']['size'];
5
5
  export type FlyButtonTypes = ButtonType;
@@ -12,9 +12,8 @@ export type FlyButtonProps = {
12
12
  */
13
13
  clipRound?: boolean;
14
14
  full?: boolean;
15
- icon?: string | object;
15
+ icon?: T_FlyIconV2Props['icon'];
16
16
  iconPosition?: FlyButtonIconPosition;
17
- iconType?: T_FlyIconTypes;
18
17
  imageUrl?: string;
19
18
  label?: string;
20
19
  size?: FlyButtonSizes;
@@ -0,0 +1,16 @@
1
+ type __VLS_Props = {
2
+ title: string;
3
+ };
4
+ declare var __VLS_1: {};
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_1) => any;
7
+ };
8
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
9
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
12
+ type __VLS_WithSlots<T, S> = T & {
13
+ new (): {
14
+ $slots: S;
15
+ };
16
+ };
@@ -0,0 +1,36 @@
1
+ declare var __VLS_7: {}, __VLS_15: {};
2
+ type __VLS_Slots = {} & {
3
+ trigger?: (props: typeof __VLS_7) => any;
4
+ } & {
5
+ default?: (props: typeof __VLS_15) => any;
6
+ };
7
+ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
8
+ content: {
9
+ type: StringConstructor;
10
+ default: string;
11
+ };
12
+ html: {
13
+ type: BooleanConstructor;
14
+ default: boolean;
15
+ };
16
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
17
+ content: {
18
+ type: StringConstructor;
19
+ default: string;
20
+ };
21
+ html: {
22
+ type: BooleanConstructor;
23
+ default: boolean;
24
+ };
25
+ }>> & Readonly<{}>, {
26
+ html: boolean;
27
+ content: string;
28
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
29
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
30
+ declare const _default: typeof __VLS_export;
31
+ export default _default;
32
+ type __VLS_WithSlots<T, S> = T & {
33
+ new (): {
34
+ $slots: S;
35
+ };
36
+ };
@@ -1,3 +1,4 @@
1
+ import './FlyTooltip.element.scss';
1
2
  import type { T_FlyTooltipProps } from './FlyTooltip.types';
2
3
  declare var __VLS_8: {}, __VLS_11: {};
3
4
  type __VLS_Slots = {} & {
@@ -0,0 +1,11 @@
1
+ import type { FormInstance } from 'element-plus';
2
+ export type ValidateFieldsError = {
3
+ [K: string]: {
4
+ message?: string;
5
+ }[];
6
+ };
7
+ /**
8
+ * @returns Translated error message based on active locale
9
+ */
10
+ export declare function formFieldErrorMessageFormatter(errors: ValidateFieldsError): string;
11
+ export declare function genericFormValidator(formRef: FormInstance): Promise<true>;
@@ -0,0 +1,5 @@
1
+ export * from './input-renderers/form-item-renderer';
2
+ export * from './input-renderers/input-renderer';
3
+ export type { T_InputRendererBase } from './input-renderers/input-renderer.types';
4
+ export * from './input-validators';
5
+ export * from './form.utils';
@@ -0,0 +1,14 @@
1
+ export type T_InputBooleanValues = string | number | boolean | undefined;
2
+ export type T_InputBooleanBase = T_InputBoolean & {
3
+ type: 'boolean';
4
+ placeholder?: string;
5
+ };
6
+ export type T_InputBoolean = {
7
+ /**
8
+ * Attrs are passed directly to the input element as props
9
+ */
10
+ attrs?: {
11
+ activeText?: string;
12
+ inactiveText?: string;
13
+ };
14
+ };
@@ -0,0 +1,15 @@
1
+ import './FlyBoolean.scss';
2
+ import type { T_InputBoolean, T_InputBooleanValues } from './FlyBoolean.types';
3
+ type __VLS_Props = {
4
+ modelValue?: T_InputBooleanValues;
5
+ input?: T_InputBoolean;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
+ "update:modelValue": (v: T_InputBooleanValues) => any;
9
+ change: (v: T_InputBooleanValues) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ "onUpdate:modelValue"?: ((v: T_InputBooleanValues) => any) | undefined;
12
+ onChange?: ((v: T_InputBooleanValues) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
@@ -0,0 +1,20 @@
1
+ export type T_DateTimeRawValue = Date | [Date, Date] | undefined;
2
+ export type T_DateTimeValues = string | string[] | undefined;
3
+ export type T_DateInputTypes = 'date' | 'dateTime' | 'dateRange' | 'dateTimeRange';
4
+ export type T_InputDateTimeBase = T_InputDateTime & {
5
+ type: 'dateTime';
6
+ };
7
+ export type T_InputDateTime = {
8
+ placeholder?: string;
9
+ startPlaceholder?: string;
10
+ endPlaceholder?: string;
11
+ /**
12
+ * Attrs are passed directly to the input element as props
13
+ */
14
+ attrs?: {
15
+ [K: string]: unknown;
16
+ };
17
+ config?: {
18
+ inputType?: T_DateInputTypes;
19
+ };
20
+ };
@@ -0,0 +1,19 @@
1
+ import './FlyDateTime.scss';
2
+ import type { T_DateTimeValues, T_InputDateTime } from './FlyDateTime.types';
3
+ type __VLS_Props = {
4
+ modelValue?: T_DateTimeValues;
5
+ input?: T_InputDateTime;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
+ focus: () => any;
9
+ "update:modelValue": (v: T_DateTimeValues) => any;
10
+ change: (v: T_DateTimeValues) => any;
11
+ blur: () => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ onFocus?: (() => any) | undefined;
14
+ "onUpdate:modelValue"?: ((v: T_DateTimeValues) => any) | undefined;
15
+ onChange?: ((v: T_DateTimeValues) => any) | undefined;
16
+ onBlur?: (() => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,19 @@
1
+ import type { T_InputRendererBase } from '../input-renderer.types';
2
+ import './FlyFormItemRenderer.scss';
3
+ type __VLS_Props = {
4
+ modelValue: unknown;
5
+ input: T_InputRendererBase;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
+ focus: () => any;
9
+ "update:modelValue": (value: unknown) => any;
10
+ change: (value: unknown) => any;
11
+ blur: () => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ onFocus?: (() => any) | undefined;
14
+ "onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
15
+ onChange?: ((value: unknown) => any) | undefined;
16
+ onBlur?: (() => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import FlyFormItemRenderer from './FlyFormItemRenderer.vue';
2
+ export default FlyFormItemRenderer;
3
+ export { FlyFormItemRenderer };
@@ -0,0 +1,2 @@
1
+ import type FlyFormSchemaRenderer from './FlyFormSchemaRenderer.vue';
2
+ export type T_FlyFormSchemaRendererInstance = InstanceType<typeof FlyFormSchemaRenderer> | null;
@@ -0,0 +1,21 @@
1
+ import type { FormItemRule } from 'element-plus';
2
+ import type { T_FormSchemaLookupData, T_InputSchema, T_InputSchemaSelect, T_InputSchemaValueUnit } from '../form-schema.types';
3
+ import type { T_InputRendererBase } from '../input-renderer.types';
4
+ import type { T_InputSelectOption } from '../select/FlySelect.types';
5
+ export declare function getValidatorsFromInputFields(fields: T_InputRendererBase[]): Record<string, FormItemRule[]>;
6
+ export declare function generateInputFromFormSchema(field: T_InputSchema, lookupData?: T_FormSchemaLookupData): (import("../input-renderer.types").T_DynamicInputPropsBase & import("../boolean/FlyBoolean.types").T_InputBoolean & {
7
+ type: "boolean";
8
+ placeholder?: string;
9
+ }) | (import("../input-renderer.types").T_DynamicInputPropsBase & import("../date-time/FlyDateTime.types").T_InputDateTime & {
10
+ type: "dateTime";
11
+ }) | (import("../input-renderer.types").T_DynamicInputPropsBase & import("../number/FlyNumber.types").T_InputNumber & {
12
+ type: "number";
13
+ }) | (import("../input-renderer.types").T_DynamicInputPropsBase & import("../select/FlySelect.types").T_InputSelect & {
14
+ type: "select";
15
+ }) | (import("../input-renderer.types").T_DynamicInputPropsBase & import("../text/FlyText.types").T_InputText & {
16
+ type: "text" | "textarea";
17
+ }) | (import("../input-renderer.types").T_DynamicInputPropsBase & import("../value-unit/FlyValueUnit.types").T_InputValueUnit & {
18
+ type: "valueUnit";
19
+ }) | undefined;
20
+ export declare function generateFormRule(field: T_InputSchema): FormItemRule[];
21
+ export declare function generateSelectOptionsFromSchema(field: T_InputSchemaSelect | T_InputSchemaValueUnit, lookupData?: T_FormSchemaLookupData): T_InputSelectOption[];
@@ -0,0 +1,17 @@
1
+ import '../../../../styles/element/overrides/form.scss';
2
+ import { type T_FormSchemaRendererProps } from './UseFormSchemaRenderer';
3
+ type __VLS_Props = T_FormSchemaRendererProps & {
4
+ /**
5
+ * Column span within a 12 column grid
6
+ */
7
+ columnSpan?: number;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
10
+ validateForm: () => Promise<true | undefined>;
11
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
12
+ "update:modelValue": (value: Record<string, unknown> | undefined) => any;
13
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
+ "onUpdate:modelValue"?: ((value: Record<string, unknown> | undefined) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -0,0 +1,25 @@
1
+ import { type Ref } from 'vue';
2
+ import type { FormInstance } from 'element-plus';
3
+ import type { T_FormSchemaLookupData, T_InputSchema } from '../form-schema.types';
4
+ import type { T_FormSchemaRendererConfig } from '../input-renderer.types';
5
+ export type T_FormSchemaRendererProps = {
6
+ formConfig: T_InputSchema[];
7
+ lookupData?: T_FormSchemaLookupData;
8
+ modelValue?: Record<string, unknown>;
9
+ disabled?: boolean;
10
+ };
11
+ export type T_FormSchemaRendererEmits = {
12
+ (e: 'update:modelValue', value: T_FormSchemaRendererProps['modelValue']): void;
13
+ };
14
+ type ConfigFormCompArgs = {
15
+ formRef: Ref<FormInstance | undefined>;
16
+ props: T_FormSchemaRendererProps;
17
+ emit: T_FormSchemaRendererEmits;
18
+ };
19
+ export declare function UseFormSchemaRenderer(args: ConfigFormCompArgs): {
20
+ dynamicValidators: import("vue").ComputedRef<Record<string, import("element-plus").FormItemRule[]>>;
21
+ formProxy: import("vue").WritableComputedRef<Record<string, unknown>, Record<string, unknown>>;
22
+ generatedForm: Ref<T_FormSchemaRendererConfig | undefined, T_FormSchemaRendererConfig | undefined>;
23
+ validateForm: () => Promise<true | undefined>;
24
+ };
25
+ export {};
@@ -0,0 +1,77 @@
1
+ import type { T_DateInputTypes } from './date-time/FlyDateTime.types';
2
+ import type { T_InputSelectOption } from './select/FlySelect.types';
3
+ import type { T_ValueUnitValue } from './value-unit/FlyValueUnit.types';
4
+ export type T_FormSchemaLookupData = Record<string, Array<unknown>>;
5
+ export type T_InputSchema = T_InputSchemaText | T_InputSchemaNumber | T_InputSchemaBoolean | T_InputSchemaSelect | T_InputSchemaValueUnit | T_InputSchemaDateTime;
6
+ type T_FieldValidationBase = {
7
+ required?: boolean;
8
+ };
9
+ type T_InputSchemaBase<ValidationRules = object> = {
10
+ unique_key: string;
11
+ label: string;
12
+ tooltip?: string;
13
+ placeholder?: string;
14
+ validation?: T_FieldValidationBase & ValidationRules;
15
+ };
16
+ export type T_InputSchemaText = T_InputSchemaBase<{
17
+ minLength?: number;
18
+ maxLength?: number;
19
+ }> & {
20
+ type: 'text';
21
+ default_value?: string;
22
+ config?: {
23
+ maxLength?: number;
24
+ minLength?: number;
25
+ type?: string;
26
+ rows?: number;
27
+ };
28
+ };
29
+ export type T_InputSchemaNumber = T_InputSchemaBase<{
30
+ minLength?: number;
31
+ maxLength?: number;
32
+ }> & {
33
+ type: 'number';
34
+ default_value?: number;
35
+ config?: {
36
+ minLength?: number;
37
+ maxLength?: number;
38
+ };
39
+ };
40
+ export type T_InputSchemaBoolean = T_InputSchemaBase & {
41
+ type: 'boolean';
42
+ default_value?: boolean;
43
+ config?: {
44
+ activeText?: string;
45
+ inactiveText?: string;
46
+ };
47
+ };
48
+ type T_SelectOptions = {
49
+ options_config_Lookup_id: string;
50
+ options?: never;
51
+ } | {
52
+ options?: T_InputSelectOption[];
53
+ options_config_Lookup_id?: never;
54
+ };
55
+ type T_SelectBase<M extends boolean | undefined> = T_InputSchemaBase & {
56
+ type: 'select';
57
+ config: T_SelectOptions & {
58
+ multiple?: M;
59
+ };
60
+ default_value?: M extends true ? (string | number)[] : string | number;
61
+ };
62
+ export type T_InputSchemaSelect = T_SelectBase<true> | T_SelectBase<false | undefined>;
63
+ export type T_InputSchemaValueUnit = T_InputSchemaBase & {
64
+ type: 'valueUnit';
65
+ config: T_SelectOptions & {
66
+ valueType?: 'text' | 'number';
67
+ };
68
+ default_value?: T_ValueUnitValue;
69
+ };
70
+ export type T_InputSchemaDateTime = T_InputSchemaBase & {
71
+ type: 'dateTime';
72
+ default_value?: string | [string | string];
73
+ config?: {
74
+ inputType: T_DateInputTypes;
75
+ };
76
+ };
77
+ export {};
@@ -0,0 +1,18 @@
1
+ import type { T_InputRendererBase } from '../input-renderer.types';
2
+ type __VLS_Props = {
3
+ modelValue?: unknown;
4
+ input: T_InputRendererBase;
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
7
+ focus: () => any;
8
+ "update:modelValue": (v: unknown) => any;
9
+ change: (v: unknown) => any;
10
+ blur: () => any;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ onFocus?: (() => any) | undefined;
13
+ "onUpdate:modelValue"?: ((v: unknown) => any) | undefined;
14
+ onChange?: ((v: unknown) => any) | undefined;
15
+ onBlur?: (() => any) | undefined;
16
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import FlyInputRenderer from './FlyInputRenderer.vue';
2
+ export default FlyInputRenderer;
3
+ export { FlyInputRenderer };
@@ -0,0 +1,30 @@
1
+ import type { Component } from 'vue';
2
+ import type { FormItemRule } from 'element-plus';
3
+ import type { T_InputBoolean, T_InputBooleanBase } from './boolean/FlyBoolean.types';
4
+ import type { T_InputDateTime, T_InputDateTimeBase } from './date-time/FlyDateTime.types';
5
+ import type { T_InputNumber, T_InputNumberBase } from './number/FlyNumber.types';
6
+ import type { T_InputSelect, T_InputSelectBase } from './select/FlySelect.types';
7
+ import type { T_InputText, T_InputTextBase } from './text/FlyText.types';
8
+ import type { T_InputValueUnit, T_InputValueUnitBase } from './value-unit/FlyValueUnit.types';
9
+ export type T_DynamicInputPropsBase = {
10
+ key: string;
11
+ prop?: string;
12
+ label: string;
13
+ tooltip?: string;
14
+ columnSpan?: number;
15
+ validations?: FormItemRule[];
16
+ };
17
+ export type T_InputRendererBase = T_DynamicInputPropsBase & T_SupportedInputTypeBase;
18
+ export type T_SupportedInputTypeBase = T_InputTextBase | T_InputBooleanBase | T_InputDateTimeBase | T_InputNumberBase | T_InputSelectBase | T_InputValueUnitBase;
19
+ export type T_SupportedInputType = T_InputText | T_InputNumber | T_InputValueUnit | T_InputSelect | T_InputBoolean | T_InputDateTime;
20
+ export type T_InputTypes = T_SupportedInputTypeBase['type'];
21
+ export type T_DynamicInputComponent = Component<{
22
+ modelValue?: unknown;
23
+ input?: T_SupportedInputType;
24
+ }>;
25
+ export type T_FormSchemaRendererConfig = {
26
+ inputs: T_InputRendererBase[];
27
+ baseForm: {
28
+ [K: string]: unknown;
29
+ };
30
+ };
@@ -0,0 +1,2 @@
1
+ import type { T_InputTypes } from './input-renderer.types';
2
+ export declare function getInputDisplayValue(v: unknown, inputType: T_InputTypes): string | number;
@@ -0,0 +1,13 @@
1
+ export type T_InputTextValues = string | number | undefined;
2
+ export type T_InputNumberBase = T_InputNumber & {
3
+ type: 'number';
4
+ };
5
+ export type T_InputNumber = {
6
+ placeholder?: string;
7
+ /**
8
+ * Attrs are passed directly to the input element as props
9
+ */
10
+ attrs?: {
11
+ [K: string]: unknown;
12
+ };
13
+ };
@@ -0,0 +1 @@
1
+ export declare function displayToNumber(v: unknown): number | undefined;
@@ -0,0 +1,19 @@
1
+ import './FlyNumber.scss';
2
+ import type { T_InputNumber, T_InputTextValues } from './FlyNumber.types';
3
+ type __VLS_Props = {
4
+ modelValue?: unknown;
5
+ input?: T_InputNumber;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
+ focus: () => any;
9
+ "update:modelValue": (v: T_InputTextValues) => any;
10
+ change: (v: T_InputTextValues) => any;
11
+ blur: () => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ onFocus?: (() => any) | undefined;
14
+ "onUpdate:modelValue"?: ((v: T_InputTextValues) => any) | undefined;
15
+ onChange?: ((v: T_InputTextValues) => any) | undefined;
16
+ onBlur?: (() => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import type { T_FormSchemaLookupData, T_InputSchema } from '../form-schema.types';
2
+ export type T_TenantRegionalFormSection = {
3
+ key: string;
4
+ fields: T_InputSchema[];
5
+ title: string;
6
+ description?: string;
7
+ lookupData?: T_FormSchemaLookupData;
8
+ modelValue?: Record<string, unknown>;
9
+ };
10
+ export type T_TenantRegionalFormProps = {
11
+ mainFormTitle: string;
12
+ sections?: T_TenantRegionalFormSection[];
13
+ };
@@ -0,0 +1,20 @@
1
+ import '../../../../styles/element/overrides/collapse.scss';
2
+ import type { T_TenantRegionalFormProps } from './FlyRegionalTenantFormRenderer.types';
3
+ declare function validateForms(): Promise<true | undefined>;
4
+ declare var __VLS_19: {}, __VLS_38: {};
5
+ type __VLS_Slots = {} & {
6
+ default?: (props: typeof __VLS_19) => any;
7
+ } & {
8
+ default?: (props: typeof __VLS_38) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<T_TenantRegionalFormProps, {
11
+ validateForms: typeof validateForms;
12
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<T_TenantRegionalFormProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
@@ -0,0 +1,22 @@
1
+ export type T_InputSelectValue = string | number | (string | number)[] | undefined;
2
+ export type T_InputLabelValue = {
3
+ label: string;
4
+ value: string | number;
5
+ };
6
+ export type T_InputSelectOption = T_InputLabelValue | (number | string);
7
+ export type T_InputSelectOptionList = T_InputSelectOption[] | Record<string, T_InputLabelValue>;
8
+ export type T_InputSelectBase = T_InputSelect & {
9
+ type: 'select';
10
+ };
11
+ export type T_InputSelect = {
12
+ placeholder?: string;
13
+ /**
14
+ * Attrs are passed directly to the input element as props
15
+ */
16
+ attrs?: {
17
+ multiple?: boolean;
18
+ };
19
+ config?: {
20
+ options: T_InputSelectOptionList;
21
+ };
22
+ };
@@ -0,0 +1,2 @@
1
+ import type { T_InputLabelValue, T_InputSelectOptionList } from './FlySelect.types';
2
+ export declare function normalizeSelectOptionsToDict(options: T_InputSelectOptionList): Record<string, T_InputLabelValue>;
@@ -0,0 +1,19 @@
1
+ import './FlySelect.scss';
2
+ import type { T_InputSelect, T_InputSelectValue } from './FlySelect.types';
3
+ type __VLS_Props = {
4
+ modelValue?: T_InputSelectValue;
5
+ input?: T_InputSelect;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
+ focus: () => any;
9
+ "update:modelValue": (v: T_InputSelectValue) => any;
10
+ change: (v: T_InputSelectValue) => any;
11
+ blur: () => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ onFocus?: (() => any) | undefined;
14
+ "onUpdate:modelValue"?: ((v: T_InputSelectValue) => any) | undefined;
15
+ onChange?: ((v: T_InputSelectValue) => any) | undefined;
16
+ onBlur?: (() => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,18 @@
1
+ export type T_InputTextValues = string | number | undefined;
2
+ export type T_InputTextBase = T_InputText & {
3
+ type: 'text' | 'textarea';
4
+ };
5
+ export type T_InputText = {
6
+ placeholder?: string;
7
+ /**
8
+ * Attrs are passed directly to the input element as props
9
+ */
10
+ attrs?: {
11
+ minlength?: number;
12
+ maxlength?: number;
13
+ showWordLimit?: boolean;
14
+ type?: string;
15
+ rows?: number;
16
+ };
17
+ mask?: string;
18
+ };
@@ -0,0 +1,19 @@
1
+ import './FlyText.scss';
2
+ import type { T_InputText, T_InputTextValues } from './FlyText.types';
3
+ type __VLS_Props = {
4
+ modelValue?: T_InputTextValues;
5
+ input?: T_InputText;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
+ focus: () => any;
9
+ "update:modelValue": (v: T_InputTextValues) => any;
10
+ change: (v: T_InputTextValues) => any;
11
+ blur: () => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ onFocus?: (() => any) | undefined;
14
+ "onUpdate:modelValue"?: ((v: T_InputTextValues) => any) | undefined;
15
+ onChange?: ((v: T_InputTextValues) => any) | undefined;
16
+ onBlur?: (() => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,23 @@
1
+ import type { T_InputNumber } from '../number/FlyNumber.types';
2
+ import type { T_InputSelect, T_InputSelectOptionList } from '../select/FlySelect.types';
3
+ import type { T_InputText } from '../text/FlyText.types';
4
+ export type T_ValueUnitValue = {
5
+ unit: string | number | undefined;
6
+ value: string | number | undefined;
7
+ } | undefined;
8
+ export type T_InputValueUnitBase = T_InputValueUnit & {
9
+ type: 'valueUnit';
10
+ };
11
+ export type T_InputValueUnit = {
12
+ placeholder?: string;
13
+ unitPlaceholder?: string;
14
+ /**
15
+ * Attrs are passed directly to the input element as props
16
+ */
17
+ attrs?: T_InputText['attrs'] | T_InputNumber['attrs'];
18
+ unitsAttr?: T_InputSelect['attrs'];
19
+ config?: {
20
+ valueType?: 'text' | 'number';
21
+ options: T_InputSelectOptionList;
22
+ };
23
+ };
@@ -0,0 +1,19 @@
1
+ import './FlyValueUnit.scss';
2
+ import type { T_InputValueUnit, T_ValueUnitValue } from './FlyValueUnit.types';
3
+ type __VLS_Props = {
4
+ modelValue?: T_ValueUnitValue;
5
+ input?: T_InputValueUnit;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
8
+ focus: () => any;
9
+ "update:modelValue": (v: T_ValueUnitValue) => any;
10
+ change: (v: T_ValueUnitValue) => any;
11
+ blur: () => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ onFocus?: (() => any) | undefined;
14
+ "onUpdate:modelValue"?: ((v: T_ValueUnitValue) => any) | undefined;
15
+ onChange?: ((v: T_ValueUnitValue) => any) | undefined;
16
+ onBlur?: (() => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import type { FormItemRule } from 'element-plus';
2
+ import { type checkInputRange } from '../../utils/validators';
3
+ type InputTriggers = 'blur' | 'change';
4
+ export declare const requiredField: (fieldLabel?: string, trigger?: InputTriggers, useRequiredMessage?: boolean) => FormItemRule;
5
+ export declare const checkInputRangeValidator: (validator: ReturnType<typeof checkInputRange>, trigger?: InputTriggers) => FormItemRule;
6
+ export declare const requiredFieldNumber: (languageKey?: string, trigger?: InputTriggers) => FormItemRule;
7
+ export declare const requiredFieldNumberSelect: (label?: string, trigger?: InputTriggers, useRequiredMessage?: boolean) => FormItemRule;
8
+ export declare const requiredFieldValueUnit: (label: string | undefined, trigger: InputTriggers | undefined, useRequiredMessage: boolean | undefined, required: boolean | undefined, options: {
9
+ valueType?: "text" | "number";
10
+ }) => FormItemRule;
11
+ export declare const requiredFieldArray: (label?: string, trigger?: InputTriggers, useRequiredMessage?: boolean) => FormItemRule;
12
+ export {};
@@ -0,0 +1,5 @@
1
+ import { type Component } from 'vue';
2
+ export type T_FlyIconV2Props = {
3
+ icon: Component;
4
+ size?: string | number;
5
+ };
@@ -0,0 +1,4 @@
1
+ import type { T_FlyIconV2Props } from './FlyIconV2.types';
2
+ declare const __VLS_export: import("vue").DefineComponent<T_FlyIconV2Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<T_FlyIconV2Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
3
+ declare const _default: typeof __VLS_export;
4
+ export default _default;