@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
@@ -0,0 +1,29 @@
1
+ import VuePropertyValidator from "./VuePropertyValidator";
2
+ import { isString, isElementOfEnumeration } from "@yamato-daiwa/es-extensions";
3
+
4
+
5
+ export default function ElementOfEnumerationVuePropertyValidator(
6
+ {
7
+ componentName,
8
+ propertyName,
9
+ enumeration,
10
+ isPropertyRequired,
11
+ enumerationFullyQualifiedName
12
+ }: Readonly<{
13
+ componentName: string;
14
+ propertyName: string;
15
+ isPropertyRequired: boolean;
16
+ enumeration: Readonly<{ [key: string]: string | number; }>;
17
+ enumerationFullyQualifiedName: string;
18
+ }>
19
+ ): (targetVueProperty: unknown) => boolean {
20
+ return VuePropertyValidator.create({
21
+ checker: (rawValue: unknown): boolean => isString(rawValue) && isElementOfEnumeration(rawValue, enumeration),
22
+ messageSpecificPart:
23
+ isPropertyRequired ?
24
+ `Must the an element of "${ enumerationFullyQualifiedName }" enumeration.` :
25
+ `Must be either element of "${ enumerationFullyQualifiedName }" enumeration of undefined (explicit or omitted).`,
26
+ propertyName,
27
+ componentName
28
+ });
29
+ }
@@ -0,0 +1,22 @@
1
+ import VuePropertyValidator from "./VuePropertyValidator";
2
+ import { isString, isElementOfEnumeration } from "@yamato-daiwa/es-extensions";
3
+
4
+
5
+ export default function GeometricModifiersVuePropertyValidator(
6
+ {
7
+ GeometricModifiers,
8
+ CSS_NAMESPACE: componentName
9
+ }: Readonly<{
10
+ GeometricModifiers: Readonly<{ [key: string]: string; }>;
11
+ CSS_NAMESPACE: string;
12
+ }>
13
+ ): (targetVueProperty: unknown) => boolean {
14
+ return VuePropertyValidator.create({
15
+ checker: (rawValue: unknown): boolean => Array.isArray(rawValue) && rawValue.every(
16
+ (element: unknown): boolean => isString(element) && isElementOfEnumeration(element, GeometricModifiers)
17
+ ),
18
+ messageSpecificPart: `Each array element must the member of \`${ componentName }.GeometricModifiers\` enumeration.`,
19
+ propertyName: "geometricModifiers",
20
+ componentName
21
+ });
22
+ }
@@ -0,0 +1,23 @@
1
+ import VuePropertyValidator from "./VuePropertyValidator";
2
+ import { isString, isElementOfEnumeration } from "@yamato-daiwa/es-extensions";
3
+
4
+
5
+ export default function GeometricVariationVuePropertyValidator(
6
+ {
7
+ GeometricVariations,
8
+ CSS_NAMESPACE: componentName
9
+ }: Readonly<{
10
+ GeometricVariations: Readonly<{ [key: string]: string; }>;
11
+ CSS_NAMESPACE: string;
12
+ }>
13
+ ): (targetVueProperty: Exclude<unknown, undefined>) => boolean {
14
+ return VuePropertyValidator.create({
15
+ checker: (rawValue: Exclude<unknown, undefined>): boolean =>
16
+ isString(rawValue) && isElementOfEnumeration(rawValue, GeometricVariations),
17
+ messageSpecificPart:
18
+ `Must be the string herewith one among values of \`${ componentName }.GeometricVariations\` associative array ` +
19
+ ` including the ones defined via \`${ componentName }.defineGeometricVariations()\`.`,
20
+ propertyName: "geometricVariation",
21
+ componentName
22
+ });
23
+ }
@@ -0,0 +1,25 @@
1
+ import VuePropertyValidator from "./VuePropertyValidator";
2
+ import { isNaturalNumberOrZero } from "@yamato-daiwa/es-extensions";
3
+
4
+
5
+ export default function NaturalNumberOrZeroVuePropertyValidator(
6
+ {
7
+ componentName,
8
+ propertyName,
9
+ isPropertyRequired
10
+ }: Readonly<{
11
+ componentName: string;
12
+ propertyName: string;
13
+ isPropertyRequired: boolean;
14
+ }>
15
+ ): (targetVueProperty: Exclude<unknown, undefined>) => boolean {
16
+ return VuePropertyValidator.create({
17
+ checker: isNaturalNumberOrZero,
18
+ messageSpecificPart:
19
+ isPropertyRequired ?
20
+ "Must be the 0 or natural number." :
21
+ "Must be 0, natural number or undefined (explicit or omitted).",
22
+ propertyName,
23
+ componentName
24
+ });
25
+ }
@@ -0,0 +1,25 @@
1
+ import VuePropertyValidator from "./VuePropertyValidator";
2
+ import { isNonEmptyString } from "@yamato-daiwa/es-extensions";
3
+
4
+
5
+ export default function NonEmptyStringVuePropertyValidator(
6
+ {
7
+ componentName,
8
+ propertyName,
9
+ isPropertyRequired
10
+ }: Readonly<{
11
+ componentName: string;
12
+ propertyName: string;
13
+ isPropertyRequired: boolean;
14
+ }>
15
+ ): (targetVueProperty: Exclude<unknown, undefined>) => boolean {
16
+ return VuePropertyValidator.create({
17
+ checker: isNonEmptyString,
18
+ messageSpecificPart:
19
+ isPropertyRequired ?
20
+ "Must be the non-empty string." :
21
+ "Must be either non-empty string or undefined (explicit or omitted).",
22
+ propertyName,
23
+ componentName
24
+ });
25
+ }
@@ -0,0 +1,23 @@
1
+ import VuePropertyValidator from "./VuePropertyValidator";
2
+ import { isString, isElementOfEnumeration } from "@yamato-daiwa/es-extensions";
3
+
4
+
5
+ export default function ThemeVuePropertyValidator(
6
+ {
7
+ Themes,
8
+ CSS_NAMESPACE: componentName
9
+ }: Readonly<{
10
+ Themes: Readonly<{ [key: string]: string; }>;
11
+ CSS_NAMESPACE: string;
12
+ }>
13
+ ): (targetVueProperty: Exclude<unknown, undefined>) => boolean {
14
+ return VuePropertyValidator.create({
15
+ checker: (rawValue: Exclude<unknown, undefined>): boolean =>
16
+ isString(rawValue) && isElementOfEnumeration(rawValue, Themes),
17
+ messageSpecificPart:
18
+ `Must be the string herewith one among values of \`${ componentName }.Themes\` associative array including ` +
19
+ `the ones defined via \`${ componentName }.defineThemes()\`.`,
20
+ propertyName: "theme",
21
+ componentName
22
+ });
23
+ }
@@ -0,0 +1,51 @@
1
+ import { Logger } from "@yamato-daiwa/es-extensions";
2
+ import InvalidVuePropertyError from "../_Errors/InvalidVueProperty/InvalidVuePropertyError";
3
+
4
+
5
+ type VuePropertyValidator = (value: Exclude<unknown, undefined>) => boolean;
6
+
7
+
8
+ namespace VuePropertyValidator {
9
+
10
+ export function create(
11
+ {
12
+ checker,
13
+ componentName,
14
+ propertyName,
15
+ messageSpecificPart
16
+ }: Readonly<{
17
+ checker: (targetVueProperty: Exclude<unknown, undefined>) => boolean;
18
+ componentName: string;
19
+ propertyName: string;
20
+ messageSpecificPart: string;
21
+ }>
22
+ ): VuePropertyValidator {
23
+ return (targetVueProperty: Exclude<unknown, undefined>): boolean => {
24
+
25
+ if (!checker(targetVueProperty)) {
26
+
27
+ Logger.logError({
28
+ errorType: InvalidVuePropertyError.NAME,
29
+ title: InvalidVuePropertyError.localization.defaultTitle,
30
+ description: InvalidVuePropertyError.localization.generateDescription({
31
+ componentName,
32
+ propertyName,
33
+ messageSpecificPart
34
+ }),
35
+ occurrenceLocation: "VuePropertyValidator"
36
+ });
37
+
38
+ return false;
39
+
40
+ }
41
+
42
+
43
+ return true;
44
+
45
+ };
46
+ }
47
+
48
+ }
49
+
50
+
51
+ export default VuePropertyValidator;
package/Source/index.ts CHANGED
@@ -1,23 +1,46 @@
1
- export { default as YDF_ComponentsCoordinator } from "./GUI_Components/ComponentsAuxiliaries";
1
+ export { default as YDF_ComponentsCoordinator } from "./GUI_Components/YDF_ComponentsCoordinator";
2
2
 
