@tstdl/base 0.91.24 → 0.91.25

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.
@@ -2,9 +2,10 @@ import type { PartialProperty, ReactiveValue, TypedOmit } from '../types.js';
2
2
  import type { FormDialog } from './form-dialog.js';
3
3
  import { FormHeaderFooterElement, type FormHeaderFooterElementOptions } from './form-header-footer-element.js';
4
4
  import type { DynamicTextOption } from './types.js';
5
+ export type FormButtonSize = 'normal' | 'small';
6
+ export type FormButtonColor = 'transparent' | 'white' | 'accent' | 'neutral' | 'stone' | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose';
5
7
  export type FormButtonType = 'button' | 'submit' | 'reset';
6
- export type FormButtonStyle = 'basic' | 'flat' | 'raised' | 'stroked' | 'icon' | 'fab';
7
- export type FormButtonColor = 'primary' | 'basic' | 'secondary' | 'warn';
8
+ export type FormButtonDesign = 'flat' | 'outline' | 'icon' | 'icon-outline' | 'none';
8
9
  export type IconLocation = 'before' | 'after';
9
10
  export type IconSize = 'small' | 'normal';
10
11
  export type FormButtonHandler = () => any;
@@ -13,7 +14,7 @@ export type FormButtonOptions = FormHeaderFooterElementOptions & {
13
14
  label?: ReactiveValue<DynamicTextOption>;
14
15
  type?: ReactiveValue<FormButtonType | null>;
15
16
  disabled?: ReactiveValue<boolean | null>;
16
- style?: ReactiveValue<FormButtonStyle | null>;
17
+ design?: ReactiveValue<FormButtonDesign | null>;
17
18
  color?: ReactiveValue<FormButtonColor | null>;
18
19
  icon?: ReactiveValue<string | null>;
19
20
  iconLocation?: ReactiveValue<IconLocation | null>;
@@ -25,7 +26,7 @@ export declare class FormButton extends FormHeaderFooterElement {
25
26
  readonly label: import("../signals/api.js").Signal<DynamicTextOption>;
26
27
  readonly type: import("../signals/api.js").Signal<FormButtonType>;
27
28
  readonly disabled: import("../signals/api.js").Signal<boolean>;
28
- readonly style: import("../signals/api.js").Signal<FormButtonStyle>;
29
+ readonly style: import("../signals/api.js").Signal<FormButtonDesign>;
29
30
  readonly color: import("../signals/api.js").Signal<FormButtonColor>;
30
31
  readonly icon: import("../signals/api.js").Signal<string | null>;
31
32
  readonly iconLocation: import("../signals/api.js").Signal<IconLocation>;
@@ -5,8 +5,8 @@ export class FormButton extends FormHeaderFooterElement {
5
5
  #label = signal(null);
6
6
  #type = signal('button');
7
7
  #disabled = signal(false);
8
- #style = signal('flat');
9
- #color = signal('primary');
8
+ #design = signal('flat');
9
+ #color = signal('accent');
10
10
  #icon = signal(null);
11
11
  #iconLocation = signal('before');
12
12
  #iconSize = signal('normal');
@@ -14,7 +14,7 @@ export class FormButton extends FormHeaderFooterElement {
14
14
  label = this.#label.asReadonly();
15
15
  type = this.#type.asReadonly();
16
16
  disabled = this.#disabled.asReadonly();
17
- style = this.#style.asReadonly();
17
+ style = this.#design.asReadonly();
18
18
  color = this.#color.asReadonly();
19
19
  icon = this.#icon.asReadonly();
20
20
  iconLocation = this.#iconLocation.asReadonly();
@@ -25,8 +25,8 @@ export class FormButton extends FormHeaderFooterElement {
25
25
  bindReactiveOption(options.label, this.#label, { defaultValue: null });
26
26
  bindReactiveOption(options.type, this.#type, { defaultValue: 'button' });
27
27
  bindReactiveOption(options.disabled, this.#disabled, { defaultValue: false });
28
- bindReactiveOption(options.style, this.#style, { defaultValue: 'flat' });
29
- bindReactiveOption(options.color, this.#color, { defaultValue: 'primary' });
28
+ bindReactiveOption(options.design, this.#design, { defaultValue: 'flat' });
29
+ bindReactiveOption(options.color, this.#color, { defaultValue: 'accent' });
30
30
  bindReactiveOption(options.icon, this.#icon, { defaultValue: null });
31
31
  bindReactiveOption(options.iconLocation, this.#iconLocation, { defaultValue: 'before' });
32
32
  bindReactiveOption(options.iconSize, this.#iconSize, { defaultValue: 'normal' });
@@ -41,7 +41,7 @@ export function dialogFormButton(options) {
41
41
  handler: () => options.dialog.openDialog(),
42
42
  ...options,
43
43
  icon: computed(() => (showError() ? 'warning' : null)),
44
- color: computed(() => (showError() ? 'warn' : null))
44
+ color: computed(() => (showError() ? 'red' : null))
45
45
  });
46
46
  }
47
47
  export function isFormButton(value) {
@@ -19,7 +19,9 @@ export type EntityMetadataUpdate = {
19
19
  export type EntityUpdate<T extends Entity> = Partial<TypedOmit<T, 'metadata'>> & EntityMetadataUpdate;
20
20
  export declare abstract class EntityRepository<T extends Entity = Entity> {
21
21
  readonly type: Type<T>;
22
- readonly database: import("drizzle-orm/node-postgres").NodePgDatabase<Record<string, never>>;
22
+ readonly database: import("drizzle-orm/node-postgres").NodePgDatabase<Record<string, never>> & {
23
+ $client: null;
24
+ };
23
25
  load(_id: string): Promise<T>;
24
26
  abstract tryLoad(id: string): Promise<T | undefined>;
25
27
  abstract loadByFilter(query: Query<T>, options?: LoadOptions<T>): Promise<T>;
@@ -43,7 +43,7 @@ export declare const mySchemaUsers: PgTableWithColumns<{
43
43
  generated: undefined;
44
44
  }, {}, {}>;
45
45
  age: import("drizzle-orm/pg-core").PgColumn<{
46
- name: "";
46
+ name: "age";
47
47
  tableName: "users";
48
48
  dataType: "number";
49
49
  columnType: "PgInteger";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tstdl/base",
3
- "version": "0.91.24",
3
+ "version": "0.91.25",
4
4
  "author": "Patrick Hein",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -117,7 +117,7 @@
117
117
  },
118
118
  "devDependencies": {
119
119
  "@mxssfd/typedoc-theme": "1.1",
120
- "@stylistic/eslint-plugin": "2.8",
120
+ "@stylistic/eslint-plugin": "2.9",
121
121
  "@types/chroma-js": "2.4",
122
122
  "@types/koa__router": "12.0",
123
123
  "@types/luxon": "3.4",
@@ -129,7 +129,7 @@
129
129
  "concurrently": "9.0",
130
130
  "eslint": "8.57",
131
131
  "eslint-import-resolver-typescript": "3.6",
132
- "eslint-plugin-import": "2.30",
132
+ "eslint-plugin-import": "2.31",
133
133
  "tsc-alias": "1.8",
134
134
  "typedoc": "0.26",
135
135
  "typedoc-plugin-missing-exports": "3.0",
@@ -144,7 +144,7 @@
144
144
  "@zxcvbn-ts/language-de": "^3.0",
145
145
  "@zxcvbn-ts/language-en": "^3.0",
146
146
  "chroma-js": "^2.6",
147
- "drizzle-orm": "^0.33",
147
+ "drizzle-orm": "^0.34",
148
148
  "handlebars": "^4.7",
149
149
  "koa": "^2.15",
150
150
  "minio": "^8.0",