@yamato-daiwa/frontend-vue 0.1.0 → 0.3.0-alpha.1

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.

Potentially problematic release.


This version of @yamato-daiwa/frontend-vue might be problematic. Click here for more details.

Files changed (70) hide show
  1. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  2. package/.idea/inspectionProfiles/Project_Default.xml +0 -1
  3. package/README.md +13 -2
  4. package/Source/Functions/getElementByVueReference.ts +105 -8
  5. package/Source/GUI_Components/AdmonitionBlock/AdmonitionBlock.vue +67 -0
  6. package/Source/GUI_Components/AdmonitionBlock/AdmonitionBlock.vue.d.ts +48 -0
  7. package/Source/GUI_Components/AdmonitionBlock/{AdmonitionBlock.vue.ts → AdmonitionBlockLogic.vue.ts} +88 -64
  8. package/Source/GUI_Components/Badge/Badge.vue.ts +103 -68
  9. package/Source/GUI_Components/Badge/LoadingPlaceholder/Badge-LoadingPlaceholder.vue.ts +52 -33
  10. package/Source/GUI_Components/Controls/Buttons/Closing/ClosingButton.vue.pug +1 -0
  11. package/Source/GUI_Components/Controls/Buttons/Closing/ClosingButton.vue.ts +224 -0
  12. package/Source/GUI_Components/Controls/Buttons/HamburgerMenu/HamburgerMenuButton-ForInheritance.vue.ts +253 -0
  13. package/Source/GUI_Components/Controls/Buttons/HamburgerMenu/HamburgerMenuButton.vue +24 -0
  14. package/Source/GUI_Components/Controls/Buttons/HamburgerMenu/HamburgerMenuButton.vue.d.ts +45 -0
  15. package/Source/GUI_Components/Controls/Buttons/HamburgerMenu/HamburgerMenuButton.vue.pug +0 -0
  16. package/Source/GUI_Components/Controls/Buttons/Plain/Button.vue.pug +5 -7
  17. package/Source/GUI_Components/Controls/Buttons/Plain/Button.vue.ts +257 -116
  18. package/Source/GUI_Components/Controls/Buttons/Plain/LoadingPlaceholder/Button-LoadingPlaceholder.vue.pug +1 -1
  19. package/Source/GUI_Components/Controls/Buttons/Plain/LoadingPlaceholder/Button-LoadingPlaceholder.vue.ts +42 -33
  20. package/Source/GUI_Components/Controls/ValidatableControlShell/ValidatableControlShell.vue.pug +64 -0
  21. package/Source/GUI_Components/Controls/ValidatableControlShell/ValidatableControlShell.vue.ts +478 -0
  22. package/Source/GUI_Components/Controls/Validatables/InputtableControl.vue.ts +233 -0
  23. package/Source/GUI_Components/Controls/Validatables/TextBox/TextBox.vue.pug +67 -0
  24. package/Source/GUI_Components/Controls/Validatables/TextBox/TextBox.vue.ts +702 -0
  25. package/Source/GUI_Components/Controls/{ValidatableControl.ts → Validatables/ValidatableControl.ts} +64 -55
  26. package/Source/GUI_Components/Controls/Validatables/ValidatableControlsGroup.ts +176 -0
  27. package/Source/GUI_Components/OverflowSafeSingleLineLabel.vue +9 -2
  28. package/Source/GUI_Components/ThemesShowcase.vue +10 -5
  29. package/Source/GUI_Components/YDF_ComponentsCoordinator.ts +317 -0
  30. package/Source/GUI_Components/_Decorators/AccessibleFromTemplateAsNonReactive.ts +67 -0
  31. package/Source/GUI_Components/_Decorators/NonReactiveVueData.ts +26 -0
  32. package/Source/GUI_Components/_Decorators/preventNullForOptionalVueProperty.ts +64 -0
  33. package/Source/GUI_Components/_Errors/ForbiddenNullValueOfOptionalVueProperty/ForbiddenNullValueOfOptionalVuePropertyError.ts +47 -0
  34. package/Source/GUI_Components/_Errors/ForbiddenNullValueOfOptionalVueProperty/ForbiddenNullValueOfOptionalVuePropertyErrorLocalization.english.ts +24 -0
  35. package/Source/GUI_Components/_Errors/InvalidVueProperty/InvalidVuePropertyError.ts +43 -0
  36. package/Source/GUI_Components/_Errors/InvalidVueProperty/InvalidVuePropertyErrorLocalization.english.ts +16 -0
  37. package/Source/GUI_Components/_VuePropertiesValidators/BooleanVuePropertyValidator.ts +25 -0
  38. package/Source/GUI_Components/_VuePropertiesValidators/DecorativeModifiersVuePropertyValidator.ts +22 -0
  39. package/Source/GUI_Components/_VuePropertiesValidators/DecorativeVariationVuePropertyValidator.ts +23 -0
  40. package/Source/GUI_Components/_VuePropertiesValidators/ElementOfEnumerationVuePropertyValidator.ts +29 -0
  41. package/Source/GUI_Components/_VuePropertiesValidators/GeometricModifiersVuePropertyValidator.ts +22 -0
  42. package/Source/GUI_Components/_VuePropertiesValidators/GeometricVariationVuePropertyValidator.ts +23 -0
  43. package/Source/GUI_Components/_VuePropertiesValidators/NaturalNumberOrZeroVuePropertyValidator.ts +25 -0
  44. package/Source/GUI_Components/_VuePropertiesValidators/NonEmptyStringVuePropertyValidator.ts +25 -0
  45. package/Source/GUI_Components/_VuePropertiesValidators/ThemeVuePropertyValidator.ts +23 -0
  46. package/Source/GUI_Components/_VuePropertiesValidators/VuePropertyValidator.ts +51 -0
  47. package/Source/index.ts +28 -5
  48. package/Workbenches/Source/Decorators/Decorators.workbench.pug +20 -0
  49. package/Workbenches/Source/Decorators/Decorators.workbench.ts +5 -0
  50. package/Workbenches/Source/Decorators/DecoratorsWorkbench.vue +69 -0
  51. package/Workbenches/Source/GUI_Components/AdmonitionBlock/AdmonitionBlockComponentTestSite.vue +24 -2
  52. package/Workbenches/Source/GUI_Components/Badge/BadgeBlockComponentTestSite.vue +24 -2
  53. package/Workbenches/Source/GUI_Components/Controls/Buttons/Plain/Button.workbench.pug +20 -0
  54. package/Workbenches/Source/GUI_Components/Controls/Buttons/Plain/Button.workbench.ts +5 -0
  55. package/Workbenches/Source/GUI_Components/Controls/Buttons/Plain/ButtonComponentTestSite.vue +60 -0
  56. package/Workbenches/Source/GUI_Components/Controls/Validatable/TextBox/TextBox.workbench.pug +20 -0
  57. package/Workbenches/Source/GUI_Components/Controls/Validatable/TextBox/TextBox.workbench.ts +5 -0
  58. package/Workbenches/Source/GUI_Components/Controls/Validatable/TextBox/TextBoxWorkbench.vue +86 -0
  59. package/Workbenches/Source/GUI_Components/Controls/ValidatableControlShell/ValidatableControlShell.workbench.pug +20 -0
  60. package/Workbenches/Source/GUI_Components/Controls/ValidatableControlShell/ValidatableControlShell.workbench.ts +5 -0
  61. package/Workbenches/Source/GUI_Components/Controls/ValidatableControlShell/ValidatableControlShellTestSite.vue +68 -0
  62. package/Workbenches/Source/GUI_Components/OverflowSafeSingleLineLabel/OverflowSafeSingleLineLabelComponentTestSite.vue +9 -2
  63. package/Workbenches/Source/Workbenches.pug +62 -0
  64. package/eslint.config.js +15 -0
  65. package/package.json +40 -48
  66. package/tsconfig.json +0 -3
  67. package/yda.config.yaml +65 -65
  68. package/Source/GUI_Components/AdmonitionBlock/AdmonitionBlock.vue.pug +0 -43
  69. package/Source/GUI_Components/ComponentsAuxiliaries.ts +0 -124
  70. package/Source/GUI_Components/Controls/InputtableControl.ts +0 -97