3
3
  /* ━━━ Officially Realized ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
4
4
  /* ━━━ GUI Components ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
5
+ /* ╍╍╍ Admonition Block ╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍ */
6
+ export { default as AdmonitionBlockLogic } from "./GUI_Components/AdmonitionBlock/AdmonitionBlockLogic.vue";
5
7
  export { default as AdmonitionBlock } from "./GUI_Components/AdmonitionBlock/AdmonitionBlock.vue";
6
8
 
9
+ // ━━━ TODO ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
7
10
  export { default as Badge } from "./GUI_Components/Badge/Badge.vue";
8
11
  export { default as BadgeLoadingPlaceholder } from "./GUI_Components/Badge/LoadingPlaceholder/Badge-LoadingPlaceholder.vue";
9
12
 
13
+ /* ┅┅┅ Controls ┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅ */
14
+ export { default as ValidatableControlShell } from
15
+ "./GUI_Components/Controls/ValidatableControlShell/ValidatableControlShell.vue";
10
16
 
11
- /* ━━━ Alpha / Beta ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
17
+ /* ╍╍╍ Buttons ╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍ */
12
18
  export { default as Button } from "./GUI_Components/Controls/Buttons/Plain/Button.vue";
13
19
  export { default as ButtonLoadingPlaceholder } from
14
- "./GUI_Components/Controls/Buttons/Plain/LoadingPlaceholder/Button-LoadingPlaceholder.vue";
20
+ "./GUI_Components/Controls/Buttons/Plain/LoadingPlaceholder/Button-LoadingPlaceholder.vue";
15
21
 
