tikal-ui-components 0.12.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.
@@ -1,278 +1,1331 @@
1
- import * as i0 from '@angular/core';
2
- import { Pipe, input, output, Component, model, signal } from '@angular/core';
3
- import { PIcon, Spinner, User } from '@primeicons/angular';
4
- import * as i1 from 'primeng/button';
5
- import { ButtonModule } from 'primeng/button';
6
- import * as i1$1 from 'primeng/inputtext';
7
- import { InputTextModule } from 'primeng/inputtext';
8
- import { form, required, maxLength, disabled, FormRoot, FormField } from '@angular/forms/signals';
9
- import * as i1$2 from 'primeng/skeleton';
10
- import { SkeletonModule } from 'primeng/skeleton';
11
- import * as i1$3 from 'primeng/chip';
12
- import { ChipModule } from 'primeng/chip';
13
- import { TranslocoDirective } from '@jsverse/transloco';
14
- import { Crown } from '@primeicons/angular/crown';
15
- import * as i2 from '@angular/forms';
16
- import { FormsModule } from '@angular/forms';
17
- import * as i1$4 from 'primeng/selectbutton';
18
- import { SelectButtonModule } from 'primeng/selectbutton';
19
-
20
- class EnumMapPipe {
21
- transform(value, enumMap, defaultValue) {
22
- return enumMap[value] ?? defaultValue ?? value;
23
- }
24
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EnumMapPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
25
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: EnumMapPipe, isStandalone: true, name: "enumMap" });
26
- }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EnumMapPipe, decorators: [{
28
- type: Pipe,
29
- args: [{
30
- name: 'enumMap',
31
- }]
32
- }] });
33
-
34
- class ButtonComponent {
35
- /** What icon should the button display? */
36
- icon = input('', /* @ts-ignore */
37
- ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
38
- /** What colour should the button be? */
39
- colour = input('primary', /* @ts-ignore */
40
- ...(ngDevMode ? [{ debugName: "colour" }] : /* istanbul ignore next */ []));
41
- /** What size should the button be? */
42
- size = input('normal', /* @ts-ignore */
43
- ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
44
- /** @ignore */
45
- sizeMap = {
46
- normal: undefined,
47
- };
48
- /** What text should the button display? */
49
- label = input(/* @ts-ignore */
50
- ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
51
- /** Is the action related to the button currently running? */
52
- isLoading = input(false, /* @ts-ignore */
53
- ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
54
- /** Should the button have an outline? */
55
- outline = input(false, /* @ts-ignore */
56
- ...(ngDevMode ? [{ debugName: "outline" }] : /* istanbul ignore next */ []));
57
- /** What type should the button be? */
58
- type = input('button', /* @ts-ignore */
59
- ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
60
- /** Should the button only appear as text? */
61
- text = input(false, /* @ts-ignore */
62
- ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
63
- /** @ignore */
64
- clicked = output();
65
- /** What form should the button belong to? */
66
- form = input(/* @ts-ignore */
67
- ...(ngDevMode ? [undefined, { debugName: "form" }] : /* istanbul ignore next */ []));
68
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
69
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: ButtonComponent, isStandalone: true, selector: "tikal-button", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, colour: { classPropertyName: "colour", publicName: "colour", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, outline: { classPropertyName: "outline", publicName: "outline", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<button\n pButton\n [attr.form]=\"form()\"\n [disabled]=\"isLoading()\"\n [iconOnly]=\"!label()\"\n [outlined]=\"outline()\"\n [severity]=\"colour()\"\n [size]=\"size() | enumMap: sizeMap\"\n [type]=\"type()\"\n [variant]=\"text() ? 'text' : undefined\"\n (click)=\"clicked.emit()\"\n>\n @if (isLoading()) {\n <svg data-p-icon=\"spinner\" [spin]=\"true\"></svg>\n } @else if (icon()) {\n <svg [pIcon]=\"icon()\"></svg>\n }\n {{ label() }}\n</button>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i1.ButtonDirective, selector: "[pButton]", inputs: ["pButton", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "link", "rounded", "fluid", "variant", "iconOnly", "loading", "severity"] }, { kind: "component", type: PIcon, selector: "svg[pIcon]", inputs: ["pIcon"] }, { kind: "component", type: Spinner, selector: "svg[data-p-icon=\"spinner\"]" }, { kind: "pipe", type: EnumMapPipe, name: "enumMap" }] });
70
- }
71
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ButtonComponent, decorators: [{
72
- type: Component,
73
- args: [{ selector: 'tikal-button', imports: [ButtonModule, PIcon, EnumMapPipe, Spinner], template: "<button\n pButton\n [attr.form]=\"form()\"\n [disabled]=\"isLoading()\"\n [iconOnly]=\"!label()\"\n [outlined]=\"outline()\"\n [severity]=\"colour()\"\n [size]=\"size() | enumMap: sizeMap\"\n [type]=\"type()\"\n [variant]=\"text() ? 'text' : undefined\"\n (click)=\"clicked.emit()\"\n>\n @if (isLoading()) {\n <svg data-p-icon=\"spinner\" [spin]=\"true\"></svg>\n } @else if (icon()) {\n <svg [pIcon]=\"icon()\"></svg>\n }\n {{ label() }}\n</button>\n" }]
74
- }], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], colour: [{ type: i0.Input, args: [{ isSignal: true, alias: "colour", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }], outline: [{ type: i0.Input, args: [{ isSignal: true, alias: "outline", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], text: [{ type: i0.Input, args: [{ isSignal: true, alias: "text", required: false }] }], clicked: [{ type: i0.Output, args: ["clicked"] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }] } });
75
-
76
- class InputComponent {
77
- /** What value should the input have */
78
- value = model('', /* @ts-ignore */
79
- ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
80
- /** Should the input be disabled */
81
- disabled = input(false, /* @ts-ignore */
82
- ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
83
- /** Is the content of the input invalid? */
84
- invalid = input(false, /* @ts-ignore */
85
- ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
86
- /** Is the input required? */
87
- required = input(false, /* @ts-ignore */
88
- ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
89
- /** Was the input touched */
90
- touched = input(false, /* @ts-ignore */
91
- ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
92
- /** What is the max input length? */
93
- maxLength = input(/* @ts-ignore */
94
- ...(ngDevMode ? [undefined, { debugName: "maxLength" }] : /* istanbul ignore next */ []));
95
- /** What is the label of the input element? */
96
- label = input(/* @ts-ignore */
97
- ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
98
- /** What placeholder should the input display? */
99
- placeholder = input(/* @ts-ignore */
100
- ...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
101
- /** Should the input take the full widht? */
102
- expand = input(false, /* @ts-ignore */
103
- ...(ngDevMode ? [{ debugName: "expand" }] : /* istanbul ignore next */ []));
104
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
105
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: InputComponent, isStandalone: true, selector: "tikal-input", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, expand: { classPropertyName: "expand", publicName: "expand", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, ngImport: i0, template: "<input\n pInputText\n [ariaLabel]=\"label()\"\n [class.full-length]=\"expand()\"\n [disabled]=\"disabled()\"\n [invalid]=\"invalid() && touched()\"\n [maxLength]=\"maxLength()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [value]=\"value()\"\n (input)=\"value.set($event.target.value)\"\n/>\n", styles: [".full-length{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i1$1.InputText, selector: "[pInputText]", inputs: ["hostName", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }] });
106
- }
107
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: InputComponent, decorators: [{
108
- type: Component,
109
- args: [{ selector: 'tikal-input', imports: [InputTextModule], template: "<input\n pInputText\n [ariaLabel]=\"label()\"\n [class.full-length]=\"expand()\"\n [disabled]=\"disabled()\"\n [invalid]=\"invalid() && touched()\"\n [maxLength]=\"maxLength()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [value]=\"value()\"\n (input)=\"value.set($event.target.value)\"\n/>\n", styles: [".full-length{width:100%}\n"] }]
110
- }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], expand: [{ type: i0.Input, args: [{ isSignal: true, alias: "expand", required: false }] }] } });
111
-
112
- class ChatFormComponent {
113
- /** @ignore */
114
- chatFormData = signal({ message: '' }, /* @ts-ignore */
115
- ...(ngDevMode ? [{ debugName: "chatFormData" }] : /* istanbul ignore next */ []));
116
- /** What should happen when the form is submitted? */
117
- onSubmission = input.required(/* @ts-ignore */
118
- ...(ngDevMode ? [{ debugName: "onSubmission" }] : /* istanbul ignore next */ []));
119
- /** What placeholder should be displayed on the input? */
120
- placeholder = input(/* @ts-ignore */
121
- ...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
122
- /** What is the max input length? */
123
- maxLength = input(50, /* @ts-ignore */
124
- ...(ngDevMode ? [{ debugName: "maxLength" }] : /* istanbul ignore next */ []));
125
- /** What is the label of the input element? */
126
- label = input(/* @ts-ignore */
127
- ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
128
- /** @ignore */
129
- chatForm = form(this.chatFormData, (schemaPath) => {
130
- required(schemaPath.message);
131
- maxLength(schemaPath.message, () => this.maxLength());
132
- disabled(schemaPath, { when: () => this.chatForm().submitting() });
133
- }, {
134
- submission: {
135
- action: async (field) => {
136
- const message = field().value().message;
137
- await this.onSubmission()(message);
138
- field.message().reset('');
139
- },
140
- },
141
- });
142
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ChatFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
143
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: ChatFormComponent, isStandalone: true, selector: "tikal-chat-form", inputs: { onSubmission: { classPropertyName: "onSubmission", publicName: "onSubmission", isSignal: true, isRequired: true, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<form [formRoot]=\"chatForm\">\n <tikal-input [formField]=\"chatForm.message\" [label]=\"label()\" [placeholder]=\"placeholder()\" />\n <tikal-button icon=\"send\" type=\"submit\" [isLoading]=\"chatForm().submitting()\" />\n</form>\n", styles: ["form{display:flex;gap:.5rem}\n"], dependencies: [{ kind: "directive", type: FormRoot, selector: "form[formRoot]", inputs: ["formRoot"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "component", type: InputComponent, selector: "tikal-input", inputs: ["value", "disabled", "invalid", "required", "touched", "maxLength", "label", "placeholder", "expand"], outputs: ["valueChange"] }, { kind: "component", type: ButtonComponent, selector: "tikal-button", inputs: ["icon", "colour", "size", "label", "isLoading", "outline", "type", "text", "form"], outputs: ["clicked"] }] });
144
- }
145
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ChatFormComponent, decorators: [{
146
- type: Component,
147
- args: [{ selector: 'tikal-chat-form', imports: [FormRoot, FormField, InputComponent, ButtonComponent], template: "<form [formRoot]=\"chatForm\">\n <tikal-input [formField]=\"chatForm.message\" [label]=\"label()\" [placeholder]=\"placeholder()\" />\n <tikal-button icon=\"send\" type=\"submit\" [isLoading]=\"chatForm().submitting()\" />\n</form>\n", styles: ["form{display:flex;gap:.5rem}\n"] }]
148
- }], propDecorators: { onSubmission: [{ type: i0.Input, args: [{ isSignal: true, alias: "onSubmission", required: true }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }] } });
149
-
150
- class SkeletonComponent {
151
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
152
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.3", type: SkeletonComponent, isStandalone: true, selector: "tikal-skeleton", ngImport: i0, template: "<p-skeleton />\n", styles: [""], dependencies: [{ kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1$2.Skeleton, selector: "p-skeleton", inputs: ["shape", "animation", "borderRadius", "size", "width", "height"] }] });
153
- }
154
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SkeletonComponent, decorators: [{
155
- type: Component,
156
- args: [{ selector: 'tikal-skeleton', imports: [SkeletonModule], template: "<p-skeleton />\n" }]
157
- }] });
158
-
159
- class PlayerCountComponent {
160
- /** How many players are currently in the lobby? */
161
- currentPlayers = input.required(/* @ts-ignore */
162
- ...(ngDevMode ? [{ debugName: "currentPlayers" }] : /* istanbul ignore next */ []));
163
- /** How many players fit in the lobby? */
164
- maxPlayers = input.required(/* @ts-ignore */
165
- ...(ngDevMode ? [{ debugName: "maxPlayers" }] : /* istanbul ignore next */ []));
166
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: PlayerCountComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
167
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: PlayerCountComponent, isStandalone: true, selector: "tikal-player-count", inputs: { currentPlayers: { classPropertyName: "currentPlayers", publicName: "currentPlayers", isSignal: true, isRequired: true, transformFunction: null }, maxPlayers: { classPropertyName: "maxPlayers", publicName: "maxPlayers", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<p>{{ currentPlayers() }}/{{ maxPlayers() }}</p>\n<div class=\"bar\">\n <div\n class=\"bar-fill\"\n [class.full]=\"currentPlayers() >= maxPlayers()\"\n [style.width]=\"(currentPlayers() / maxPlayers()) * 100 + '%'\"\n ></div>\n</div>\n", styles: [":host{display:flex;flex-direction:row;gap:.5rem}p{margin:0}.bar{align-self:center;height:.45rem;width:4rem;border-radius:9999px;background-color:var(--p-surface-300)}.bar-fill{height:100%;border-radius:9999px;background-color:var(--p-green-600)}.full{background-color:var(--p-red-600)}\n"] });
168
- }
169
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: PlayerCountComponent, decorators: [{
170
- type: Component,
171
- args: [{ selector: 'tikal-player-count', imports: [], template: "<p>{{ currentPlayers() }}/{{ maxPlayers() }}</p>\n<div class=\"bar\">\n <div\n class=\"bar-fill\"\n [class.full]=\"currentPlayers() >= maxPlayers()\"\n [style.width]=\"(currentPlayers() / maxPlayers()) * 100 + '%'\"\n ></div>\n</div>\n", styles: [":host{display:flex;flex-direction:row;gap:.5rem}p{margin:0}.bar{align-self:center;height:.45rem;width:4rem;border-radius:9999px;background-color:var(--p-surface-300)}.bar-fill{height:100%;border-radius:9999px;background-color:var(--p-green-600)}.full{background-color:var(--p-red-600)}\n"] }]
172
- }], propDecorators: { currentPlayers: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPlayers", required: true }] }], maxPlayers: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxPlayers", required: true }] }] } });
173
-
174
- class ChipComponent {
175
- /** What icon should the chip display? */
176
- icon = input('', /* @ts-ignore */
177
- ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
178
- /** What text should the chip display? */
179
- label = input.required(/* @ts-ignore */
180
- ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
181
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
182
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: ChipComponent, isStandalone: true, selector: "tikal-chip", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<p-chip [label]=\"label()\">\n @if (icon()) {\n <svg [pIcon]=\"icon()\"></svg>\n }\n</p-chip>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ChipModule }, { kind: "component", type: i1$3.Chip, selector: "p-chip", inputs: ["label", "icon", "image", "alt", "disabled", "removable", "removeIcon", "chipProps"], outputs: ["onRemove", "onImageError"] }, { kind: "component", type: PIcon, selector: "svg[pIcon]", inputs: ["pIcon"] }] });
183
- }
184
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ChipComponent, decorators: [{
185
- type: Component,
186
- args: [{ selector: 'tikal-chip', imports: [ChipModule, PIcon], template: "<p-chip [label]=\"label()\">\n @if (icon()) {\n <svg [pIcon]=\"icon()\"></svg>\n }\n</p-chip>\n" }]
187
- }], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }] } });
188
-
189
- class EmptyPlayerSlotComponent {
190
- /** Is the player currently loading? */
191
- isLoading = input(false, /* @ts-ignore */
192
- ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
193
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EmptyPlayerSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
194
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: EmptyPlayerSlotComponent, isStandalone: true, selector: "tikal-empty-player-slot", inputs: { isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (isLoading()) {\n <tikal-skeleton />\n} @else {\n <ng-container *transloco=\"let t; prefix: 'empty-player-slot'\">\n <span class=\"dot\"></span>\n <p>{{ t('open-slot') }}</p>\n </ng-container>\n}\n", styles: [":host{display:flex;flex-direction:row;align-items:center;height:3.25rem;padding:1rem;gap:.75rem;background-color:var(--p-surface-100)}:host-context(.dark) :host{background-color:var(--p-surface-800)}.dot{width:.75rem;height:.75rem;border-radius:50%;background-color:var(--p-surface-400)}:host-context(.dark) .dot{background-color:var(--p-surface-600)}p{margin:0;color:var(--p-surface-500)}:host-context(.dark) p{color:var(--p-surface-400)}tikal-skeleton{width:100%}\n"], dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: SkeletonComponent, selector: "tikal-skeleton" }] });
195
- }
196
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EmptyPlayerSlotComponent, decorators: [{
197
- type: Component,
198
- args: [{ selector: 'tikal-empty-player-slot', imports: [TranslocoDirective, SkeletonComponent], template: "@if (isLoading()) {\n <tikal-skeleton />\n} @else {\n <ng-container *transloco=\"let t; prefix: 'empty-player-slot'\">\n <span class=\"dot\"></span>\n <p>{{ t('open-slot') }}</p>\n </ng-container>\n}\n", styles: [":host{display:flex;flex-direction:row;align-items:center;height:3.25rem;padding:1rem;gap:.75rem;background-color:var(--p-surface-100)}:host-context(.dark) :host{background-color:var(--p-surface-800)}.dot{width:.75rem;height:.75rem;border-radius:50%;background-color:var(--p-surface-400)}:host-context(.dark) .dot{background-color:var(--p-surface-600)}p{margin:0;color:var(--p-surface-500)}:host-context(.dark) p{color:var(--p-surface-400)}tikal-skeleton{width:100%}\n"] }]
199
- }], propDecorators: { isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }] } });
200
-
201
- class PlayerSlotComponent {
202
- /** What is the name of the player? */
203
- name = input.required(/* @ts-ignore */
204
- ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
205
- /** What is the colour of the player? */
206
- colour = input.required(/* @ts-ignore */
207
- ...(ngDevMode ? [{ debugName: "colour" }] : /* istanbul ignore next */ []));
208
- /** Is the player ready? */
209
- isReady = input.required(/* @ts-ignore */
210
- ...(ngDevMode ? [{ debugName: "isReady" }] : /* istanbul ignore next */ []));
211
- /** Is the player an owner of the lobby? */
212
- isOwner = input.required(/* @ts-ignore */
213
- ...(ngDevMode ? [{ debugName: "isOwner" }] : /* istanbul ignore next */ []));
214
- /** @ignore */
215
- colourMap = {
216
- red: 'var(--p-red-500)',
217
- green: 'var(--p-green-500)',
218
- blue: 'var(--p-blue-500)',
219
- yellow: 'var(--p-yellow-500)',
220
- };
221
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: PlayerSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
222
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: PlayerSlotComponent, isStandalone: true, selector: "tikal-player-slot", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, colour: { classPropertyName: "colour", publicName: "colour", isSignal: true, isRequired: true, transformFunction: null }, isReady: { classPropertyName: "isReady", publicName: "isReady", isSignal: true, isRequired: true, transformFunction: null }, isOwner: { classPropertyName: "isOwner", publicName: "isOwner", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'player-slot'\">\n <div class=\"main-group\">\n <span class=\"dot\" [style.background-color]=\"colour() | enumMap: colourMap\"></span>\n <p>{{ name() }}</p>\n @if (isOwner()) {\n <svg aria-label=\"crown\" color=\"var(--p-yellow-600)\" data-p-icon=\"crown\" [size]=\"20\"></svg>\n }\n </div>\n @if (isReady()) {\n <p class=\"ready\">{{ t('ready') }}</p>\n } @else {\n <p class=\"not-ready\">{{ t('not-ready') }}</p>\n }\n</ng-container>\n", styles: [":host{display:flex;flex-direction:row;justify-content:space-between;height:3.25rem;padding:1rem;background-color:var(--p-surface-100)}:host-context(.dark) :host{background-color:var(--p-surface-800)}.main-group{display:flex;flex-direction:row;align-items:center;gap:.75rem}.dot{width:.75rem;height:.75rem;border-radius:50%}.ready{color:var(--p-green-500)}.not-ready{color:var(--p-red-500)}p{margin:0}\n"], dependencies: [{ kind: "component", type: Crown, selector: "svg[data-p-icon=\"crown\"]" }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "pipe", type: EnumMapPipe, name: "enumMap" }] });
223
- }
224
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: PlayerSlotComponent, decorators: [{
225
- type: Component,
226
- args: [{ selector: 'tikal-player-slot', imports: [EnumMapPipe, Crown, TranslocoDirective], template: "<ng-container *transloco=\"let t; prefix: 'player-slot'\">\n <div class=\"main-group\">\n <span class=\"dot\" [style.background-color]=\"colour() | enumMap: colourMap\"></span>\n <p>{{ name() }}</p>\n @if (isOwner()) {\n <svg aria-label=\"crown\" color=\"var(--p-yellow-600)\" data-p-icon=\"crown\" [size]=\"20\"></svg>\n }\n </div>\n @if (isReady()) {\n <p class=\"ready\">{{ t('ready') }}</p>\n } @else {\n <p class=\"not-ready\">{{ t('not-ready') }}</p>\n }\n</ng-container>\n", styles: [":host{display:flex;flex-direction:row;justify-content:space-between;height:3.25rem;padding:1rem;background-color:var(--p-surface-100)}:host-context(.dark) :host{background-color:var(--p-surface-800)}.main-group{display:flex;flex-direction:row;align-items:center;gap:.75rem}.dot{width:.75rem;height:.75rem;border-radius:50%}.ready{color:var(--p-green-500)}.not-ready{color:var(--p-red-500)}p{margin:0}\n"] }]
227
- }], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], colour: [{ type: i0.Input, args: [{ isSignal: true, alias: "colour", required: true }] }], isReady: [{ type: i0.Input, args: [{ isSignal: true, alias: "isReady", required: true }] }], isOwner: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOwner", required: true }] }] } });
228
-
229
- class PlayerSlotListComponent {
230
- /** How many players fit in the lobby? */
231
- maxPlayers = input.required(/* @ts-ignore */
232
- ...(ngDevMode ? [{ debugName: "maxPlayers" }] : /* istanbul ignore next */ []));
233
- /** What players are currently in the lobby? */
234
- players = input.required(/* @ts-ignore */
235
- ...(ngDevMode ? [{ debugName: "players" }] : /* istanbul ignore next */ []));
236
- /** Are the players currenlty loading? */
237
- isLoading = input(false, /* @ts-ignore */
238
- ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
239
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: PlayerSlotListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
240
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: PlayerSlotListComponent, isStandalone: true, selector: "tikal-player-slot-list", inputs: { maxPlayers: { classPropertyName: "maxPlayers", publicName: "maxPlayers", isSignal: true, isRequired: true, transformFunction: null }, players: { classPropertyName: "players", publicName: "players", isSignal: true, isRequired: true, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'player-slot-list'\">\n <div class=\"header\">\n <span>{{ t('players') }}</span>\n <svg aria-label=\"user\" data-p-icon=\"user\"></svg>\n <span>{{ players().length }}/{{ maxPlayers() }}</span>\n </div>\n <div class=\"players\">\n @if (isLoading()) {\n @for (empty of [].constructor(maxPlayers()); track $index) {\n <tikal-empty-player-slot [isLoading]=\"true\" />\n }\n } @else {\n @for (player of players(); track $index) {\n <tikal-player-slot\n [colour]=\"player.selectedColour\"\n [isOwner]=\"player.isOwner\"\n [isReady]=\"player.isReady\"\n [name]=\"player.name\"\n />\n }\n @for (empty of [].constructor(maxPlayers() - players().length); track $index) {\n <tikal-empty-player-slot />\n }\n }\n </div>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;width:20rem}.players{border:var(--p-content-border-color) solid 1px;border-radius:var(--p-content-border-radius);overflow:hidden}.players>*+*{border-top:var(--p-content-border-color) solid 1px}.header{display:flex;flex-direction:row;align-items:center;gap:.5rem;padding:.5rem .1rem}\n"], dependencies: [{ kind: "component", type: PlayerSlotComponent, selector: "tikal-player-slot", inputs: ["name", "colour", "isReady", "isOwner"] }, { kind: "component", type: EmptyPlayerSlotComponent, selector: "tikal-empty-player-slot", inputs: ["isLoading"] }, { kind: "component", type: User, selector: "svg[data-p-icon=\"user\"]" }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }] });
241
- }
242
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: PlayerSlotListComponent, decorators: [{
243
- type: Component,
244
- args: [{ selector: 'tikal-player-slot-list', imports: [PlayerSlotComponent, EmptyPlayerSlotComponent, User, TranslocoDirective], template: "<ng-container *transloco=\"let t; prefix: 'player-slot-list'\">\n <div class=\"header\">\n <span>{{ t('players') }}</span>\n <svg aria-label=\"user\" data-p-icon=\"user\"></svg>\n <span>{{ players().length }}/{{ maxPlayers() }}</span>\n </div>\n <div class=\"players\">\n @if (isLoading()) {\n @for (empty of [].constructor(maxPlayers()); track $index) {\n <tikal-empty-player-slot [isLoading]=\"true\" />\n }\n } @else {\n @for (player of players(); track $index) {\n <tikal-player-slot\n [colour]=\"player.selectedColour\"\n [isOwner]=\"player.isOwner\"\n [isReady]=\"player.isReady\"\n [name]=\"player.name\"\n />\n }\n @for (empty of [].constructor(maxPlayers() - players().length); track $index) {\n <tikal-empty-player-slot />\n }\n }\n </div>\n</ng-container>\n", styles: [":host{display:flex;flex-direction:column;width:20rem}.players{border:var(--p-content-border-color) solid 1px;border-radius:var(--p-content-border-radius);overflow:hidden}.players>*+*{border-top:var(--p-content-border-color) solid 1px}.header{display:flex;flex-direction:row;align-items:center;gap:.5rem;padding:.5rem .1rem}\n"] }]
245
- }], propDecorators: { maxPlayers: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxPlayers", required: true }] }], players: [{ type: i0.Input, args: [{ isSignal: true, alias: "players", required: true }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }] } });
246
-
247
- class MaxPlayerSelectComponent {
248
- /** What value should the input have? */
249
- value = model(3, /* @ts-ignore */
250
- ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
251
- /** Does the control hold an invalid value? */
252
- invalid = input(false, /* @ts-ignore */
253
- ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
254
- /** @ignore */
255
- options = [
256
- { label: '2', value: 2 },
257
- { label: '3', value: 3 },
258
- { label: '4', value: 4 },
259
- ];
260
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: MaxPlayerSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
261
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.3", type: MaxPlayerSelectComponent, isStandalone: true, selector: "tikal-max-player-select", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, ngImport: i0, template: "<p-selectbutton\n optionLabel=\"label\"\n optionValue=\"value\"\n [invalid]=\"invalid()\"\n [options]=\"options\"\n [(ngModel)]=\"value\"\n/>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: SelectButtonModule }, { kind: "component", type: i1$4.SelectButton, selector: "p-selectbutton, p-select-button", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "unselectable", "tabindex", "multiple", "allowEmpty", "styleClass", "ariaLabelledBy", "dataKey", "autofocus", "size", "fluid"], outputs: ["onOptionClick", "onChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
262
- }
263
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: MaxPlayerSelectComponent, decorators: [{
264
- type: Component,
265
- args: [{ selector: 'tikal-max-player-select', imports: [SelectButtonModule, FormsModule], template: "<p-selectbutton\n optionLabel=\"label\"\n optionValue=\"value\"\n [invalid]=\"invalid()\"\n [options]=\"options\"\n [(ngModel)]=\"value\"\n/>\n" }]
266
- }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }] } });
267
-
268
- /*
269
- * Public API Surface of tikal-ui-components
270
- */
271
- // Button
272
-
273
- /**
274
- * Generated bundle index. Do not edit.
275
- */
276
-
1
+ import * as i0 from "@angular/core";
2
+ import { Component, Pipe, input, model, output, signal } from "@angular/core";
3
+ import * as i1$4 from "@openng/optimus-ui/button";
4
+ import { ButtonModule } from "@openng/optimus-ui/button";
5
+ import * as i1$3 from "@openng/optimus-ui/inputtext";
6
+ import { InputTextModule } from "@openng/optimus-ui/inputtext";
7
+ import { FormField, FormRoot, disabled, form, maxLength, required } from "@angular/forms/signals";
8
+ import * as i1$2 from "@openng/optimus-ui/skeleton";
9
+ import { SkeletonModule } from "@openng/optimus-ui/skeleton";
10
+ import * as i1$1 from "@openng/optimus-ui/chip";
11
+ import { ChipModule } from "@openng/optimus-ui/chip";
12
+ import { TranslocoDirective } from "@jsverse/transloco";
13
+ import * as i2 from "@angular/forms";
14
+ import { FormsModule } from "@angular/forms";
15
+ import * as i1 from "@openng/optimus-ui/selectbutton";
16
+ import { SelectButtonModule } from "@openng/optimus-ui/selectbutton";
17
+ var EnumMapPipe = class EnumMapPipe {
18
+ transform(value, enumMap, defaultValue) {
19
+ return enumMap[value] ?? defaultValue ?? value;
20
+ }
21
+ static ɵfac = i0.ɵɵngDeclareFactory({
22
+ minVersion: "12.0.0",
23
+ version: "22.2.3",
24
+ ngImport: i0,
25
+ type: EnumMapPipe,
26
+ deps: [],
27
+ target: i0.ɵɵFactoryTarget.Pipe
28
+ });
29
+ static ɵpipe = i0.ɵɵngDeclarePipe({
30
+ minVersion: "14.0.0",
31
+ version: "22.2.3",
32
+ ngImport: i0,
33
+ type: EnumMapPipe,
34
+ isStandalone: true,
35
+ name: "enumMap"
36
+ });
37
+ };
38
+ i0.ɵɵngDeclareClassMetadata({
39
+ minVersion: "12.0.0",
40
+ version: "22.2.3",
41
+ ngImport: i0,
42
+ type: EnumMapPipe,
43
+ decorators: [{
44
+ type: Pipe,
45
+ args: [{ name: "enumMap" }]
46
+ }]
47
+ });
48
+ var ButtonComponent = class ButtonComponent {
49
+ icon = input("", ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
50
+ colour = input("primary", ...ngDevMode ? [{ debugName: "colour" }] : /* istanbul ignore next */ []);
51
+ size = input("normal", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
52
+ sizeMap = { normal: void 0 };
53
+ label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
54
+ isLoading = input(false, ...ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []);
55
+ outline = input(false, ...ngDevMode ? [{ debugName: "outline" }] : /* istanbul ignore next */ []);
56
+ type = input("button", ...ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []);
57
+ text = input(false, ...ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []);
58
+ clicked = output();
59
+ form = input(...ngDevMode ? [void 0, { debugName: "form" }] : /* istanbul ignore next */ []);
60
+ static ɵfac = i0.ɵɵngDeclareFactory({
61
+ minVersion: "12.0.0",
62
+ version: "22.2.3",
63
+ ngImport: i0,
64
+ type: ButtonComponent,
65
+ deps: [],
66
+ target: i0.ɵɵFactoryTarget.Component
67
+ });
68
+ static ɵcmp = i0.ɵɵngDeclareComponent({
69
+ minVersion: "17.1.0",
70
+ version: "22.2.3",
71
+ type: ButtonComponent,
72
+ isStandalone: true,
73
+ selector: "tikal-button",
74
+ inputs: {
75
+ icon: {
76
+ classPropertyName: "icon",
77
+ publicName: "icon",
78
+ isSignal: true,
79
+ isRequired: false,
80
+ transformFunction: null
81
+ },
82
+ colour: {
83
+ classPropertyName: "colour",
84
+ publicName: "colour",
85
+ isSignal: true,
86
+ isRequired: false,
87
+ transformFunction: null
88
+ },
89
+ size: {
90
+ classPropertyName: "size",
91
+ publicName: "size",
92
+ isSignal: true,
93
+ isRequired: false,
94
+ transformFunction: null
95
+ },
96
+ label: {
97
+ classPropertyName: "label",
98
+ publicName: "label",
99
+ isSignal: true,
100
+ isRequired: false,
101
+ transformFunction: null
102
+ },
103
+ isLoading: {
104
+ classPropertyName: "isLoading",
105
+ publicName: "isLoading",
106
+ isSignal: true,
107
+ isRequired: false,
108
+ transformFunction: null
109
+ },
110
+ outline: {
111
+ classPropertyName: "outline",
112
+ publicName: "outline",
113
+ isSignal: true,
114
+ isRequired: false,
115
+ transformFunction: null
116
+ },
117
+ type: {
118
+ classPropertyName: "type",
119
+ publicName: "type",
120
+ isSignal: true,
121
+ isRequired: false,
122
+ transformFunction: null
123
+ },
124
+ text: {
125
+ classPropertyName: "text",
126
+ publicName: "text",
127
+ isSignal: true,
128
+ isRequired: false,
129
+ transformFunction: null
130
+ },
131
+ form: {
132
+ classPropertyName: "form",
133
+ publicName: "form",
134
+ isSignal: true,
135
+ isRequired: false,
136
+ transformFunction: null
137
+ }
138
+ },
139
+ outputs: { clicked: "clicked" },
140
+ ngImport: i0,
141
+ template: "<p-button\n [attr.form]=\"form()\"\n [disabled]=\"isLoading()\"\n [icon]=\"'pi pi-' + icon()\"\n [label]=\"label()\"\n [loading]=\"isLoading()\"\n [outlined]=\"outline()\"\n [severity]=\"colour()\"\n [size]=\"size() | enumMap: sizeMap\"\n [type]=\"type()\"\n [variant]=\"text() ? 'text' : undefined\"\n (click)=\"clicked.emit()\"\n/>\n",
142
+ styles: [""],
143
+ dependencies: [
144
+ {
145
+ kind: "ngmodule",
146
+ type: ButtonModule
147
+ },
148
+ {
149
+ kind: "component",
150
+ type: i1$4.Button,
151
+ selector: "p-button",
152
+ inputs: [
153
+ "hostName",
154
+ "type",
155
+ "badge",
156
+ "disabled",
157
+ "raised",
158
+ "rounded",
159
+ "text",
160
+ "plain",
161
+ "outlined",
162
+ "link",
163
+ "tabindex",
164
+ "size",
165
+ "variant",
166
+ "style",
167
+ "styleClass",
168
+ "badgeClass",
169
+ "badgeSeverity",
170
+ "ariaLabel",
171
+ "autofocus",
172
+ "iconPos",
173
+ "icon",
174
+ "label",
175
+ "loading",
176
+ "loadingIcon",
177
+ "severity",
178
+ "buttonProps",
179
+ "fluid"
180
+ ],
181
+ outputs: [
182
+ "onClick",
183
+ "onFocus",
184
+ "onBlur"
185
+ ]
186
+ },
187
+ {
188
+ kind: "pipe",
189
+ type: EnumMapPipe,
190
+ name: "enumMap"
191
+ }
192
+ ]
193
+ });
194
+ };
195
+ i0.ɵɵngDeclareClassMetadata({
196
+ minVersion: "12.0.0",
197
+ version: "22.2.3",
198
+ ngImport: i0,
199
+ type: ButtonComponent,
200
+ decorators: [{
201
+ type: Component,
202
+ args: [{
203
+ selector: "tikal-button",
204
+ imports: [ButtonModule, EnumMapPipe],
205
+ template: "<p-button\n [attr.form]=\"form()\"\n [disabled]=\"isLoading()\"\n [icon]=\"'pi pi-' + icon()\"\n [label]=\"label()\"\n [loading]=\"isLoading()\"\n [outlined]=\"outline()\"\n [severity]=\"colour()\"\n [size]=\"size() | enumMap: sizeMap\"\n [type]=\"type()\"\n [variant]=\"text() ? 'text' : undefined\"\n (click)=\"clicked.emit()\"\n/>\n"
206
+ }]
207
+ }],
208
+ propDecorators: {
209
+ icon: [{
210
+ type: i0.Input,
211
+ args: [{
212
+ isSignal: true,
213
+ alias: "icon",
214
+ required: false
215
+ }]
216
+ }],
217
+ colour: [{
218
+ type: i0.Input,
219
+ args: [{
220
+ isSignal: true,
221
+ alias: "colour",
222
+ required: false
223
+ }]
224
+ }],
225
+ size: [{
226
+ type: i0.Input,
227
+ args: [{
228
+ isSignal: true,
229
+ alias: "size",
230
+ required: false
231
+ }]
232
+ }],
233
+ label: [{
234
+ type: i0.Input,
235
+ args: [{
236
+ isSignal: true,
237
+ alias: "label",
238
+ required: false
239
+ }]
240
+ }],
241
+ isLoading: [{
242
+ type: i0.Input,
243
+ args: [{
244
+ isSignal: true,
245
+ alias: "isLoading",
246
+ required: false
247
+ }]
248
+ }],
249
+ outline: [{
250
+ type: i0.Input,
251
+ args: [{
252
+ isSignal: true,
253
+ alias: "outline",
254
+ required: false
255
+ }]
256
+ }],
257
+ type: [{
258
+ type: i0.Input,
259
+ args: [{
260
+ isSignal: true,
261
+ alias: "type",
262
+ required: false
263
+ }]
264
+ }],
265
+ text: [{
266
+ type: i0.Input,
267
+ args: [{
268
+ isSignal: true,
269
+ alias: "text",
270
+ required: false
271
+ }]
272
+ }],
273
+ clicked: [{
274
+ type: i0.Output,
275
+ args: ["clicked"]
276
+ }],
277
+ form: [{
278
+ type: i0.Input,
279
+ args: [{
280
+ isSignal: true,
281
+ alias: "form",
282
+ required: false
283
+ }]
284
+ }]
285
+ }
286
+ });
287
+ var InputComponent = class InputComponent {
288
+ value = model("", ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
289
+ disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
290
+ invalid = input(false, ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
291
+ required = input(false, ...ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []);
292
+ touched = input(false, ...ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []);
293
+ maxLength = input(...ngDevMode ? [void 0, { debugName: "maxLength" }] : /* istanbul ignore next */ []);
294
+ label = input(...ngDevMode ? [void 0, { debugName: "label" }] : /* istanbul ignore next */ []);
295
+ placeholder = input(...ngDevMode ? [void 0, { debugName: "placeholder" }] : /* istanbul ignore next */ []);
296
+ expand = input(false, ...ngDevMode ? [{ debugName: "expand" }] : /* istanbul ignore next */ []);
297
+ static ɵfac = i0.ɵɵngDeclareFactory({
298
+ minVersion: "12.0.0",
299
+ version: "22.2.3",
300
+ ngImport: i0,
301
+ type: InputComponent,
302
+ deps: [],
303
+ target: i0.ɵɵFactoryTarget.Component
304
+ });
305
+ static ɵcmp = i0.ɵɵngDeclareComponent({
306
+ minVersion: "17.1.0",
307
+ version: "22.2.3",
308
+ type: InputComponent,
309
+ isStandalone: true,
310
+ selector: "tikal-input",
311
+ inputs: {
312
+ value: {
313
+ classPropertyName: "value",
314
+ publicName: "value",
315
+ isSignal: true,
316
+ isRequired: false,
317
+ transformFunction: null
318
+ },
319
+ disabled: {
320
+ classPropertyName: "disabled",
321
+ publicName: "disabled",
322
+ isSignal: true,
323
+ isRequired: false,
324
+ transformFunction: null
325
+ },
326
+ invalid: {
327
+ classPropertyName: "invalid",
328
+ publicName: "invalid",
329
+ isSignal: true,
330
+ isRequired: false,
331
+ transformFunction: null
332
+ },
333
+ required: {
334
+ classPropertyName: "required",
335
+ publicName: "required",
336
+ isSignal: true,
337
+ isRequired: false,
338
+ transformFunction: null
339
+ },
340
+ touched: {
341
+ classPropertyName: "touched",
342
+ publicName: "touched",
343
+ isSignal: true,
344
+ isRequired: false,
345
+ transformFunction: null
346
+ },
347
+ maxLength: {
348
+ classPropertyName: "maxLength",
349
+ publicName: "maxLength",
350
+ isSignal: true,
351
+ isRequired: false,
352
+ transformFunction: null
353
+ },
354
+ label: {
355
+ classPropertyName: "label",
356
+ publicName: "label",
357
+ isSignal: true,
358
+ isRequired: false,
359
+ transformFunction: null
360
+ },
361
+ placeholder: {
362
+ classPropertyName: "placeholder",
363
+ publicName: "placeholder",
364
+ isSignal: true,
365
+ isRequired: false,
366
+ transformFunction: null
367
+ },
368
+ expand: {
369
+ classPropertyName: "expand",
370
+ publicName: "expand",
371
+ isSignal: true,
372
+ isRequired: false,
373
+ transformFunction: null
374
+ }
375
+ },
376
+ outputs: { value: "valueChange" },
377
+ ngImport: i0,
378
+ template: "<input\n pInputText\n [ariaLabel]=\"label()\"\n [class.full-length]=\"expand()\"\n [disabled]=\"disabled()\"\n [invalid]=\"invalid() && touched()\"\n [maxLength]=\"maxLength()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [value]=\"value()\"\n (input)=\"value.set($event.target.value)\"\n/>\n",
379
+ styles: [".full-length{width:100%}\n"],
380
+ dependencies: [{
381
+ kind: "ngmodule",
382
+ type: InputTextModule
383
+ }, {
384
+ kind: "directive",
385
+ type: i1$3.InputText,
386
+ selector: "[pInputText]",
387
+ inputs: [
388
+ "hostName",
389
+ "ptInputText",
390
+ "pInputTextPT",
391
+ "pInputTextUnstyled",
392
+ "pSize",
393
+ "variant",
394
+ "fluid",
395
+ "invalid"
396
+ ]
397
+ }]
398
+ });
399
+ };
400
+ i0.ɵɵngDeclareClassMetadata({
401
+ minVersion: "12.0.0",
402
+ version: "22.2.3",
403
+ ngImport: i0,
404
+ type: InputComponent,
405
+ decorators: [{
406
+ type: Component,
407
+ args: [{
408
+ selector: "tikal-input",
409
+ imports: [InputTextModule],
410
+ template: "<input\n pInputText\n [ariaLabel]=\"label()\"\n [class.full-length]=\"expand()\"\n [disabled]=\"disabled()\"\n [invalid]=\"invalid() && touched()\"\n [maxLength]=\"maxLength()\"\n [placeholder]=\"placeholder()\"\n [required]=\"required()\"\n [value]=\"value()\"\n (input)=\"value.set($event.target.value)\"\n/>\n",
411
+ styles: [".full-length{width:100%}\n"]
412
+ }]
413
+ }],
414
+ propDecorators: {
415
+ value: [{
416
+ type: i0.Input,
417
+ args: [{
418
+ isSignal: true,
419
+ alias: "value",
420
+ required: false
421
+ }]
422
+ }, {
423
+ type: i0.Output,
424
+ args: ["valueChange"]
425
+ }],
426
+ disabled: [{
427
+ type: i0.Input,
428
+ args: [{
429
+ isSignal: true,
430
+ alias: "disabled",
431
+ required: false
432
+ }]
433
+ }],
434
+ invalid: [{
435
+ type: i0.Input,
436
+ args: [{
437
+ isSignal: true,
438
+ alias: "invalid",
439
+ required: false
440
+ }]
441
+ }],
442
+ required: [{
443
+ type: i0.Input,
444
+ args: [{
445
+ isSignal: true,
446
+ alias: "required",
447
+ required: false
448
+ }]
449
+ }],
450
+ touched: [{
451
+ type: i0.Input,
452
+ args: [{
453
+ isSignal: true,
454
+ alias: "touched",
455
+ required: false
456
+ }]
457
+ }],
458
+ maxLength: [{
459
+ type: i0.Input,
460
+ args: [{
461
+ isSignal: true,
462
+ alias: "maxLength",
463
+ required: false
464
+ }]
465
+ }],
466
+ label: [{
467
+ type: i0.Input,
468
+ args: [{
469
+ isSignal: true,
470
+ alias: "label",
471
+ required: false
472
+ }]
473
+ }],
474
+ placeholder: [{
475
+ type: i0.Input,
476
+ args: [{
477
+ isSignal: true,
478
+ alias: "placeholder",
479
+ required: false
480
+ }]
481
+ }],
482
+ expand: [{
483
+ type: i0.Input,
484
+ args: [{
485
+ isSignal: true,
486
+ alias: "expand",
487
+ required: false
488
+ }]
489
+ }]
490
+ }
491
+ });
492
+ var ChatFormComponent = class ChatFormComponent {
493
+ chatFormData = signal({ message: "" }, ...ngDevMode ? [{ debugName: "chatFormData" }] : /* istanbul ignore next */ []);
494
+ onSubmission = input.required(...ngDevMode ? [{ debugName: "onSubmission" }] : /* istanbul ignore next */ []);
495
+ placeholder = input(...ngDevMode ? [void 0, { debugName: "placeholder" }] : /* istanbul ignore next */ []);
496
+ maxLength = input(50, ...ngDevMode ? [{ debugName: "maxLength" }] : /* istanbul ignore next */ []);
497
+ label = input(...ngDevMode ? [void 0, { debugName: "label" }] : /* istanbul ignore next */ []);
498
+ chatForm = form(this.chatFormData, (schemaPath) => {
499
+ required(schemaPath.message);
500
+ maxLength(schemaPath.message, () => this.maxLength());
501
+ disabled(schemaPath, { when: () => this.chatForm().submitting() });
502
+ }, { submission: { action: async (field) => {
503
+ const message = field().value().message;
504
+ await this.onSubmission()(message);
505
+ field.message().reset("");
506
+ } } });
507
+ static ɵfac = i0.ɵɵngDeclareFactory({
508
+ minVersion: "12.0.0",
509
+ version: "22.2.3",
510
+ ngImport: i0,
511
+ type: ChatFormComponent,
512
+ deps: [],
513
+ target: i0.ɵɵFactoryTarget.Component
514
+ });
515
+ static ɵcmp = i0.ɵɵngDeclareComponent({
516
+ minVersion: "17.1.0",
517
+ version: "22.2.3",
518
+ type: ChatFormComponent,
519
+ isStandalone: true,
520
+ selector: "tikal-chat-form",
521
+ inputs: {
522
+ onSubmission: {
523
+ classPropertyName: "onSubmission",
524
+ publicName: "onSubmission",
525
+ isSignal: true,
526
+ isRequired: true,
527
+ transformFunction: null
528
+ },
529
+ placeholder: {
530
+ classPropertyName: "placeholder",
531
+ publicName: "placeholder",
532
+ isSignal: true,
533
+ isRequired: false,
534
+ transformFunction: null
535
+ },
536
+ maxLength: {
537
+ classPropertyName: "maxLength",
538
+ publicName: "maxLength",
539
+ isSignal: true,
540
+ isRequired: false,
541
+ transformFunction: null
542
+ },
543
+ label: {
544
+ classPropertyName: "label",
545
+ publicName: "label",
546
+ isSignal: true,
547
+ isRequired: false,
548
+ transformFunction: null
549
+ }
550
+ },
551
+ ngImport: i0,
552
+ template: "<form [formRoot]=\"chatForm\">\n <tikal-input [formField]=\"chatForm.message\" [label]=\"label()\" [placeholder]=\"placeholder()\" />\n <tikal-button icon=\"send\" type=\"submit\" [isLoading]=\"chatForm().submitting()\" />\n</form>\n",
553
+ styles: ["form{display:flex;gap:.5rem}\n"],
554
+ dependencies: [
555
+ {
556
+ kind: "directive",
557
+ type: FormRoot,
558
+ selector: "form[formRoot]",
559
+ inputs: ["formRoot"]
560
+ },
561
+ {
562
+ kind: "directive",
563
+ type: FormField,
564
+ selector: "[formField]",
565
+ inputs: ["formField"],
566
+ exportAs: ["formField"]
567
+ },
568
+ {
569
+ kind: "component",
570
+ type: InputComponent,
571
+ selector: "tikal-input",
572
+ inputs: [
573
+ "value",
574
+ "disabled",
575
+ "invalid",
576
+ "required",
577
+ "touched",
578
+ "maxLength",
579
+ "label",
580
+ "placeholder",
581
+ "expand"
582
+ ],
583
+ outputs: ["valueChange"]
584
+ },
585
+ {
586
+ kind: "component",
587
+ type: ButtonComponent,
588
+ selector: "tikal-button",
589
+ inputs: [
590
+ "icon",
591
+ "colour",
592
+ "size",
593
+ "label",
594
+ "isLoading",
595
+ "outline",
596
+ "type",
597
+ "text",
598
+ "form"
599
+ ],
600
+ outputs: ["clicked"]
601
+ }
602
+ ]
603
+ });
604
+ };
605
+ i0.ɵɵngDeclareClassMetadata({
606
+ minVersion: "12.0.0",
607
+ version: "22.2.3",
608
+ ngImport: i0,
609
+ type: ChatFormComponent,
610
+ decorators: [{
611
+ type: Component,
612
+ args: [{
613
+ selector: "tikal-chat-form",
614
+ imports: [
615
+ FormRoot,
616
+ FormField,
617
+ InputComponent,
618
+ ButtonComponent
619
+ ],
620
+ template: "<form [formRoot]=\"chatForm\">\n <tikal-input [formField]=\"chatForm.message\" [label]=\"label()\" [placeholder]=\"placeholder()\" />\n <tikal-button icon=\"send\" type=\"submit\" [isLoading]=\"chatForm().submitting()\" />\n</form>\n",
621
+ styles: ["form{display:flex;gap:.5rem}\n"]
622
+ }]
623
+ }],
624
+ propDecorators: {
625
+ onSubmission: [{
626
+ type: i0.Input,
627
+ args: [{
628
+ isSignal: true,
629
+ alias: "onSubmission",
630
+ required: true
631
+ }]
632
+ }],
633
+ placeholder: [{
634
+ type: i0.Input,
635
+ args: [{
636
+ isSignal: true,
637
+ alias: "placeholder",
638
+ required: false
639
+ }]
640
+ }],
641
+ maxLength: [{
642
+ type: i0.Input,
643
+ args: [{
644
+ isSignal: true,
645
+ alias: "maxLength",
646
+ required: false
647
+ }]
648
+ }],
649
+ label: [{
650
+ type: i0.Input,
651
+ args: [{
652
+ isSignal: true,
653
+ alias: "label",
654
+ required: false
655
+ }]
656
+ }]
657
+ }
658
+ });
659
+ var SkeletonComponent = class SkeletonComponent {
660
+ static ɵfac = i0.ɵɵngDeclareFactory({
661
+ minVersion: "12.0.0",
662
+ version: "22.2.3",
663
+ ngImport: i0,
664
+ type: SkeletonComponent,
665
+ deps: [],
666
+ target: i0.ɵɵFactoryTarget.Component
667
+ });
668
+ static ɵcmp = i0.ɵɵngDeclareComponent({
669
+ minVersion: "14.0.0",
670
+ version: "22.2.3",
671
+ type: SkeletonComponent,
672
+ isStandalone: true,
673
+ selector: "tikal-skeleton",
674
+ ngImport: i0,
675
+ template: "<p-skeleton />\n",
676
+ styles: [""],
677
+ dependencies: [{
678
+ kind: "ngmodule",
679
+ type: SkeletonModule
680
+ }, {
681
+ kind: "component",
682
+ type: i1$2.Skeleton,
683
+ selector: "p-skeleton",
684
+ inputs: [
685
+ "styleClass",
686
+ "shape",
687
+ "animation",
688
+ "borderRadius",
689
+ "size",
690
+ "width",
691
+ "height"
692
+ ]
693
+ }]
694
+ });
695
+ };
696
+ i0.ɵɵngDeclareClassMetadata({
697
+ minVersion: "12.0.0",
698
+ version: "22.2.3",
699
+ ngImport: i0,
700
+ type: SkeletonComponent,
701
+ decorators: [{
702
+ type: Component,
703
+ args: [{
704
+ selector: "tikal-skeleton",
705
+ imports: [SkeletonModule],
706
+ template: "<p-skeleton />\n"
707
+ }]
708
+ }]
709
+ });
710
+ var PlayerCountComponent = class PlayerCountComponent {
711
+ currentPlayers = input.required(...ngDevMode ? [{ debugName: "currentPlayers" }] : /* istanbul ignore next */ []);
712
+ maxPlayers = input.required(...ngDevMode ? [{ debugName: "maxPlayers" }] : /* istanbul ignore next */ []);
713
+ static ɵfac = i0.ɵɵngDeclareFactory({
714
+ minVersion: "12.0.0",
715
+ version: "22.2.3",
716
+ ngImport: i0,
717
+ type: PlayerCountComponent,
718
+ deps: [],
719
+ target: i0.ɵɵFactoryTarget.Component
720
+ });
721
+ static ɵcmp = i0.ɵɵngDeclareComponent({
722
+ minVersion: "17.1.0",
723
+ version: "22.2.3",
724
+ type: PlayerCountComponent,
725
+ isStandalone: true,
726
+ selector: "tikal-player-count",
727
+ inputs: {
728
+ currentPlayers: {
729
+ classPropertyName: "currentPlayers",
730
+ publicName: "currentPlayers",
731
+ isSignal: true,
732
+ isRequired: true,
733
+ transformFunction: null
734
+ },
735
+ maxPlayers: {
736
+ classPropertyName: "maxPlayers",
737
+ publicName: "maxPlayers",
738
+ isSignal: true,
739
+ isRequired: true,
740
+ transformFunction: null
741
+ }
742
+ },
743
+ ngImport: i0,
744
+ template: "<p>{{ currentPlayers() }}/{{ maxPlayers() }}</p>\n<div class=\"bar\">\n <div\n class=\"bar-fill\"\n [class.full]=\"currentPlayers() >= maxPlayers()\"\n [style.width]=\"(currentPlayers() / maxPlayers()) * 100 + '%'\"\n ></div>\n</div>\n",
745
+ styles: [":host{display:flex;flex-direction:row;gap:.5rem}p{margin:0}.bar{align-self:center;height:.45rem;width:4rem;border-radius:9999px;background-color:var(--p-surface-300)}.bar-fill{height:100%;border-radius:9999px;background-color:var(--p-green-600)}.full{background-color:var(--p-red-600)}\n"]
746
+ });
747
+ };
748
+ i0.ɵɵngDeclareClassMetadata({
749
+ minVersion: "12.0.0",
750
+ version: "22.2.3",
751
+ ngImport: i0,
752
+ type: PlayerCountComponent,
753
+ decorators: [{
754
+ type: Component,
755
+ args: [{
756
+ selector: "tikal-player-count",
757
+ imports: [],
758
+ template: "<p>{{ currentPlayers() }}/{{ maxPlayers() }}</p>\n<div class=\"bar\">\n <div\n class=\"bar-fill\"\n [class.full]=\"currentPlayers() >= maxPlayers()\"\n [style.width]=\"(currentPlayers() / maxPlayers()) * 100 + '%'\"\n ></div>\n</div>\n",
759
+ styles: [":host{display:flex;flex-direction:row;gap:.5rem}p{margin:0}.bar{align-self:center;height:.45rem;width:4rem;border-radius:9999px;background-color:var(--p-surface-300)}.bar-fill{height:100%;border-radius:9999px;background-color:var(--p-green-600)}.full{background-color:var(--p-red-600)}\n"]
760
+ }]
761
+ }],
762
+ propDecorators: {
763
+ currentPlayers: [{
764
+ type: i0.Input,
765
+ args: [{
766
+ isSignal: true,
767
+ alias: "currentPlayers",
768
+ required: true
769
+ }]
770
+ }],
771
+ maxPlayers: [{
772
+ type: i0.Input,
773
+ args: [{
774
+ isSignal: true,
775
+ alias: "maxPlayers",
776
+ required: true
777
+ }]
778
+ }]
779
+ }
780
+ });
781
+ var ChipComponent = class ChipComponent {
782
+ icon = input("", ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
783
+ label = input.required(...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
784
+ static ɵfac = i0.ɵɵngDeclareFactory({
785
+ minVersion: "12.0.0",
786
+ version: "22.2.3",
787
+ ngImport: i0,
788
+ type: ChipComponent,
789
+ deps: [],
790
+ target: i0.ɵɵFactoryTarget.Component
791
+ });
792
+ static ɵcmp = i0.ɵɵngDeclareComponent({
793
+ minVersion: "17.1.0",
794
+ version: "22.2.3",
795
+ type: ChipComponent,
796
+ isStandalone: true,
797
+ selector: "tikal-chip",
798
+ inputs: {
799
+ icon: {
800
+ classPropertyName: "icon",
801
+ publicName: "icon",
802
+ isSignal: true,
803
+ isRequired: false,
804
+ transformFunction: null
805
+ },
806
+ label: {
807
+ classPropertyName: "label",
808
+ publicName: "label",
809
+ isSignal: true,
810
+ isRequired: true,
811
+ transformFunction: null
812
+ }
813
+ },
814
+ ngImport: i0,
815
+ template: "<p-chip [icon]=\"icon() ? 'pi pi-' + icon() : undefined\" [label]=\"label()\" />\n",
816
+ styles: [""],
817
+ dependencies: [{
818
+ kind: "ngmodule",
819
+ type: ChipModule
820
+ }, {
821
+ kind: "component",
822
+ type: i1$1.Chip,
823
+ selector: "p-chip",
824
+ inputs: [
825
+ "label",
826
+ "icon",
827
+ "image",
828
+ "alt",
829
+ "styleClass",
830
+ "disabled",
831
+ "removable",
832
+ "removeIcon",
833
+ "chipProps"
834
+ ],
835
+ outputs: ["onRemove", "onImageError"]
836
+ }]
837
+ });
838
+ };
839
+ i0.ɵɵngDeclareClassMetadata({
840
+ minVersion: "12.0.0",
841
+ version: "22.2.3",
842
+ ngImport: i0,
843
+ type: ChipComponent,
844
+ decorators: [{
845
+ type: Component,
846
+ args: [{
847
+ selector: "tikal-chip",
848
+ imports: [ChipModule],
849
+ template: "<p-chip [icon]=\"icon() ? 'pi pi-' + icon() : undefined\" [label]=\"label()\" />\n"
850
+ }]
851
+ }],
852
+ propDecorators: {
853
+ icon: [{
854
+ type: i0.Input,
855
+ args: [{
856
+ isSignal: true,
857
+ alias: "icon",
858
+ required: false
859
+ }]
860
+ }],
861
+ label: [{
862
+ type: i0.Input,
863
+ args: [{
864
+ isSignal: true,
865
+ alias: "label",
866
+ required: true
867
+ }]
868
+ }]
869
+ }
870
+ });
871
+ var EmptyPlayerSlotComponent = class EmptyPlayerSlotComponent {
872
+ isLoading = input(false, ...ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []);
873
+ static ɵfac = i0.ɵɵngDeclareFactory({
874
+ minVersion: "12.0.0",
875
+ version: "22.2.3",
876
+ ngImport: i0,
877
+ type: EmptyPlayerSlotComponent,
878
+ deps: [],
879
+ target: i0.ɵɵFactoryTarget.Component
880
+ });
881
+ static ɵcmp = i0.ɵɵngDeclareComponent({
882
+ minVersion: "17.0.0",
883
+ version: "22.2.3",
884
+ type: EmptyPlayerSlotComponent,
885
+ isStandalone: true,
886
+ selector: "tikal-empty-player-slot",
887
+ inputs: { isLoading: {
888
+ classPropertyName: "isLoading",
889
+ publicName: "isLoading",
890
+ isSignal: true,
891
+ isRequired: false,
892
+ transformFunction: null
893
+ } },
894
+ ngImport: i0,
895
+ template: "@if (isLoading()) {\n <tikal-skeleton />\n} @else {\n <ng-container *transloco=\"let t; prefix: 'empty-player-slot'\">\n <span class=\"dot\"></span>\n <p>{{ t('open-slot') }}</p>\n </ng-container>\n}\n",
896
+ styles: [":host{display:flex;flex-direction:row;align-items:center;height:3.25rem;padding:1rem;gap:.75rem;background-color:var(--p-surface-100)}:host-context(.dark) :host{background-color:var(--p-surface-800)}.dot{width:.75rem;height:.75rem;border-radius:50%;background-color:var(--p-surface-400)}:host-context(.dark) .dot{background-color:var(--p-surface-600)}p{margin:0;color:var(--p-surface-500)}:host-context(.dark) p{color:var(--p-surface-400)}tikal-skeleton{width:100%}\n"],
897
+ dependencies: [{
898
+ kind: "directive",
899
+ type: TranslocoDirective,
900
+ selector: "[transloco]",
901
+ inputs: [
902
+ "transloco",
903
+ "translocoParams",
904
+ "translocoScope",
905
+ "translocoRead",
906
+ "translocoPrefix",
907
+ "translocoLang",
908
+ "translocoLoadingTpl"
909
+ ]
910
+ }, {
911
+ kind: "component",
912
+ type: SkeletonComponent,
913
+ selector: "tikal-skeleton"
914
+ }]
915
+ });
916
+ };
917
+ i0.ɵɵngDeclareClassMetadata({
918
+ minVersion: "12.0.0",
919
+ version: "22.2.3",
920
+ ngImport: i0,
921
+ type: EmptyPlayerSlotComponent,
922
+ decorators: [{
923
+ type: Component,
924
+ args: [{
925
+ selector: "tikal-empty-player-slot",
926
+ imports: [TranslocoDirective, SkeletonComponent],
927
+ template: "@if (isLoading()) {\n <tikal-skeleton />\n} @else {\n <ng-container *transloco=\"let t; prefix: 'empty-player-slot'\">\n <span class=\"dot\"></span>\n <p>{{ t('open-slot') }}</p>\n </ng-container>\n}\n",
928
+ styles: [":host{display:flex;flex-direction:row;align-items:center;height:3.25rem;padding:1rem;gap:.75rem;background-color:var(--p-surface-100)}:host-context(.dark) :host{background-color:var(--p-surface-800)}.dot{width:.75rem;height:.75rem;border-radius:50%;background-color:var(--p-surface-400)}:host-context(.dark) .dot{background-color:var(--p-surface-600)}p{margin:0;color:var(--p-surface-500)}:host-context(.dark) p{color:var(--p-surface-400)}tikal-skeleton{width:100%}\n"]
929
+ }]
930
+ }],
931
+ propDecorators: { isLoading: [{
932
+ type: i0.Input,
933
+ args: [{
934
+ isSignal: true,
935
+ alias: "isLoading",
936
+ required: false
937
+ }]
938
+ }] }
939
+ });
940
+ var PlayerSlotComponent = class PlayerSlotComponent {
941
+ name = input.required(...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
942
+ colour = input.required(...ngDevMode ? [{ debugName: "colour" }] : /* istanbul ignore next */ []);
943
+ isReady = input.required(...ngDevMode ? [{ debugName: "isReady" }] : /* istanbul ignore next */ []);
944
+ isOwner = input.required(...ngDevMode ? [{ debugName: "isOwner" }] : /* istanbul ignore next */ []);
945
+ colourMap = {
946
+ red: "var(--p-red-500)",
947
+ green: "var(--p-green-500)",
948
+ blue: "var(--p-blue-500)",
949
+ yellow: "var(--p-yellow-500)"
950
+ };
951
+ static ɵfac = i0.ɵɵngDeclareFactory({
952
+ minVersion: "12.0.0",
953
+ version: "22.2.3",
954
+ ngImport: i0,
955
+ type: PlayerSlotComponent,
956
+ deps: [],
957
+ target: i0.ɵɵFactoryTarget.Component
958
+ });
959
+ static ɵcmp = i0.ɵɵngDeclareComponent({
960
+ minVersion: "17.0.0",
961
+ version: "22.2.3",
962
+ type: PlayerSlotComponent,
963
+ isStandalone: true,
964
+ selector: "tikal-player-slot",
965
+ inputs: {
966
+ name: {
967
+ classPropertyName: "name",
968
+ publicName: "name",
969
+ isSignal: true,
970
+ isRequired: true,
971
+ transformFunction: null
972
+ },
973
+ colour: {
974
+ classPropertyName: "colour",
975
+ publicName: "colour",
976
+ isSignal: true,
977
+ isRequired: true,
978
+ transformFunction: null
979
+ },
980
+ isReady: {
981
+ classPropertyName: "isReady",
982
+ publicName: "isReady",
983
+ isSignal: true,
984
+ isRequired: true,
985
+ transformFunction: null
986
+ },
987
+ isOwner: {
988
+ classPropertyName: "isOwner",
989
+ publicName: "isOwner",
990
+ isSignal: true,
991
+ isRequired: true,
992
+ transformFunction: null
993
+ }
994
+ },
995
+ ngImport: i0,
996
+ template: "<ng-container *transloco=\"let t; prefix: 'player-slot'\">\n <div class=\"main-group\">\n <span class=\"dot\" [style.background-color]=\"colour() | enumMap: colourMap\"></span>\n <p>{{ name() }}</p>\n @if (isOwner()) {\n <i class=\"pi pi-crown\" style=\"color: var(--p-yellow-600)\"></i>\n }\n </div>\n @if (isReady()) {\n <p class=\"ready\">{{ t('ready') }}</p>\n } @else {\n <p class=\"not-ready\">{{ t('not-ready') }}</p>\n }\n</ng-container>\n",
997
+ styles: [":host{display:flex;flex-direction:row;justify-content:space-between;height:3.25rem;padding:1rem;background-color:var(--p-surface-100)}:host-context(.dark) :host{background-color:var(--p-surface-800)}.main-group{display:flex;flex-direction:row;align-items:center;gap:.75rem}.dot{width:.75rem;height:.75rem;border-radius:50%}.ready{color:var(--p-green-500)}.not-ready{color:var(--p-red-500)}p{margin:0}\n"],
998
+ dependencies: [{
999
+ kind: "directive",
1000
+ type: TranslocoDirective,
1001
+ selector: "[transloco]",
1002
+ inputs: [
1003
+ "transloco",
1004
+ "translocoParams",
1005
+ "translocoScope",
1006
+ "translocoRead",
1007
+ "translocoPrefix",
1008
+ "translocoLang",
1009
+ "translocoLoadingTpl"
1010
+ ]
1011
+ }, {
1012
+ kind: "pipe",
1013
+ type: EnumMapPipe,
1014
+ name: "enumMap"
1015
+ }]
1016
+ });
1017
+ };
1018
+ i0.ɵɵngDeclareClassMetadata({
1019
+ minVersion: "12.0.0",
1020
+ version: "22.2.3",
1021
+ ngImport: i0,
1022
+ type: PlayerSlotComponent,
1023
+ decorators: [{
1024
+ type: Component,
1025
+ args: [{
1026
+ selector: "tikal-player-slot",
1027
+ imports: [EnumMapPipe, TranslocoDirective],
1028
+ template: "<ng-container *transloco=\"let t; prefix: 'player-slot'\">\n <div class=\"main-group\">\n <span class=\"dot\" [style.background-color]=\"colour() | enumMap: colourMap\"></span>\n <p>{{ name() }}</p>\n @if (isOwner()) {\n <i class=\"pi pi-crown\" style=\"color: var(--p-yellow-600)\"></i>\n }\n </div>\n @if (isReady()) {\n <p class=\"ready\">{{ t('ready') }}</p>\n } @else {\n <p class=\"not-ready\">{{ t('not-ready') }}</p>\n }\n</ng-container>\n",
1029
+ styles: [":host{display:flex;flex-direction:row;justify-content:space-between;height:3.25rem;padding:1rem;background-color:var(--p-surface-100)}:host-context(.dark) :host{background-color:var(--p-surface-800)}.main-group{display:flex;flex-direction:row;align-items:center;gap:.75rem}.dot{width:.75rem;height:.75rem;border-radius:50%}.ready{color:var(--p-green-500)}.not-ready{color:var(--p-red-500)}p{margin:0}\n"]
1030
+ }]
1031
+ }],
1032
+ propDecorators: {
1033
+ name: [{
1034
+ type: i0.Input,
1035
+ args: [{
1036
+ isSignal: true,
1037
+ alias: "name",
1038
+ required: true
1039
+ }]
1040
+ }],
1041
+ colour: [{
1042
+ type: i0.Input,
1043
+ args: [{
1044
+ isSignal: true,
1045
+ alias: "colour",
1046
+ required: true
1047
+ }]
1048
+ }],
1049
+ isReady: [{
1050
+ type: i0.Input,
1051
+ args: [{
1052
+ isSignal: true,
1053
+ alias: "isReady",
1054
+ required: true
1055
+ }]
1056
+ }],
1057
+ isOwner: [{
1058
+ type: i0.Input,
1059
+ args: [{
1060
+ isSignal: true,
1061
+ alias: "isOwner",
1062
+ required: true
1063
+ }]
1064
+ }]
1065
+ }
1066
+ });
1067
+ var PlayerSlotListComponent = class PlayerSlotListComponent {
1068
+ maxPlayers = input.required(...ngDevMode ? [{ debugName: "maxPlayers" }] : /* istanbul ignore next */ []);
1069
+ players = input.required(...ngDevMode ? [{ debugName: "players" }] : /* istanbul ignore next */ []);
1070
+ isLoading = input(false, ...ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []);
1071
+ static ɵfac = i0.ɵɵngDeclareFactory({
1072
+ minVersion: "12.0.0",
1073
+ version: "22.2.3",
1074
+ ngImport: i0,
1075
+ type: PlayerSlotListComponent,
1076
+ deps: [],
1077
+ target: i0.ɵɵFactoryTarget.Component
1078
+ });
1079
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1080
+ minVersion: "17.0.0",
1081
+ version: "22.2.3",
1082
+ type: PlayerSlotListComponent,
1083
+ isStandalone: true,
1084
+ selector: "tikal-player-slot-list",
1085
+ inputs: {
1086
+ maxPlayers: {
1087
+ classPropertyName: "maxPlayers",
1088
+ publicName: "maxPlayers",
1089
+ isSignal: true,
1090
+ isRequired: true,
1091
+ transformFunction: null
1092
+ },
1093
+ players: {
1094
+ classPropertyName: "players",
1095
+ publicName: "players",
1096
+ isSignal: true,
1097
+ isRequired: true,
1098
+ transformFunction: null
1099
+ },
1100
+ isLoading: {
1101
+ classPropertyName: "isLoading",
1102
+ publicName: "isLoading",
1103
+ isSignal: true,
1104
+ isRequired: false,
1105
+ transformFunction: null
1106
+ }
1107
+ },
1108
+ ngImport: i0,
1109
+ template: "<ng-container *transloco=\"let t; prefix: 'player-slot-list'\">\n <div class=\"header\">\n <span>{{ t('players') }}</span>\n <i class=\"pi pi-user\"></i>\n <span>{{ players().length }}/{{ maxPlayers() }}</span>\n </div>\n <div class=\"players\">\n @if (isLoading()) {\n @for (empty of [].constructor(maxPlayers()); track $index) {\n <tikal-empty-player-slot [isLoading]=\"true\" />\n }\n } @else {\n @for (player of players(); track $index) {\n <tikal-player-slot\n [colour]=\"player.selectedColour\"\n [isOwner]=\"player.isOwner\"\n [isReady]=\"player.isReady\"\n [name]=\"player.name\"\n />\n }\n @for (empty of [].constructor(maxPlayers() - players().length); track $index) {\n <tikal-empty-player-slot />\n }\n }\n </div>\n</ng-container>\n",
1110
+ styles: [":host{display:flex;flex-direction:column;width:20rem}.players{border:var(--p-content-border-color) solid 1px;border-radius:var(--p-content-border-radius);overflow:hidden}.players>*+*{border-top:var(--p-content-border-color) solid 1px}.header{display:flex;flex-direction:row;align-items:center;gap:.5rem;padding:.5rem .1rem}\n"],
1111
+ dependencies: [
1112
+ {
1113
+ kind: "component",
1114
+ type: PlayerSlotComponent,
1115
+ selector: "tikal-player-slot",
1116
+ inputs: [
1117
+ "name",
1118
+ "colour",
1119
+ "isReady",
1120
+ "isOwner"
1121
+ ]
1122
+ },
1123
+ {
1124
+ kind: "component",
1125
+ type: EmptyPlayerSlotComponent,
1126
+ selector: "tikal-empty-player-slot",
1127
+ inputs: ["isLoading"]
1128
+ },
1129
+ {
1130
+ kind: "directive",
1131
+ type: TranslocoDirective,
1132
+ selector: "[transloco]",
1133
+ inputs: [
1134
+ "transloco",
1135
+ "translocoParams",
1136
+ "translocoScope",
1137
+ "translocoRead",
1138
+ "translocoPrefix",
1139
+ "translocoLang",
1140
+ "translocoLoadingTpl"
1141
+ ]
1142
+ }
1143
+ ]
1144
+ });
1145
+ };
1146
+ i0.ɵɵngDeclareClassMetadata({
1147
+ minVersion: "12.0.0",
1148
+ version: "22.2.3",
1149
+ ngImport: i0,
1150
+ type: PlayerSlotListComponent,
1151
+ decorators: [{
1152
+ type: Component,
1153
+ args: [{
1154
+ selector: "tikal-player-slot-list",
1155
+ imports: [
1156
+ PlayerSlotComponent,
1157
+ EmptyPlayerSlotComponent,
1158
+ TranslocoDirective
1159
+ ],
1160
+ template: "<ng-container *transloco=\"let t; prefix: 'player-slot-list'\">\n <div class=\"header\">\n <span>{{ t('players') }}</span>\n <i class=\"pi pi-user\"></i>\n <span>{{ players().length }}/{{ maxPlayers() }}</span>\n </div>\n <div class=\"players\">\n @if (isLoading()) {\n @for (empty of [].constructor(maxPlayers()); track $index) {\n <tikal-empty-player-slot [isLoading]=\"true\" />\n }\n } @else {\n @for (player of players(); track $index) {\n <tikal-player-slot\n [colour]=\"player.selectedColour\"\n [isOwner]=\"player.isOwner\"\n [isReady]=\"player.isReady\"\n [name]=\"player.name\"\n />\n }\n @for (empty of [].constructor(maxPlayers() - players().length); track $index) {\n <tikal-empty-player-slot />\n }\n }\n </div>\n</ng-container>\n",
1161
+ styles: [":host{display:flex;flex-direction:column;width:20rem}.players{border:var(--p-content-border-color) solid 1px;border-radius:var(--p-content-border-radius);overflow:hidden}.players>*+*{border-top:var(--p-content-border-color) solid 1px}.header{display:flex;flex-direction:row;align-items:center;gap:.5rem;padding:.5rem .1rem}\n"]
1162
+ }]
1163
+ }],
1164
+ propDecorators: {
1165
+ maxPlayers: [{
1166
+ type: i0.Input,
1167
+ args: [{
1168
+ isSignal: true,
1169
+ alias: "maxPlayers",
1170
+ required: true
1171
+ }]
1172
+ }],
1173
+ players: [{
1174
+ type: i0.Input,
1175
+ args: [{
1176
+ isSignal: true,
1177
+ alias: "players",
1178
+ required: true
1179
+ }]
1180
+ }],
1181
+ isLoading: [{
1182
+ type: i0.Input,
1183
+ args: [{
1184
+ isSignal: true,
1185
+ alias: "isLoading",
1186
+ required: false
1187
+ }]
1188
+ }]
1189
+ }
1190
+ });
1191
+ var MaxPlayerSelectComponent = class MaxPlayerSelectComponent {
1192
+ value = model(3, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
1193
+ invalid = input(false, ...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
1194
+ options = [
1195
+ {
1196
+ label: "2",
1197
+ value: 2
1198
+ },
1199
+ {
1200
+ label: "3",
1201
+ value: 3
1202
+ },
1203
+ {
1204
+ label: "4",
1205
+ value: 4
1206
+ }
1207
+ ];
1208
+ static ɵfac = i0.ɵɵngDeclareFactory({
1209
+ minVersion: "12.0.0",
1210
+ version: "22.2.3",
1211
+ ngImport: i0,
1212
+ type: MaxPlayerSelectComponent,
1213
+ deps: [],
1214
+ target: i0.ɵɵFactoryTarget.Component
1215
+ });
1216
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1217
+ minVersion: "17.1.0",
1218
+ version: "22.2.3",
1219
+ type: MaxPlayerSelectComponent,
1220
+ isStandalone: true,
1221
+ selector: "tikal-max-player-select",
1222
+ inputs: {
1223
+ value: {
1224
+ classPropertyName: "value",
1225
+ publicName: "value",
1226
+ isSignal: true,
1227
+ isRequired: false,
1228
+ transformFunction: null
1229
+ },
1230
+ invalid: {
1231
+ classPropertyName: "invalid",
1232
+ publicName: "invalid",
1233
+ isSignal: true,
1234
+ isRequired: false,
1235
+ transformFunction: null
1236
+ }
1237
+ },
1238
+ outputs: { value: "valueChange" },
1239
+ ngImport: i0,
1240
+ template: "<p-selectbutton\n optionLabel=\"label\"\n optionValue=\"value\"\n [invalid]=\"invalid()\"\n [options]=\"options\"\n [(ngModel)]=\"value\"\n/>\n",
1241
+ styles: [""],
1242
+ dependencies: [
1243
+ {
1244
+ kind: "ngmodule",
1245
+ type: SelectButtonModule
1246
+ },
1247
+ {
1248
+ kind: "component",
1249
+ type: i1.SelectButton,
1250
+ selector: "p-selectButton, p-selectbutton, p-select-button",
1251
+ inputs: [
1252
+ "options",
1253
+ "optionLabel",
1254
+ "optionValue",
1255
+ "optionDisabled",
1256
+ "unselectable",
1257
+ "tabindex",
1258
+ "multiple",
1259
+ "allowEmpty",
1260
+ "styleClass",
1261
+ "ariaLabelledBy",
1262
+ "dataKey",
1263
+ "autofocus",
1264
+ "size",
1265
+ "fluid"
1266
+ ],
1267
+ outputs: ["onOptionClick", "onChange"]
1268
+ },
1269
+ {
1270
+ kind: "ngmodule",
1271
+ type: FormsModule
1272
+ },
1273
+ {
1274
+ kind: "directive",
1275
+ type: i2.NgControlStatus,
1276
+ selector: "[formControlName],[ngModel],[formControl]"
1277
+ },
1278
+ {
1279
+ kind: "directive",
1280
+ type: i2.NgModel,
1281
+ selector: "[ngModel]:not([formControlName]):not([formControl])",
1282
+ inputs: [
1283
+ "name",
1284
+ "disabled",
1285
+ "ngModel",
1286
+ "ngModelOptions"
1287
+ ],
1288
+ outputs: ["ngModelChange"],
1289
+ exportAs: ["ngModel"]
1290
+ }
1291
+ ]
1292
+ });
1293
+ };
1294
+ i0.ɵɵngDeclareClassMetadata({
1295
+ minVersion: "12.0.0",
1296
+ version: "22.2.3",
1297
+ ngImport: i0,
1298
+ type: MaxPlayerSelectComponent,
1299
+ decorators: [{
1300
+ type: Component,
1301
+ args: [{
1302
+ selector: "tikal-max-player-select",
1303
+ imports: [SelectButtonModule, FormsModule],
1304
+ template: "<p-selectbutton\n optionLabel=\"label\"\n optionValue=\"value\"\n [invalid]=\"invalid()\"\n [options]=\"options\"\n [(ngModel)]=\"value\"\n/>\n"
1305
+ }]
1306
+ }],
1307
+ propDecorators: {
1308
+ value: [{
1309
+ type: i0.Input,
1310
+ args: [{
1311
+ isSignal: true,
1312
+ alias: "value",
1313
+ required: false
1314
+ }]
1315
+ }, {
1316
+ type: i0.Output,
1317
+ args: ["valueChange"]
1318
+ }],
1319
+ invalid: [{
1320
+ type: i0.Input,
1321
+ args: [{
1322
+ isSignal: true,
1323
+ alias: "invalid",
1324
+ required: false
1325
+ }]
1326
+ }]
1327
+ }
1328
+ });
277
1329
  export { ButtonComponent, ChatFormComponent, ChipComponent, EmptyPlayerSlotComponent, InputComponent, MaxPlayerSelectComponent, PlayerCountComponent, PlayerSlotComponent, PlayerSlotListComponent, SkeletonComponent };
278
- //# sourceMappingURL=tikal-ui-components.mjs.map
1330
+
1331
+ //# sourceMappingURL=tikal-ui-components.mjs.map