@yamato-daiwa/frontend-vue 0.2.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 (60) hide show
  1. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  2. package/.idea/inspectionProfiles/Project_Default.xml +5 -1
  3. package/README.md +5 -0
  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} +83 -59
  8. package/Source/GUI_Components/Badge/Badge.vue.ts +98 -63
  9. package/Source/GUI_Components/Badge/LoadingPlaceholder/Badge-LoadingPlaceholder.vue.ts +51 -32
  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.ts +217 -105
  17. package/Source/GUI_Components/Controls/Buttons/Plain/LoadingPlaceholder/Button-LoadingPlaceholder.vue.ts +38 -30
  18. package/Source/GUI_Components/Controls/ValidatableControlShell/ValidatableControlShell.vue.pug +33 -20
  19. package/Source/GUI_Components/Controls/ValidatableControlShell/ValidatableControlShell.vue.ts +303 -121
  20. package/Source/GUI_Components/Controls/Validatables/InputtableControl.vue.ts +233 -0
  21. package/Source/GUI_Components/Controls/Validatables/TextBox/TextBox.vue.pug +38 -0
  22. package/Source/GUI_Components/Controls/Validatables/TextBox/TextBox.vue.ts +538 -96
  23. package/Source/GUI_Components/Controls/Validatables/ValidatableControl.ts +63 -54
  24. package/Source/GUI_Components/Controls/Validatables/ValidatableControlsGroup.ts +176 -0
  25. package/Source/GUI_Components/OverflowSafeSingleLineLabel.vue +9 -2
  26. package/Source/GUI_Components/ThemesShowcase.vue +10 -5
  27. package/Source/GUI_Components/YDF_ComponentsCoordinator.ts +164 -5
  28. package/Source/GUI_Components/_Decorators/AccessibleFromTemplateAsNonReactive.ts +67 -0
  29. package/Source/GUI_Components/_Decorators/NonReactiveVueData.ts +26 -0
  30. package/Source/GUI_Components/_Decorators/{OptionalButNotNullableVueProperty.ts → preventNullForOptionalVueProperty.ts} +3 -4
  31. package/Source/GUI_Components/_Errors/InvalidVueProperty/InvalidVuePropertyError.ts +43 -0
  32. package/Source/GUI_Components/_Errors/InvalidVueProperty/InvalidVuePropertyErrorLocalization.english.ts +16 -0
  33. package/Source/GUI_Components/_VuePropertiesValidators/BooleanVuePropertyValidator.ts +25 -0
  34. package/Source/GUI_Components/_VuePropertiesValidators/DecorativeModifiersVuePropertyValidator.ts +22 -0
  35. package/Source/GUI_Components/_VuePropertiesValidators/DecorativeVariationVuePropertyValidator.ts +23 -0
  36. package/Source/GUI_Components/_VuePropertiesValidators/ElementOfEnumerationVuePropertyValidator.ts +29 -0
  37. package/Source/GUI_Components/_VuePropertiesValidators/GeometricModifiersVuePropertyValidator.ts +22 -0
  38. package/Source/GUI_Components/_VuePropertiesValidators/GeometricVariationVuePropertyValidator.ts +23 -0
  39. package/Source/GUI_Components/_VuePropertiesValidators/NaturalNumberOrZeroVuePropertyValidator.ts +25 -0
  40. package/Source/GUI_Components/_VuePropertiesValidators/NonEmptyStringVuePropertyValidator.ts +25 -0
  41. package/Source/GUI_Components/_VuePropertiesValidators/ThemeVuePropertyValidator.ts +23 -0
  42. package/Source/GUI_Components/_VuePropertiesValidators/VuePropertyValidator.ts +51 -0
  43. package/Source/index.ts +24 -8
  44. package/Workbenches/Source/Decorators/Decorators.workbench.pug +20 -0
  45. package/Workbenches/Source/Decorators/Decorators.workbench.ts +5 -0
  46. package/Workbenches/Source/Decorators/DecoratorsWorkbench.vue +69 -0
  47. package/Workbenches/Source/GUI_Components/AdmonitionBlock/AdmonitionBlockComponentTestSite.vue +9 -2
  48. package/Workbenches/Source/GUI_Components/Badge/BadgeBlockComponentTestSite.vue +9 -2
  49. package/Workbenches/Source/GUI_Components/Controls/Buttons/Plain/ButtonComponentTestSite.vue +19 -8
  50. package/Workbenches/Source/GUI_Components/Controls/Validatable/TextBox/TextBoxWorkbench.vue +45 -2
  51. package/Workbenches/Source/GUI_Components/Controls/ValidatableControlShell/ValidatableControlShellTestSite.vue +9 -2
  52. package/Workbenches/Source/GUI_Components/OverflowSafeSingleLineLabel/OverflowSafeSingleLineLabelComponentTestSite.vue +9 -2
  53. package/Workbenches/Source/Workbenches.pug +6 -0
  54. package/eslint.config.js +15 -0
  55. package/package.json +40 -48
  56. package/tsconfig.json +0 -3
  57. package/yda.config.yaml +1 -1
  58. package/Source/GUI_Components/AdmonitionBlock/AdmonitionBlock.vue.pug +0 -43
  59. package/Source/GUI_Components/Controls/Validatables/InputtableControl.ts +0 -134
  60. package/Source/GUI_Components/_Utils/validateVuePropertyAndLogIfInvalid.ts +0 -34