16
- export { default as OverflowSafeSingleLineLabel } from "./GUI_Components/OverflowSafeSingleLineLabel.vue";
22
+ export { default as HamburgerMenuButton } from "./GUI_Components/Controls/Buttons/HamburgerMenu/HamburgerMenuButton.vue";
23
+ export { default as HamburgerMenuButtonLogic } from
24
+ "./GUI_Components/Controls/Buttons/HamburgerMenu/HamburgerMenuButton-ForInheritance.vue";
17
25
 
18
- export { default as ThemesShowcase } from "./GUI_Components/ThemesShowcase.vue";
26
+ export { default as ClosingButton } from "./GUI_Components/Controls/Buttons/Closing/ClosingButton.vue";
27
+
28
+ /* ╍╍╍ Validatables ╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍╍ */
29
+ export { default as InputtableControl } from "./GUI_Components/Controls/Validatables/InputtableControl.vue";
30
+ export { default as ValidatableControl } from "./GUI_Components/Controls/Validatables/ValidatableControl";
31
+ export { default as ValidatableControlsGroup } from "./GUI_Components/Controls/Validatables/ValidatableControlsGroup";
32
+
33
+ export { default as TextBox } from "./GUI_Components/Controls/Validatables/TextBox/TextBox.vue";
19
34
 
20
35
 