@@ -1,97 +0,0 @@
1
- /* --- Framework ---------------------------------------------------------------------------------------------------- */
2
- import { ComponentBase as VueComponentConfiguration, Vue as VueComponent, Prop as VueProperty } from "vue-facing-decorator";
3
-
4
- /* --- Utils -------------------------------------------------------------------------------------------------------- */
5
- import { Logger, isNonEmptyString, isEitherUndefinedOrNull } from "@yamato-daiwa/es-extensions";
6
- import InvalidVuePropertiesCombinationError from
7
- "../_Errors/InvalidVuePropertiesCombination/InvalidVuePropertiesCombinationError";
8
-
9
-
10
- @VueComponentConfiguration({})
11
- export default class InputtableControl extends VueComponent {
12
-
13
- /* === Properties ================================================================================================= */
14
- @VueProperty({
15
- type: String,
16
- validator: (rawValue: unknown): boolean => isNonEmptyString(rawValue)
17
- })
18
- protected readonly label?: string;
19
-
20
- @VueProperty({
21
- type: String,
22
- validator: (rawValue: unknown): boolean => isNonEmptyString(rawValue)
23
- })
24
- protected readonly accessibilityGuidance?: string;
25
-
26
- @VueProperty({
27
- type: String,
28
- validator: (rawValue: unknown): boolean => isNonEmptyString(rawValue)
29
- })
30
- protected readonly externalLabelHTML_ID?: string;
31
-
32
- @VueProperty({
33
- type: String,
34
- validator: (rawValue: unknown): boolean => isNonEmptyString(rawValue)
35
- })
36
- protected readonly guidance?: string;
37
-
38
-
39
- @VueProperty({ type: Boolean, default: false })
40
- protected readonly required!: boolean;
41
-
42
- @VueProperty({ type: Boolean, default: false })
43
- protected readonly mustDisplayAppropriateBadgeIfInputIsRequired!: boolean;
44
-
45
- @VueProperty({ type: Boolean, default: false })
46
- protected readonly mustDisplayAppropriateBadgeIfInputIsOptional!: boolean;
47
-
48
- @VueProperty({ type: Boolean, default: false })
49
- protected readonly disabled!: boolean;
50
-
51
-
52
- /* === State ====================================================================================================== */
53
- protected invalidInputHighlightingIfAnyValidationErrorsMessages: boolean = false;
54
- protected validInputHighlightingIfAnyErrorsMessages: boolean = false;
55
-
56
-
57
- /* === Methods ==================================================================================================== */
58
- public highlightInvalidInput(): this {
59
- this.invalidInputHighlightingIfAnyValidationErrorsMessages = true;
60
- return this;
61
- }
62
-
63
- public getRootElement(): Element {
64
- return this.$el;
65
- }
66
-
67
- public resetStateToInitial(): void {
68
- Object.assign(this.$data, this.$options.data?.({}));
69
- }
70
-
71
-
72
- /* === Livecycle hooks ========================================================================================== */
73
- public beforeCreate(): void {
74
-
75
- const inheritedComponentNameForLogging: string = this.$options.name ?? "(Unnamed component)";
76
-
77
- if (
78
- isEitherUndefinedOrNull(this.label) &&
79
- isEitherUndefinedOrNull(this.accessibilityGuidance) &&
80
- isEitherUndefinedOrNull(this.externalLabelHTML_ID)
81
- ) {
82
- Logger.logError({
83
- errorType: InvalidVuePropertiesCombinationError.NAME,
84
- title: InvalidVuePropertiesCombinationError.localization.defaultTitle,
85
- description: InvalidVuePropertiesCombinationError.localization.generateMessage({
86
- vueComponentName: inheritedComponentNameForLogging,
87
- messageSpecificPart: "From the accessibility requirements, one of next properties must be specified:\n" +
88
- "● label\n● accessibilityGuidance\n● externalLabelHTML_ID"
89
-
90
- }),
91
- occurrenceLocation: `${ inheritedComponentNameForLogging }.beforeCreate()`
92
- });
93
- }
94
-
95
- }
96
-
97
- }