@@ -0,0 +1,253 @@
1
+ /* ─── Assets ─────────────────────────────────────────────────────────────────────────────────────────────────────── */
2
+ import componentVueTemplate from "./HamburgerMenuButton.vue.pug";
3
+
4
+ /* ─── Validations ─────────────────────────────────────────────────────────────────────────────────────── */
5
+ import type VuePropertyValidator from "../../../_VuePropertiesValidators/VuePropertyValidator";
6
+ import BooleanVuePropertyValidator from "../../../_VuePropertiesValidators/BooleanVuePropertyValidator";
7
+ import ElementOfEnumerationVuePropertyValidator from "../../../_VuePropertiesValidators/ElementOfEnumerationVuePropertyValidator";
8
+ import NonEmptyStringVuePropertyValidator from "../../../_VuePropertiesValidators/NonEmptyStringVuePropertyValidator";
9
+ import ThemeVuePropertyValidator from "../../../_VuePropertiesValidators/ThemeVuePropertyValidator";
10
+ import GeometricVariationVuePropertyValidator from "../../../_VuePropertiesValidators/GeometricVariationVuePropertyValidator";
11
+ import GeometricModifiersVuePropertyValidator from "../../../_VuePropertiesValidators/GeometricModifiersVuePropertyValidator";
12
+ import DecorativeVariationVuePropertyValidator from "../../../_VuePropertiesValidators/DecorativeVariationVuePropertyValidator";
13
+ import DecorativeModifiersVuePropertyValidator from "../../../_VuePropertiesValidators/DecorativeModifiersVuePropertyValidator";
14
+ import preventNullForOptionalVueProperty from "../../../_Decorators/preventNullForOptionalVueProperty";
15
+
16
+ /* ─── Framework ──────────────────────────────────────────────────────────────────────────────────────────────────── */
17
+ import {
18
+ ComponentBase as VueComponentConfiguration,
19
+ Vue as VueComponent,
20
+ Prop as VueProperty
21
+ } from "vue-facing-decorator";
22
+
23
+ /* ─── Utils ──────────────────────────────────────────────────────────────────────────────────────────────────────── */
24
+ import YDF_ComponentsCoordinator from "../../../YDF_ComponentsCoordinator";
25
+ import { type ElementOfPseudoEnumeration } from "@yamato-daiwa/es-extensions";
26
+
27
+
28
+ @VueComponentConfiguration({
29
+ name: HamburgerMenuButton.CSS_NAMESPACE,
30
+ template: componentVueTemplate
31
+ })
32
+ class HamburgerMenuButton extends VueComponent {
33
+
34
+ /* ━━━ Static Fields ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
35
+ public static CSS_NAMESPACE: string = "HamburgerMenuButton--YDF";
36
+
37
+ public static LabelLetterCases: HamburgerMenuButton.LabelLetterCases = {
38
+ uppercase: "UPPERCASE",
39
+ lowercase: "LOWERCASE",
40
+ capitalisation: "CAPITALISATION"
41
+ };
42
+
43
+
44
+ /* ━━━ Common Properties ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
45
+ /* ─── Textings ─────────────────────────────────────────────────────────────────────────────────────────────────── */
46
+ @VueProperty({
47
+ required: false,
48
+ get validator(): VuePropertyValidator {
49
+ return NonEmptyStringVuePropertyValidator({
50
+ isPropertyRequired: this.required === true,
51
+ propertyName: "customLabel",
52
+ componentName: HamburgerMenuButton.CSS_NAMESPACE
53
+ });
54
+ }
55
+ })
56
+ @preventNullForOptionalVueProperty
57
+ protected readonly customLabel?: string;
58
+
59
+ @VueProperty({
60
+ default: false,
61
+ get validator(): VuePropertyValidator {
62
+ return BooleanVuePropertyValidator({
63
+ propertyName: "noLabel",
64
+ componentName: HamburgerMenuButton.CSS_NAMESPACE,
65
+ isPropertyRequired: this.required === true
66
+ });
67
+ }
68
+ })
69
+ @preventNullForOptionalVueProperty
70
+ protected readonly noLabel!: boolean;
71
+
72
+ @VueProperty({
73
+ default: HamburgerMenuButton.LabelLetterCases.lowercase,
74
+ get validator(): VuePropertyValidator {
75
+ return ElementOfEnumerationVuePropertyValidator({
76
+ enumerationFullyQualifiedName: "HamburgerMenuButton.LabelLetterCases",
77
+ enumeration: HamburgerMenuButton.LabelLetterCases,
78
+ propertyName: "labelLetterCase",
79
+ componentName: HamburgerMenuButton.CSS_NAMESPACE,
80
+ isPropertyRequired: this.required === true
81
+ });
82
+ }
83
+ })
84
+ @preventNullForOptionalVueProperty
85
+ protected readonly labelLetterCase!: ElementOfPseudoEnumeration<HamburgerMenuButton.LabelLetterCases>;
86
+
87
+ @VueProperty({
88
+ default: false,
89
+ get validator(): VuePropertyValidator {
90
+ return BooleanVuePropertyValidator({
91
+ propertyName: "alwaysEnglishLabel",
92
+ componentName: HamburgerMenuButton.CSS_NAMESPACE,
93
+ isPropertyRequired: this.required === true
94
+ });
95
+ }
96
+ })
97
+ @preventNullForOptionalVueProperty
98
+ protected readonly alwaysEnglishLabel!: boolean;
99
+
100
+ @VueProperty({
101
+ required: false,
102
+ get validator(): VuePropertyValidator {
103
+ return NonEmptyStringVuePropertyValidator({
104
+ isPropertyRequired: this.required === true,
105
+ propertyName: "accessibilityGuidance",
106
+ componentName: HamburgerMenuButton.CSS_NAMESPACE
107
+ });
108
+ }
109
+ })
110
+ @preventNullForOptionalVueProperty
111
+ protected readonly accessibilityGuidance?: string;
112
+
113
+
114
+ /* ━━━ Theming ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
115
+ public static readonly Themes: HamburgerMenuButton.Themes = { regular: "REGULAR" };
116
+
117
+ @VueProperty({
118
+ default: HamburgerMenuButton.Themes.regular,
119
+ validator: ThemeVuePropertyValidator(HamburgerMenuButton)
120
+ })
121
+ @preventNullForOptionalVueProperty
122
+ protected readonly theme!: string;
123
+
124
+ public static defineThemes(themesNames: ReadonlyArray<string>): typeof HamburgerMenuButton {
125
+ return YDF_ComponentsCoordinator.defineThemes(themesNames, HamburgerMenuButton);
126
+ }
127
+
128
+ public static areThemesCSS_ClassesCommon: boolean = YDF_ComponentsCoordinator.areThemesCSS_ClassesCommon;
129
+
130
+ public static considerThemesAsCommon(): void {
131
+ HamburgerMenuButton.areThemesCSS_ClassesCommon = true;
132
+ }
133
+
134
+ @VueProperty({
135
+ default: HamburgerMenuButton.areThemesCSS_ClassesCommon,
136
+ get validator(): VuePropertyValidator {
137
+ return BooleanVuePropertyValidator({
138
+ propertyName: "areThemesCSS_ClassesCommon",
139
+ componentName: HamburgerMenuButton.CSS_NAMESPACE,
140
+ isPropertyRequired: this.required === true
141
+ });
142
+ }
143
+ })
144
+ @preventNullForOptionalVueProperty
145
+ protected readonly areThemesCSS_ClassesCommon!: boolean;
146
+
147
+
148
+ /* ─── Geometry ─────────────────────────────────────────────────────────────────────────────────────────────────── */
149
+ public static readonly GeometricVariations: HamburgerMenuButton.GeometricVariations = { regular: "REGULAR" };
150
+
151
+ @VueProperty({
152
+ default: HamburgerMenuButton.GeometricVariations.regular,
153
+ validator: GeometricVariationVuePropertyValidator(HamburgerMenuButton)
154
+ })
155
+ @preventNullForOptionalVueProperty
156
+ protected readonly geometricVariation!: string;
157
+
158
+ public static defineGeometricVariations(geometricVariationsNames: ReadonlyArray<string>): typeof HamburgerMenuButton {
159
+ return YDF_ComponentsCoordinator.defineGeometricVariations(geometricVariationsNames, HamburgerMenuButton);
160
+ }
161
+
162
+ public static readonly GeometricModifiers: HamburgerMenuButton.GeometricModifiers = { noRoundings: "NO_ROUNDINGS" };
163
+
164
+ @VueProperty({
165
+ default: (): ReadonlyArray<ElementOfPseudoEnumeration<HamburgerMenuButton.GeometricModifiers>> => [],
166
+ validator: GeometricModifiersVuePropertyValidator(HamburgerMenuButton)
167
+ })
168
+ @preventNullForOptionalVueProperty
169
+ protected readonly geometricModifiers!: ReadonlyArray<ElementOfPseudoEnumeration<HamburgerMenuButton.GeometricModifiers>>;
170
+
171
+
172
+ /* ─── Decoration ───────────────────────────────────────────────────────────────────────────────────────────────── */
173
+ public static readonly DecorativeVariations: HamburgerMenuButton.DecorativeVariations = { regular: "REGULAR" };
174
+
175
+ @VueProperty({
176
+ default: HamburgerMenuButton.DecorativeVariations.regular,
177
+ validator: DecorativeVariationVuePropertyValidator(HamburgerMenuButton)
178
+ })
179
+ @preventNullForOptionalVueProperty
180
+ protected readonly decorativeVariation!: string;
181
+
182
+ public static defineDecorativeVariations(decorativeVariationsNames: ReadonlyArray<string>): typeof HamburgerMenuButton {
183
+ return YDF_ComponentsCoordinator.defineDecorativeVariations(decorativeVariationsNames, HamburgerMenuButton);
184
+ }
185
+
186
+ public static readonly DecorativeModifiers: HamburgerMenuButton.DecorativeModifiers = {
187
+ bordersDisguising: "BORDERS_DISGUISING",
188
+ noBackground: "NO_BACKGROUND",
189
+ noBackgroundInDefaultState: "NO_BACKGROUND_IN_DEFAULT_STATE"
190
+ };
191
+
192
+ @VueProperty({
193
+ default: (): ReadonlyArray<ElementOfPseudoEnumeration<HamburgerMenuButton.DecorativeModifiers>> => [],
194
+ validator: DecorativeModifiersVuePropertyValidator(HamburgerMenuButton)
195
+ })
196
+ protected readonly decorativeModifiers!: ReadonlyArray<ElementOfPseudoEnumeration<HamburgerMenuButton.DecorativeModifiers>>;
197
+
198
+ public static applyStaticMembersToInheritorTransformedToOptionAPI(
199
+ inheritedComponent: object
200
+ ): object {
201
+ return Object.defineProperties(
202
+ inheritedComponent,
203
+ {
204
+ LabelLetterCases: { value: HamburgerMenuButton.LabelLetterCases },
205
+ Themes: { value: HamburgerMenuButton.Themes },
206
+ GeometricVariations: { value: HamburgerMenuButton.GeometricVariations },
207
+ GeometricModifiers: { value: HamburgerMenuButton.GeometricModifiers },
208
+ DecorativeVariations: { value: HamburgerMenuButton.DecorativeVariations },
209
+ DecorativeModifiers: { value: HamburgerMenuButton.DecorativeModifiers }
210
+ }
211
+ );
212
+ }
213
+
214
+ }
215
+
216
+
217
+ namespace HamburgerMenuButton {
218
+
219
+ export type LabelLetterCases = Readonly<{
220
+ uppercase: "UPPERCASE";
221
+ lowercase: "LOWERCASE";
222
+ capitalisation: "CAPITALISATION";
223
+ }>;
224
+
225
+ export type Themes = {
226
+ readonly regular: "REGULAR";
227
+ [themeName: string]: string;
228
+ };
229
+
230
+ export type GeometricVariations = {
231
+ readonly regular: "REGULAR";
232
+ [variationName: string]: string;
233
+ };
234
+
235
+ export type GeometricModifiers = Readonly<{
236
+ noRoundings: "NO_ROUNDINGS";
237
+ }>;
238
+
239
+ export type DecorativeVariations = {
240
+ readonly regular: "REGULAR";
241
+ [variationName: string]: string;
242
+ };
243
+
244
+ export type DecorativeModifiers = Readonly<{
245
+ bordersDisguising: "BORDERS_DISGUISING";
246
+ noBackground: "NO_BACKGROUND";
247
+ noBackgroundInDefaultState: "NO_BACKGROUND_IN_DEFAULT_STATE";
248
+ }>;
249
+
250
+ }
251
+
252
+
253
+ export default HamburgerMenuButton;
@@ -0,0 +1,24 @@
1
+ <template lang="pug">
2
+
3
+ .HamburgerMenuButton--YDF OK!
4
+
5
+ </template>
6
+
7
+
8
+ <script lang="ts">
9
+
10
+ import { Component as VueComponentConfiguration, toNative as transformToOptionAPI_Component } from "vue-facing-decorator";
11
+ import HamburgerMenuButtonLogic from "./HamburgerMenuButton-ForInheritance.vue";
12
+
13
+ @VueComponentConfiguration({
14
+ name: "HamburgerMenuButton.vue",
15
+ components: {}
16
+ })
17
+ class HamburgerMenuButton extends HamburgerMenuButtonLogic {}
18
+
19
+
20
+ export default HamburgerMenuButtonLogic.applyStaticMembersToInheritorTransformedToOptionAPI(
21
+ transformToOptionAPI_Component(HamburgerMenuButton)
22
+ );
23
+
24
+ </script>
@@ -0,0 +1,45 @@
1
+ import type { Vue as VueComponent } from "vue-facing-decorator";
2
+
3
+ export default class HamburgerMenuButton extends VueComponent {
4
+
5
+ public static LabelLetterCases: HamburgerMenuButton.LabelLetterCases;
6
+
7
+ public static readonly Themes: HamburgerMenuButton.Themes;
8
+
9
+ }
10
+
11
+
12
+ export namespace HamburgerMenuButton {
13
+
14
+ export type LabelLetterCases = Readonly<{
15
+ uppercase: "UPPERCASE";
16
+ lowercase: "LOWERCASE";
17
+ capitalisation: "CAPITALISATION";
18
+ }>;
19
+
20
+ export type Themes = {
21
+ readonly regular: "REGULAR";
22
+ [themeName: string]: string;
23
+ };
24
+
25
+ export type GeometricVariations = {
26
+ readonly regular: "REGULAR";
27
+ [variationName: string]: string;
28
+ };
29
+
30
+ export type GeometricModifiers = Readonly<{
31
+ noRoundings: "NO_ROUNDINGS";
32
+ }>;
33
+
34
+ export type DecorativeVariations = {
35
+ readonly regular: "REGULAR";
36
+ [variationName: string]: string;
37
+ };
38
+
39
+ export type DecorativeModifiers = Readonly<{
40
+ bordersDisguising: "BORDERS_DISGUISING";
41
+ noBackground: "NO_BACKGROUND";
42
+ noBackgroundInDefaultState: "NO_BACKGROUND_IN_DEFAULT_STATE";
43
+ }>;
44
+
45
+ }