36
+ /* ━━━ Alpha / Beta ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
37
+ export { default as AccessibleFromTemplateAsNonReactive } from "./GUI_Components/_Decorators/AccessibleFromTemplateAsNonReactive";
38
+ export { default as NonReactiveVueData } from "./GUI_Components/_Decorators/NonReactiveVueData";
39
+ export { default as preventNullForOptionalVueProperty } from "./GUI_Components/_Decorators/preventNullForOptionalVueProperty";
40
+
41
+ export { default as OverflowSafeSingleLineLabel } from "./GUI_Components/OverflowSafeSingleLineLabel.vue";
42
+ export { default as ThemesShowcase } from "./GUI_Components/ThemesShowcase.vue";
43
+
21
44
  /* ━━━ Icons ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
22
45
  export { default as AchievementIcon__Filled } from "./SVG_Icons/Achievement/AchievementIcon__Filled.vue";
23
46
  export { default as AchievementIcon__Outlined } from "./SVG_Icons/Achievement/AchievementIcon__Outlined.vue";
@@ -0,0 +1,20 @@
1
+ extends ../../../node_modules/@yamato-daiwa/frontend/PagesTemplates/RegularWebPageTemplate.pug
2
+
3
+
4
+ block append Metadata
5
+
6
+ -
7
+
8
+ RegularWebPageTemplate__YDF.configure({
9
+ metadata: {
10
+ title: "Decorators Workbench"
11
+ },
12
+ scriptsURIs: {
13
+ atEndOfBody: [ "@Workbenches/Decorators/Decorators.workbench" ]
14
+ }
15
+ });
16
+
17
+
18
+ block append PageContent
19
+
20
+ #APPLICATION
@@ -0,0 +1,5 @@
1
+ import { createApp as createVueApplication } from "vue";
2
+ import DecoratorsWorkbench from "./DecoratorsWorkbench.vue";
3
+
4
+
5
+ createVueApplication(DecoratorsWorkbench).mount("#APPLICATION");
@@ -0,0 +1,69 @@
1
+ <template lang="pug">
2
+
3
+ button(
4
+ type="button"
5
+ @click="updateFields"
6
+ ) Change
7
+
8
+ span {{ reactiveFiled }}
9
+ span {{ nonReactiveFiled }}
10
+
11
+ span {{ staticField1 }}
12
+ span {{ staticField2 }}
13
+
14
+ </template>
15
+
16
+
17
+ <script lang="ts">
18
+
19
+ /* ─── Framework ────────────────────────────────────────────────────────────────────────────────────────────────── */
20
+ import {
21
+ Component as VueComponentOptions,
22
+ Vue as VueComponent,
23
+ toNative as transformToOptionAPI_Component
24
+ } from "vue-facing-decorator";
25
+
26
+ /* ─── Utils ────────────────────────────────────────────────────────────────────────────────────────────────────── */
27
+ import {
28
+ AccessibleFromTemplateAsNonReactive,
29
+ NonReactiveVueData
30
+ } from "../../../Source";
31
+
32
+ @VueComponentOptions({ name: "DecoratorsWorkbench" })
33
+ class DecoratorsWorkbench extends VueComponent {
34
+
35
+ protected reactiveFiled = "ALPHA";
36
+
37
+ @NonReactiveVueData("ALPHA")
38
+ protected nonReactiveFiled!: string;
39
+
40
+ @AccessibleFromTemplateAsNonReactive
41
+ protected static staticField1: string = "STATIC_FIELD_1";
42
+
43
+ @AccessibleFromTemplateAsNonReactive
44
+ protected static staticField2: string = "STATIC_FIELD_2";
45
+
46
+ protected updateFields(): void {
47
+ this.reactiveFiled = "BRAVO";
48
+ this.nonReactiveFiled = "CHARLIE";
49
+ DecoratorsWorkbench.staticField1 = "UPDATED_STATIC_FIELD_1";
50
+ DecoratorsWorkbench.staticField2 = "UPDATED_STATIC_FIELD_2";
51
+ }
52
+
53
+ }
54
+
55
+ export default transformToOptionAPI_Component(DecoratorsWorkbench);
56
+
57
+ </script>
58
+
59
+
60
+ <style lang="stylus">
61
+
62
+ @require "../../../node_modules/@yamato-daiwa/frontend/Functionality.styl"
63
+ @require "../../../node_modules/@yamato-daiwa/frontend/GUI_Components.styl"
64
+
65
+
66
+ CrossBrowserStylesReset()
67
+ InitialGlobalCSS_Rules()
68
+
69
+ </style>
@@ -9,14 +9,36 @@
9
9
  import { AdmonitionBlock } from "../../../../Source";
