tikal-ui-components 0.10.3 → 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,271 +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 * as i2 from '@angular/forms';
15
- import { FormsModule } from '@angular/forms';
16
- import * as i1$4 from 'primeng/selectbutton';
17
- import { SelectButtonModule } from 'primeng/selectbutton';
18
-
19
- class EnumMapPipe {
20
- transform(value, enumMap, defaultValue) {
21
- return enumMap[value] ?? defaultValue ?? value;
22
- }
23
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EnumMapPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
24
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: EnumMapPipe, isStandalone: true, name: "enumMap" });
25
- }
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EnumMapPipe, decorators: [{
27
- type: Pipe,
28
- args: [{
29
- name: 'enumMap',
30
- }]
31
- }] });
32
-
33
- class ButtonComponent {
34
- /** What icon should the button display? */
35
- icon = input('', /* @ts-ignore */
36
- ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
37
- /** What colour should the button be? */
38
- colour = input('primary', /* @ts-ignore */
39
- ...(ngDevMode ? [{ debugName: "colour" }] : /* istanbul ignore next */ []));
40
- /** What size should the button be? */
41
- size = input('normal', /* @ts-ignore */
42
- ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
43
- /** @ignore */
44
- sizeMap = {
45
- normal: undefined,
46
- };
47
- /** What text should the button display? */
48
- label = input(/* @ts-ignore */
49
- ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
50
- /** Is the action related to the button currently running? */
51
- isLoading = input(false, /* @ts-ignore */
52
- ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
53
- /** Should the button have an outline? */
54
- outline = input(false, /* @ts-ignore */
55
- ...(ngDevMode ? [{ debugName: "outline" }] : /* istanbul ignore next */ []));
56
- /** What type should the button be? */
57
- type = input('button', /* @ts-ignore */
58
- ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
59
- /** Should the button only appear as text? */
60
- text = input(false, /* @ts-ignore */
61
- ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
62
- /** @ignore */
63
- clicked = output();
64
- /** What form should the button belong to? */
65
- form = input(/* @ts-ignore */
66
- ...(ngDevMode ? [undefined, { debugName: "form" }] : /* istanbul ignore next */ []));
67
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
68
- 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" }] });
69
- }
70
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ButtonComponent, decorators: [{
71
- type: Component,
72
- 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" }]
73
- }], 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 }] }] } });
74
-
75
- class InputComponent {
76
- /** What value should the input have */
77
- value = model('', /* @ts-ignore */
78
- ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
79
- /** Should the input be disabled */
80
- disabled = input(false, /* @ts-ignore */
81
- ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
82
- /** Is the content of the input invalid? */
83
- invalid = input(false, /* @ts-ignore */
84
- ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
85
- /** Is the input required? */
86
- required = input(false, /* @ts-ignore */
87
- ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
88
- /** Was the input touched */
89
- touched = input(false, /* @ts-ignore */
90
- ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
91
- /** What is the max input length? */
92
- maxLength = input(/* @ts-ignore */
93
- ...(ngDevMode ? [undefined, { debugName: "maxLength" }] : /* istanbul ignore next */ []));
94
- /** What is the label of the input element? */
95
- label = input(/* @ts-ignore */
96
- ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
97
- /** What placeholder should the input display? */
98
- placeholder = input(/* @ts-ignore */
99
- ...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
100
- /** Should the input take the full widht? */
101
- expand = input(false, /* @ts-ignore */
102
- ...(ngDevMode ? [{ debugName: "expand" }] : /* istanbul ignore next */ []));
103
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
104
- 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"] }] });
105
- }
106
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: InputComponent, decorators: [{
107
- type: Component,
108
- 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"] }]
109
- }], 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 }] }] } });
110
-
111
- class ChatFormComponent {
112
- /** @ignore */
113
- chatFormData = signal({ message: '' }, /* @ts-ignore */
114
- ...(ngDevMode ? [{ debugName: "chatFormData" }] : /* istanbul ignore next */ []));
115
- /** What should happen when the form is submitted? */
116
- onSubmission = input.required(/* @ts-ignore */
117
- ...(ngDevMode ? [{ debugName: "onSubmission" }] : /* istanbul ignore next */ []));
118
- /** What placeholder should be displayed on the input? */
119
- placeholder = input(/* @ts-ignore */
120
- ...(ngDevMode ? [undefined, { debugName: "placeholder" }] : /* istanbul ignore next */ []));
121
- /** What is the max input length? */
122
- maxLength = input(50, /* @ts-ignore */
123
- ...(ngDevMode ? [{ debugName: "maxLength" }] : /* istanbul ignore next */ []));
124
- /** What is the label of the input element? */
125
- label = input(/* @ts-ignore */
126
- ...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
127
- /** @ignore */
128
- chatForm = form(this.chatFormData, (schemaPath) => {
129
- required(schemaPath.message);
130
- maxLength(schemaPath.message, () => this.maxLength());
131
- disabled(schemaPath, { when: () => this.chatForm().submitting() });
132
- }, {
133
- submission: {
134
- action: async (field) => {
135
- const message = field().value().message;
136
- await this.onSubmission()(message);
137
- field.message().reset('');
138
- },
139
- },
140
- });
141
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ChatFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
142
- 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"] }] });
143
- }
144
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ChatFormComponent, decorators: [{
145
- type: Component,
146
- 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"] }]
147
- }], 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 }] }] } });
148
-
149
- class SkeletonComponent {
150
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
151
- 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"] }] });
152
- }
153
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SkeletonComponent, decorators: [{
154
- type: Component,
155
- args: [{ selector: 'tikal-skeleton', imports: [SkeletonModule], template: "<p-skeleton />\n" }]
156
- }] });
157
-
158
- class PlayerCountComponent {
159
- /** How many players are currently in the lobby? */
160
- currentPlayers = input.required(/* @ts-ignore */
161
- ...(ngDevMode ? [{ debugName: "currentPlayers" }] : /* istanbul ignore next */ []));
162
- /** How many players fit in the lobby? */
163
- maxPlayers = input.required(/* @ts-ignore */
164
- ...(ngDevMode ? [{ debugName: "maxPlayers" }] : /* istanbul ignore next */ []));
165
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: PlayerCountComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
166
- 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"] });
167
- }
168
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: PlayerCountComponent, decorators: [{
169
- type: Component,
170
- 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"] }]
171
- }], propDecorators: { currentPlayers: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentPlayers", required: true }] }], maxPlayers: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxPlayers", required: true }] }] } });
172
-
173
- class ChipComponent {
174
- /** What icon should the chip display? */
175
- icon = input('', /* @ts-ignore */
176
- ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
177
- /** What text should the chip display? */
178
- label = input.required(/* @ts-ignore */
179
- ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
180
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
181
- 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"] }] });
182
- }
183
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ChipComponent, decorators: [{
184
- type: Component,
185
- 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" }]
186
- }], propDecorators: { icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }] } });
187
-
188
- class EmptyPlayerSlotComponent {
189
- /** Is the player currently loading? */
190
- isLoading = input(false, /* @ts-ignore */
191
- ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
192
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EmptyPlayerSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
193
- 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" }] });
194
- }
195
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EmptyPlayerSlotComponent, decorators: [{
196
- type: Component,
197
- 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"] }]
198
- }], propDecorators: { isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: false }] }] } });
199
-
200
- class PlayerSlotComponent {
201
- /** What is the name of the player? */
202
- name = input.required(/* @ts-ignore */
203
- ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
204
- /** What is the colour of the player? */
205
- colour = input.required(/* @ts-ignore */
206
- ...(ngDevMode ? [{ debugName: "colour" }] : /* istanbul ignore next */ []));
207
- /** @ignore */
208
- colourMap = {
209
- red: 'var(--p-red-500)',
210
- green: 'var(--p-green-500)',
211
- blue: 'var(--p-blue-500)',
212
- yellow: 'var(--p-yellow-500)',
213
- };
214
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: PlayerSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
215
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.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 } }, ngImport: i0, template: "<span class=\"dot\" [style.background-color]=\"colour() | enumMap: colourMap\"></span>\n<p>{{ name() }}</p>\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%}p{margin:0}\n"], dependencies: [{ kind: "pipe", type: EnumMapPipe, name: "enumMap" }] });
216
- }
217
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: PlayerSlotComponent, decorators: [{
218
- type: Component,
219
- args: [{ selector: 'tikal-player-slot', imports: [EnumMapPipe], template: "<span class=\"dot\" [style.background-color]=\"colour() | enumMap: colourMap\"></span>\n<p>{{ name() }}</p>\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%}p{margin:0}\n"] }]
220
- }], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: true }] }], colour: [{ type: i0.Input, args: [{ isSignal: true, alias: "colour", required: true }] }] } });
221
-
222
- class PlayerSlotListComponent {
223
- /** How many players fit in the lobby? */
224
- maxPlayers = input.required(/* @ts-ignore */
225
- ...(ngDevMode ? [{ debugName: "maxPlayers" }] : /* istanbul ignore next */ []));
226
- /** What players are currently in the lobby? */
227
- players = input.required(/* @ts-ignore */
228
- ...(ngDevMode ? [{ debugName: "players" }] : /* istanbul ignore next */ []));
229
- /** Are the players currenlty loading? */
230
- isLoading = input(false, /* @ts-ignore */
231
- ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
232
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: PlayerSlotListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
233
- 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 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 [colour]=\"player.selectedColour\" [name]=\"player.name\" />\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"] }, { 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"] }] });
234
- }
235
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: PlayerSlotListComponent, decorators: [{
236
- type: Component,
237
- 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 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 [colour]=\"player.selectedColour\" [name]=\"player.name\" />\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"] }]
238
- }], 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 }] }] } });
239
-
240
- class MaxPlayerSelectComponent {
241
- /** What value should the input have? */
242
- value = model(3, /* @ts-ignore */
243
- ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
244
- /** Does the control hold an invalid value? */
245
- invalid = input(false, /* @ts-ignore */
246
- ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
247
- /** @ignore */
248
- options = [
249
- { label: '2', value: 2 },
250
- { label: '3', value: 3 },
251
- { label: '4', value: 4 },
252
- ];
253
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: MaxPlayerSelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
254
- 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"] }] });
255
- }
256
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: MaxPlayerSelectComponent, decorators: [{
257
- type: Component,
258
- 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" }]
259
- }], 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 }] }] } });
260
-
261
- /*
262
- * Public API Surface of tikal-ui-components
263
- */
264
- // Button
265
-
266
- /**
267
- * Generated bundle index. Do not edit.
268
- */
269
-
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
+ });
270
1329
  export { ButtonComponent, ChatFormComponent, ChipComponent, EmptyPlayerSlotComponent, InputComponent, MaxPlayerSelectComponent, PlayerCountComponent, PlayerSlotComponent, PlayerSlotListComponent, SkeletonComponent };
271
- //# sourceMappingURL=tikal-ui-components.mjs.map
1330
+
1331
+ //# sourceMappingURL=tikal-ui-components.mjs.map