10
10
 
11
11
  /* ─── Framework ────────────────────────────────────────────────────────────────────────────────────────────────── */
12
- import { Component as VueComponentOptions, Vue as VueComponent } from "vue-facing-decorator";
12
+ import {
13
+ Component as VueComponentOptions,
14
+ Vue as VueComponent,
15
+ toNative as transformToOptionAPI_Component
16
+ } from "vue-facing-decorator";
13
17
 
14
18
 
15
19
  @VueComponentOptions({
20
+ name: "AdmonitionBlockComponentTestSite",
16
21
  components: {
17
22
  AdmonitionBlock
18
23
  }
19
24
  })
20
- export default class AdmonitionBlockComponentTestSite extends VueComponent {}
25
+ class AdmonitionBlockComponentTestSite extends VueComponent {}
26
+
27
+ export default transformToOptionAPI_Component(AdmonitionBlockComponentTestSite);
21
28
 
22
29
  </script>
30
+
31
+
32
+ <style lang="stylus">
33
+
34
+ @require "../../../../node_modules/@yamato-daiwa/frontend/Functionality.styl"
35
+ @require "../../../../node_modules/@yamato-daiwa/frontend/GUI_Components.styl"
36
+
37
+
38
+ CrossBrowserStylesReset()
39
+ InitialGlobalCSS_Rules()
40
+
41
+
42
+ generateAdmonitionBlockYDF_GUI_ComponentStyles()
43
+
44
+ </style>
@@ -9,14 +9,36 @@
9
9
  import { Badge } from "../../../../Source";
10
10
 
11
11
  /* ─── Framework ────────────────────────────────────────────────────────────────────────────────────────────────── */
12
- import { Component as VueComponentOptions, Vue as VueComponent } from "vue-facing-decorator";
12
+ import {
13
+ Component as VueComponentOptions,
14
+ Vue as VueComponent,
15
+ toNative as transformToOptionAPI_Component
16
+ } from "vue-facing-decorator";
13
17
 
14
18
 
15
19
  @VueComponentOptions({
20
+ name: "BadgeComponentTestSite",
16
21
  components: {
17
22
  Badge
18
23
  }
19
24
  })
20
- export default class BadgeComponentTestSite extends VueComponent {}
25
+ class BadgeComponentTestSite extends VueComponent {}
26
+
27
+ export default transformToOptionAPI_Component(BadgeComponentTestSite);
21
28
 
22
29
  </script>
30
+
31
+
32
+ <style lang="stylus">
33
+
34
+ @require "../../../../node_modules/@yamato-daiwa/frontend/Functionality.styl"
35
+ @require "../../../../node_modules/@yamato-daiwa/frontend/GUI_Components.styl"
36
+
37
+
38
+ CrossBrowserStylesReset()
39
+ InitialGlobalCSS_Rules()
40
+
41
+
42
+ generateBadgeYDF_GUI_ComponentStyles()
43
+
44
+ </style>
@@ -0,0 +1,20 @@
1
+ extends ../../../../../../node_modules/@yamato-daiwa/frontend/PagesTemplates/RegularWebPageTemplate.pug
2
+
3
+
4
+ block append Metadata
5
+
6
+ -
7
+
8
+ RegularWebPageTemplate__YDF.configure({
9
+ metadata: {
10
+ title: "Button Component Testing"
11
+ },
12
+ scriptsURIs: {
13
+ atEndOfBody: [ "@Workbenches/GUI_Components/Controls/Buttons/Plain/Button.workbench" ]
14
+ }
15
+ });
16
+
17
+
18
+ block append PageContent
19
+
20
+ #APPLICATION
@@ -0,0 +1,5 @@
1
+ import { createApp as createVueApplication } from "vue";
2
+ import ButtonComponentTestSite from "./ButtonComponentTestSite.vue";
3
+
4
+
5
+ createVueApplication(ButtonComponentTestSite).mount("#APPLICATION");
@@ -0,0 +1,60 @@
1
+ <template lang="pug">
2
+
3
+ Button(
4
+ label="Test"
5
+ :disabled="false"
6
+ @click="onButtonClicked"
7
+ )
8
+
9
+ </template>
10
+
11
+
12
+ <script lang="ts">
13
+
14
+ /* ─── GUI Components ───────────────────────────────────────────────────────────────────────────────────────────── */
15
+ import { Button } from "../../../../../../Source";
16
+
17
+ /* ─── Framework ────────────────────────────────────────────────────────────────────────────────────────────────── */
18
+ import {
19
+ Component as VueComponentOptions,
20
+ Vue as VueComponent,
21
+ toNative as transformToOptionAPI_Component
22
+ } from "vue-facing-decorator";
23
+ import { Logger } from "@yamato-daiwa/es-extensions";
24
+
25
+
26
+ @VueComponentOptions({
27
+ name: "ButtonComponentTestSite",
28
+ components: {
29
+ Button
30
+ }
31
+ })
32
+ class ButtonComponentTestSite extends VueComponent {
33
+
34
+ protected onButtonClicked(): void {
35
+ Logger.logSuccess({
36
+ title: "Clicked",
37
+ description: "Button has been clicked"
38
+ });
39
+ }
40
+
41
+ }
42
+
43
+ export default transformToOptionAPI_Component(ButtonComponentTestSite);
44
+
45
+ </script>
46
+
47
+
48
+ <style lang="stylus">
49
+
50
+ @require "../../../../../../node_modules/@yamato-daiwa/frontend/Functionality.styl"
51
+ @require "../../../../../../node_modules/@yamato-daiwa/frontend/GUI_Components.styl"
52
+
53
+
54
+ CrossBrowserStylesReset()
55
+ InitialGlobalCSS_Rules()
56
+
57
+
58
+ generateButtonYDF_GUI_ComponentStyles()
59
+
60
+ </style>
@@ -0,0 +1,20 @@
1
+ extends ../../../../../../node_modules/@yamato-daiwa/frontend/PagesTemplates/RegularWebPageTemplate.pug
2
+
3
+
4
+ block append Metadata
5
+
6
+ -
7
+
8
+ RegularWebPageTemplate__YDF.configure({
9
+ metadata: {
10
+ title: "TextBox Workbench"
11
+ },
12
+ scriptsURIs: {
13
+ atEndOfBody: [ "@Workbenches/GUI_Components/Controls/Validatable/TextBox/TextBox.workbench" ]
14
+ }
15
+ });
16
+
17
+
18
+ block append PageContent
19
+
20
+ #APPLICATION
@@ -0,0 +1,5 @@
1
+ import { createApp as createVueApplication } from "vue";
2
+ import TextBoxWorkbench from "./TextBoxWorkbench.vue";
3
+
4
+
5
+ createVueApplication(TextBoxWorkbench).mount("#APPLICATION");
@@ -0,0 +1,86 @@
1
+ <template lang="pug">
2
+
3
+ TextBox(
4
+ label="Sample"
5
+ guidance="Please input something"
6
+ inputOrTextareaElementHTML_ID="BLA"
7
+ v-model="textBoxPayload"
8
+ :validityHighlightingActivationMode="TextBox.ValidityHighlightingActivationModes.onFocusOut"
9
+ :mustDisplayAppropriateBadgeIfInputIsRequired="true"
10
+ :required="textBoxPayload.validation.isInputRequired()"
11
+ :ref="TEXT_BOX_VUE_REFERENCE_ID"
12
+ )
13
+
14
+ </template>
15
+
16
+
17
+ <script lang="ts">
18
+
19
+ /* ─── GUI Components ───────────────────────────────────────────────────────────────────────────────────────────── */
20
+ /* eslint-disable-next-line max-classes-per-file -- Allow additional class for for inputted data validation. */
21
+ import TextBox from "../../../../../../Source/GUI_Components/Controls/Validatables/TextBox/TextBox.vue";
22
+
23
+ /* ─── Framework ────────────────────────────────────────────────────────────────────────────────────────────────── */
24
+ import {
25
+ Component as VueComponentOptions,
26
+ Vue as VueComponent,
27
+ toNative as transformToOptionAPI_Component
28
+ } from "vue-facing-decorator";
29
+ import { ValidatableControl, NonReactiveVueData, AccessibleFromTemplateAsNonReactive } from "../../../../../../Source";
30
+ import { InputtedValueValidation, MinimalCharactersCountInputtedValueValidationRule } from "@yamato-daiwa/frontend";
31
+ import { isEmptyString } from "@yamato-daiwa/es-extensions";
32
+
33
+
34
+ @VueComponentOptions({
35
+ name: "TextBoxWorkbench",
36
+ components: {
37
+ TextBox
38
+ }
39
+ })
40
+ class TextBoxWorkbench extends VueComponent {
41
+
42
+ @NonReactiveVueData("TEXT_BOX")
43
+ protected readonly TEXT_BOX_VUE_REFERENCE_ID!: string;
44
+
45
+ @AccessibleFromTemplateAsNonReactive
46
+ protected static readonly TextBox: typeof TextBox = TextBox;
47
+
48
+ protected textBoxPayload: ValidatableControl.Payload<string, string, InputtedValueValidation> =
49
+ ValidatableControl.Payload.createInitialInstance({
50
+ initialValue: "",
51
+ validation: new class extends InputtedValueValidation {
52
+ public constructor() {
53
+ super({
54
+ omittedValueChecker: isEmptyString,
55
+ isInputRequired: true,
56
+ staticRules: [
57
+ new MinimalCharactersCountInputtedValueValidationRule({ minimalCharactersCount: 3 })
58
+ ]
59
+ });
60
+ }
61
+ }(),
62
+ vueReferenceID: this.TEXT_BOX_VUE_REFERENCE_ID
63
+ });
64
+
65
+ }
66
+
67
+ export default transformToOptionAPI_Component(TextBoxWorkbench);
68
+
69
+ </script>
70
+
71
+
72
+ <style lang="stylus">
73
+
74
+ @require "../../../../../../node_modules/@yamato-daiwa/frontend/Functionality.styl"
75
+ @require "../../../../../../node_modules/@yamato-daiwa/frontend/GUI_Components.styl"
76
+
77
+
78
+ CrossBrowserStylesReset()
79
+ InitialGlobalCSS_Rules()
80
+
81
+
82
+ generateValidatableControlShellYDF_GUI_ComponentStyles()
83
+ generateTextBoxYDF_GUI_ComponentStyles()
84
+ generateBadgeYDF_GUI_ComponentStyles()
85
+
86
+ </style>
@@ -0,0 +1,20 @@
1
+ extends ../../../../../node_modules/@yamato-daiwa/frontend/PagesTemplates/RegularWebPageTemplate.pug
2
+
3
+
4
+ block append Metadata
5
+
6
+ -
7
+
8
+ RegularWebPageTemplate__YDF.configure({
9
+ metadata: {
10
+ title: "ValidatableControlShell Component Testing"
11
+ },
12
+ scriptsURIs: {
13
+ atEndOfBody: [ "@Workbenches/GUI_Components/Controls/ValidatableControlShell/ValidatableControlShell.workbench" ]
14
+ }
15
+ });
16
+
17
+
18
+ block append PageContent
19
+
20
+ #APPLICATION