Compare commits
No commits in common. "b3a25c42d7440d138ca3a63ec885e228af48015c" and "25291b373adfd0c55553df2281fb01a0e1013ef7" have entirely different histories.
b3a25c42d7
...
25291b373a
353
lib/plankton/plankton.d.ts
vendored
353
lib/plankton/plankton.d.ts
vendored
|
|
@ -226,10 +226,9 @@ declare namespace lib_plankton.base {
|
||||||
function object_merge(core: Record<string, any>, mantle: Record<string, any>): Record<string, any>;
|
function object_merge(core: Record<string, any>, mantle: Record<string, any>): Record<string, any>;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
function buffer_show(buffer: Buffer, { "block_size": option_block_size, "break_char": option_break_char, "render_readable_characters": render_readable_characters, }?: {
|
function buffer_show(buffer: Buffer, { "block_size": option_block_size, "break_char": option_break_char, }?: {
|
||||||
block_size?: int;
|
block_size?: int;
|
||||||
break_char?: string;
|
break_char?: string;
|
||||||
render_readable_characters?: boolean;
|
|
||||||
}): string;
|
}): string;
|
||||||
}
|
}
|
||||||
declare module lib_plankton.pod {
|
declare module lib_plankton.pod {
|
||||||
|
|
@ -4225,59 +4224,6 @@ declare namespace lib_plankton.zoo_input {
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
write(value: type_value): Promise<void>;
|
write(value: type_value): Promise<void>;
|
||||||
/**
|
|
||||||
*/
|
|
||||||
lock(mode: boolean): Promise<void>;
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
hook_change(action: (() => void)): Promise<void>;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
declare namespace lib_plankton.zoo_input {
|
|
||||||
/**
|
|
||||||
* @author fenris
|
|
||||||
*/
|
|
||||||
abstract class class_input_simple<type_value> implements interface_input<type_value> {
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
private dom_input;
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
private type;
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
private decode;
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
private encode;
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
private additional_attributes?;
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
constructor(type: string, decode: ((representation: string) => type_value), encode: ((value: type_value) => string), { "additional_attributes": additional_attributes, }?: {
|
|
||||||
additional_attributes?: Record<string, (null | string)>;
|
|
||||||
});
|
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
setup(parent: HTMLElement): Promise<void>;
|
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
read(): Promise<type_value>;
|
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
write(value: type_value): Promise<void>;
|
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
lock(mode: boolean): Promise<void>;
|
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
hook_change(action: (() => void)): Promise<void>;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.zoo_input {
|
declare namespace lib_plankton.zoo_input {
|
||||||
|
|
@ -4309,14 +4255,6 @@ declare namespace lib_plankton.zoo_input {
|
||||||
* [implementation]
|
* [implementation]
|
||||||
*/
|
*/
|
||||||
write(value: type_value_outer): Promise<void>;
|
write(value: type_value_outer): Promise<void>;
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
lock(mode: boolean): Promise<void>;
|
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
hook_change(action: (() => void)): Promise<void>;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.zoo_input {
|
declare namespace lib_plankton.zoo_input {
|
||||||
|
|
@ -4324,9 +4262,6 @@ declare namespace lib_plankton.zoo_input {
|
||||||
* @author fenris
|
* @author fenris
|
||||||
*/
|
*/
|
||||||
class class_input_soft<type_value_core> implements interface_input<(null | type_value_core)> {
|
class class_input_soft<type_value_core> implements interface_input<(null | type_value_core)> {
|
||||||
/**
|
|
||||||
*/
|
|
||||||
private read_only;
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
private core;
|
private core;
|
||||||
|
|
@ -4338,9 +4273,7 @@ declare namespace lib_plankton.zoo_input {
|
||||||
private dom_wrapper;
|
private dom_wrapper;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
constructor(core: interface_input<type_value_core>, { "read_only": read_only, }?: {
|
constructor(core: interface_input<type_value_core>, options?: {});
|
||||||
read_only?: boolean;
|
|
||||||
});
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
private toggle;
|
private toggle;
|
||||||
|
|
@ -4356,14 +4289,6 @@ declare namespace lib_plankton.zoo_input {
|
||||||
* [implementation]
|
* [implementation]
|
||||||
*/
|
*/
|
||||||
write(value: (null | type_value_core)): Promise<void>;
|
write(value: (null | type_value_core)): Promise<void>;
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
lock(mode: boolean): Promise<void>;
|
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
hook_change(action: (() => void)): Promise<void>;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.zoo_input {
|
declare namespace lib_plankton.zoo_input {
|
||||||
|
|
@ -4379,7 +4304,7 @@ declare namespace lib_plankton.zoo_input {
|
||||||
private value;
|
private value;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
constructor({ "initial_value": initial_value, }?: {
|
constructor(options?: {
|
||||||
initial_value?: any;
|
initial_value?: any;
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
|
|
@ -4394,14 +4319,6 @@ declare namespace lib_plankton.zoo_input {
|
||||||
* [implementation]
|
* [implementation]
|
||||||
*/
|
*/
|
||||||
write(value: any): Promise<void>;
|
write(value: any): Promise<void>;
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
lock(mode: boolean): Promise<void>;
|
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
hook_change(action: (() => void)): Promise<void>;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.zoo_input {
|
declare namespace lib_plankton.zoo_input {
|
||||||
|
|
@ -4409,22 +4326,61 @@ declare namespace lib_plankton.zoo_input {
|
||||||
* @author fenris
|
* @author fenris
|
||||||
* @todo abstract
|
* @todo abstract
|
||||||
*/
|
*/
|
||||||
class class_input_text extends class_input_simple<string> implements interface_input<string> {
|
class class_input_text implements interface_input<string> {
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
constructor({ "pattern": pattern, }?: {
|
private read_only;
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
private pattern;
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
private dom_input;
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
constructor(options?: {
|
||||||
|
read_only?: boolean;
|
||||||
pattern?: (null | string);
|
pattern?: (null | string);
|
||||||
});
|
});
|
||||||
|
/**
|
||||||
|
* [implementation]
|
||||||
|
*/
|
||||||
|
setup(parent: HTMLElement): Promise<void>;
|
||||||
|
/**
|
||||||
|
* [implementation]
|
||||||
|
*/
|
||||||
|
read(): Promise<string>;
|
||||||
|
/**
|
||||||
|
* [implementation]
|
||||||
|
*/
|
||||||
|
write(value: string): Promise<void>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.zoo_input {
|
declare namespace lib_plankton.zoo_input {
|
||||||
/**
|
/**
|
||||||
* @author fenris
|
* @author fenris
|
||||||
*/
|
*/
|
||||||
class class_input_email extends class_input_simple<string> implements interface_input<string> {
|
class class_input_email implements interface_input<string> {
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
private dom_input;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
constructor();
|
constructor();
|
||||||
|
/**
|
||||||
|
* [implementation]
|
||||||
|
*/
|
||||||
|
setup(parent: HTMLElement): Promise<void>;
|
||||||
|
/**
|
||||||
|
* [implementation]
|
||||||
|
*/
|
||||||
|
read(): Promise<string>;
|
||||||
|
/**
|
||||||
|
* [implementation]
|
||||||
|
*/
|
||||||
|
write(value: string): Promise<void>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.zoo_input {
|
declare namespace lib_plankton.zoo_input {
|
||||||
|
|
@ -4450,14 +4406,6 @@ declare namespace lib_plankton.zoo_input {
|
||||||
* [implementation]
|
* [implementation]
|
||||||
*/
|
*/
|
||||||
write(value: string): Promise<void>;
|
write(value: string): Promise<void>;
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
lock(mode: boolean): Promise<void>;
|
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
hook_change(action: (() => void)): Promise<void>;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.zoo_input {
|
declare namespace lib_plankton.zoo_input {
|
||||||
|
|
@ -4473,7 +4421,7 @@ declare namespace lib_plankton.zoo_input {
|
||||||
private dom_input;
|
private dom_input;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
constructor({ "required": required, }?: {
|
constructor(options?: {
|
||||||
required?: boolean;
|
required?: boolean;
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
|
|
@ -4488,14 +4436,6 @@ declare namespace lib_plankton.zoo_input {
|
||||||
* [implementation]
|
* [implementation]
|
||||||
*/
|
*/
|
||||||
write(value: (null | lib_plankton.pit.type_date)): Promise<void>;
|
write(value: (null | lib_plankton.pit.type_date)): Promise<void>;
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
lock(mode: boolean): Promise<void>;
|
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
hook_change(action: (() => void)): Promise<void>;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.zoo_input {
|
declare namespace lib_plankton.zoo_input {
|
||||||
|
|
@ -4503,12 +4443,34 @@ declare namespace lib_plankton.zoo_input {
|
||||||
* @author fenris
|
* @author fenris
|
||||||
* @todo abstract
|
* @todo abstract
|
||||||
*/
|
*/
|
||||||
class class_input_number extends class_input_simple<number> implements interface_input<number> {
|
class class_input_number implements interface_input<number> {
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
constructor({ "step": step, }?: {
|
private read_only;
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
private step;
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
private dom_input;
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
constructor(options?: {
|
||||||
|
read_only?: boolean;
|
||||||
step?: (null | float);
|
step?: (null | float);
|
||||||
});
|
});
|
||||||
|
/**
|
||||||
|
* [implementation]
|
||||||
|
*/
|
||||||
|
setup(parent: HTMLElement): Promise<void>;
|
||||||
|
/**
|
||||||
|
* [implementation]
|
||||||
|
*/
|
||||||
|
read(): Promise<number>;
|
||||||
|
/**
|
||||||
|
* [implementation]
|
||||||
|
*/
|
||||||
|
write(value: number): Promise<void>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.zoo_input {
|
declare namespace lib_plankton.zoo_input {
|
||||||
|
|
@ -4516,12 +4478,21 @@ declare namespace lib_plankton.zoo_input {
|
||||||
* @author fenris
|
* @author fenris
|
||||||
*/
|
*/
|
||||||
class class_input_checkbox implements interface_input<boolean> {
|
class class_input_checkbox implements interface_input<boolean> {
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
private read_only;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
private dom_input;
|
private dom_input;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
constructor();
|
private hooks_change;
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
constructor(options?: {
|
||||||
|
read_only?: boolean;
|
||||||
|
hooks_change?: Array<((value: boolean) => void)>;
|
||||||
|
});
|
||||||
/**
|
/**
|
||||||
* [implementation]
|
* [implementation]
|
||||||
*/
|
*/
|
||||||
|
|
@ -4534,14 +4505,6 @@ declare namespace lib_plankton.zoo_input {
|
||||||
* [implementation]
|
* [implementation]
|
||||||
*/
|
*/
|
||||||
write(value: boolean): Promise<void>;
|
write(value: boolean): Promise<void>;
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
lock(mode: boolean): Promise<void>;
|
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
hook_change(action: (() => void)): Promise<void>;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.zoo_input {
|
declare namespace lib_plankton.zoo_input {
|
||||||
|
|
@ -4573,27 +4536,13 @@ declare namespace lib_plankton.zoo_input {
|
||||||
* [implementation]
|
* [implementation]
|
||||||
*/
|
*/
|
||||||
write(value: string): Promise<void>;
|
write(value: string): Promise<void>;
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
lock(mode: boolean): Promise<void>;
|
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
hook_change(action: (() => void)): Promise<void>;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.zoo_input {
|
declare namespace lib_plankton.zoo_input {
|
||||||
/**
|
/**
|
||||||
* @author fenris
|
* @author fenris
|
||||||
*/
|
*/
|
||||||
class class_input_enumeration<type_value> implements interface_input<type_value> {
|
class class_input_enumeration implements interface_input<string> {
|
||||||
/**
|
|
||||||
*/
|
|
||||||
private encode_value;
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
private decode_value;
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
private options;
|
private options;
|
||||||
|
|
@ -4602,8 +4551,8 @@ declare namespace lib_plankton.zoo_input {
|
||||||
private dom_inputs;
|
private dom_inputs;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
constructor(encode_value: ((value: type_value) => string), decode_value: ((representation: string) => type_value), options: Array<{
|
constructor(options: Array<{
|
||||||
value: type_value;
|
value: string;
|
||||||
label: string;
|
label: string;
|
||||||
}>);
|
}>);
|
||||||
/**
|
/**
|
||||||
|
|
@ -4614,19 +4563,11 @@ declare namespace lib_plankton.zoo_input {
|
||||||
/**
|
/**
|
||||||
* [implementation]
|
* [implementation]
|
||||||
*/
|
*/
|
||||||
read(): Promise<type_value>;
|
read(): Promise<string>;
|
||||||
/**
|
/**
|
||||||
* [implementation]
|
* [implementation]
|
||||||
*/
|
*/
|
||||||
write(value: type_value): Promise<void>;
|
write(value: string): Promise<void>;
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
lock(mode: boolean): Promise<void>;
|
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
hook_change(action: (() => void)): Promise<void>;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.zoo_input {
|
declare namespace lib_plankton.zoo_input {
|
||||||
|
|
@ -4657,10 +4598,7 @@ declare namespace lib_plankton.zoo_input {
|
||||||
private translations;
|
private translations;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
private locked;
|
constructor(element_input_factory: (() => interface_input<type_element>), options?: {
|
||||||
/**
|
|
||||||
*/
|
|
||||||
constructor(element_input_factory: (() => interface_input<type_element>), { "read_only": read_only, "translations": translations, }?: {
|
|
||||||
read_only?: boolean;
|
read_only?: boolean;
|
||||||
translations?: type_translations;
|
translations?: type_translations;
|
||||||
});
|
});
|
||||||
|
|
@ -4682,14 +4620,6 @@ declare namespace lib_plankton.zoo_input {
|
||||||
* [implementation]
|
* [implementation]
|
||||||
*/
|
*/
|
||||||
write(value: Array<type_element>): Promise<void>;
|
write(value: Array<type_element>): Promise<void>;
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
lock(mode: boolean): Promise<void>;
|
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
hook_change(action: (() => void)): Promise<void>;
|
|
||||||
}
|
}
|
||||||
export {};
|
export {};
|
||||||
}
|
}
|
||||||
|
|
@ -4726,14 +4656,6 @@ declare namespace lib_plankton.zoo_input {
|
||||||
* [implementation]
|
* [implementation]
|
||||||
*/
|
*/
|
||||||
write(value: Set<string>): Promise<void>;
|
write(value: Set<string>): Promise<void>;
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
lock(mode: boolean): Promise<void>;
|
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
hook_change(action: (() => void)): Promise<void>;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.zoo_input {
|
declare namespace lib_plankton.zoo_input {
|
||||||
|
|
@ -4778,14 +4700,6 @@ declare namespace lib_plankton.zoo_input {
|
||||||
* [implementation]
|
* [implementation]
|
||||||
*/
|
*/
|
||||||
write(value: string): Promise<void>;
|
write(value: string): Promise<void>;
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
lock(mode: boolean): Promise<void>;
|
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
hook_change(action: (() => void)): Promise<void>;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.zoo_input {
|
declare namespace lib_plankton.zoo_input {
|
||||||
|
|
@ -4801,15 +4715,7 @@ declare namespace lib_plankton.zoo_input {
|
||||||
private value;
|
private value;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
private symbols;
|
constructor();
|
||||||
/**
|
|
||||||
*/
|
|
||||||
constructor({ "symbols": symbols, }?: {
|
|
||||||
symbols?: {
|
|
||||||
yes: string;
|
|
||||||
no: string;
|
|
||||||
};
|
|
||||||
});
|
|
||||||
/**
|
/**
|
||||||
* [implementation]
|
* [implementation]
|
||||||
*/
|
*/
|
||||||
|
|
@ -4822,24 +4728,31 @@ declare namespace lib_plankton.zoo_input {
|
||||||
* [implementation]
|
* [implementation]
|
||||||
*/
|
*/
|
||||||
write(value: boolean): Promise<void>;
|
write(value: boolean): Promise<void>;
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
lock(mode: boolean): Promise<void>;
|
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
hook_change(action: (() => void)): Promise<void>;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.zoo_input {
|
declare namespace lib_plankton.zoo_input {
|
||||||
/**
|
/**
|
||||||
* @author fenris
|
* @author fenris
|
||||||
*/
|
*/
|
||||||
class class_input_time extends class_input_simple<(null | lib_plankton.pit.type_time)> implements interface_input<(null | lib_plankton.pit.type_time)> {
|
class class_input_time implements interface_input<(null | lib_plankton.pit.type_time)> {
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
private dom_input;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
constructor();
|
constructor();
|
||||||
|
/**
|
||||||
|
* [implementation]
|
||||||
|
*/
|
||||||
|
setup(parent: HTMLElement): Promise<void>;
|
||||||
|
/**
|
||||||
|
* [implementation]
|
||||||
|
*/
|
||||||
|
read(): Promise<(null | lib_plankton.pit.type_time)>;
|
||||||
|
/**
|
||||||
|
* [implementation]
|
||||||
|
*/
|
||||||
|
write(value: (null | lib_plankton.pit.type_time)): Promise<void>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.zoo_input {
|
declare namespace lib_plankton.zoo_input {
|
||||||
|
|
@ -4870,20 +4783,12 @@ declare namespace lib_plankton.zoo_input {
|
||||||
* [implementation]
|
* [implementation]
|
||||||
*/
|
*/
|
||||||
write(value: type_record): Promise<void>;
|
write(value: type_record): Promise<void>;
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
lock(mode: boolean): Promise<void>;
|
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
hook_change(action: (() => void)): Promise<void>;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.zoo_input {
|
declare namespace lib_plankton.zoo_input {
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
class class_input_hashmap<type_key, type_value> implements interface_input<lib_plankton.map.type_map<type_key, type_value>> {
|
class class_input_hashmap<type_key, type_value> implements lib_plankton.zoo_input.interface_input<lib_plankton.map.type_map<type_key, type_value>> {
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
private hash_key;
|
private hash_key;
|
||||||
|
|
@ -4892,7 +4797,7 @@ declare namespace lib_plankton.zoo_input {
|
||||||
private core;
|
private core;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
constructor(hash_key: ((key: type_key) => string), key_input_factory: (() => interface_input<type_key>), value_input_factory: (() => interface_input<type_value>));
|
constructor(hash_key: ((key: type_key) => string), key_input_factory: (() => lib_plankton.zoo_input.interface_input<type_key>), value_input_factory: (() => lib_plankton.zoo_input.interface_input<type_value>));
|
||||||
/**
|
/**
|
||||||
* [implementation]
|
* [implementation]
|
||||||
*/
|
*/
|
||||||
|
|
@ -4905,14 +4810,6 @@ declare namespace lib_plankton.zoo_input {
|
||||||
* [implementation]
|
* [implementation]
|
||||||
*/
|
*/
|
||||||
write(map: lib_plankton.map.type_map<type_key, type_value>): Promise<void>;
|
write(map: lib_plankton.map.type_map<type_key, type_value>): Promise<void>;
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
lock(mode: boolean): Promise<void>;
|
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
hook_change(action: (() => void)): Promise<void>;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.zoo_input {
|
declare namespace lib_plankton.zoo_input {
|
||||||
|
|
@ -4938,14 +4835,6 @@ declare namespace lib_plankton.zoo_input {
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
write(value: lib_plankton.pit.type_datetime): Promise<void>;
|
write(value: lib_plankton.pit.type_datetime): Promise<void>;
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
lock(mode: boolean): Promise<void>;
|
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
hook_change(action: (() => void)): Promise<void>;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.zoo_input {
|
declare namespace lib_plankton.zoo_input {
|
||||||
|
|
@ -4958,7 +4847,7 @@ declare namespace lib_plankton.zoo_input {
|
||||||
private core;
|
private core;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
constructor({ "label_date": label_date, "label_time": label_time, }?: {
|
constructor(options?: {
|
||||||
label_date?: string;
|
label_date?: string;
|
||||||
label_time?: string;
|
label_time?: string;
|
||||||
});
|
});
|
||||||
|
|
@ -4971,23 +4860,30 @@ declare namespace lib_plankton.zoo_input {
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
write(value: lib_plankton.pit.type_datetime): Promise<void>;
|
write(value: lib_plankton.pit.type_datetime): Promise<void>;
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
lock(mode: boolean): Promise<void>;
|
|
||||||
/**
|
|
||||||
* [implementation]
|
|
||||||
*/
|
|
||||||
hook_change(action: (() => void)): Promise<void>;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.zoo_input {
|
declare namespace lib_plankton.zoo_input {
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
class class_input_color extends class_input_simple<(null | lib_plankton.color.type_color)> implements interface_input<(null | lib_plankton.color.type_color)> {
|
class class_input_color implements interface_input<(null | lib_plankton.color.type_color)> {
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
private dom_input;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
constructor();
|
constructor();
|
||||||
|
/**
|
||||||
|
* [implementation]
|
||||||
|
*/
|
||||||
|
setup(parent: HTMLElement): Promise<void>;
|
||||||
|
/**
|
||||||
|
* [implementation]
|
||||||
|
*/
|
||||||
|
read(): Promise<(null | lib_plankton.color.type_color)>;
|
||||||
|
/**
|
||||||
|
* [implementation]
|
||||||
|
*/
|
||||||
|
write(value: (null | lib_plankton.color.type_color)): Promise<void>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.zoo_input {
|
declare namespace lib_plankton.zoo_input {
|
||||||
|
|
@ -5023,7 +4919,7 @@ declare namespace lib_plankton.zoo_form {
|
||||||
name: string;
|
name: string;
|
||||||
type: string;
|
type: string;
|
||||||
label?: (null | string);
|
label?: (null | string);
|
||||||
}>, encode: ((value: type_value) => Record<string, string>), decode: ((raw: Record<string, string>) => type_value), { "class_prefix": class_prefix, }?: {
|
}>, encode: ((value: type_value) => Record<string, string>), decode: ((raw: Record<string, string>) => type_value), options?: {
|
||||||
class_prefix?: string;
|
class_prefix?: string;
|
||||||
}): type_form<type_value>;
|
}): type_form<type_value>;
|
||||||
/**
|
/**
|
||||||
|
|
@ -5088,9 +4984,6 @@ declare namespace lib_plankton.zoo_form {
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
input_write(value: type_value): Promise<void>;
|
input_write(value: type_value): Promise<void>;
|
||||||
/**
|
|
||||||
*/
|
|
||||||
input_lock(mode: boolean): Promise<void>;
|
|
||||||
}
|
}
|
||||||
export {};
|
export {};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -36,18 +36,13 @@ namespace _dali.pages.overview
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @todo add return type
|
||||||
*/
|
*/
|
||||||
async function get_available_calendars(
|
async function get_available_calendars(
|
||||||
)
|
)
|
||||||
: Promise<
|
|
||||||
Array<
|
|
||||||
_dali.type_calendar_object_reduced_with_id
|
|
||||||
>
|
|
||||||
>
|
|
||||||
{
|
{
|
||||||
return (
|
return (
|
||||||
(await _dali.model.calendar_list())
|
(await _dali.model.calendar_list())
|
||||||
/*
|
|
||||||
.filter(
|
.filter(
|
||||||
(entry) => (
|
(entry) => (
|
||||||
(entry.access_level === _dali.enum_access_level.edit)
|
(entry.access_level === _dali.enum_access_level.edit)
|
||||||
|
|
@ -55,7 +50,6 @@ namespace _dali.pages.overview
|
||||||
(entry.access_level === _dali.enum_access_level.admin)
|
(entry.access_level === _dali.enum_access_level.admin)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
*/
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -137,29 +131,6 @@ namespace _dali.pages.overview
|
||||||
{
|
{
|
||||||
const widget = new _dali.widgets.calendar_edit.class_widget_calendar_edit(
|
const widget = new _dali.widgets.calendar_edit.class_widget_calendar_edit(
|
||||||
await _dali.model.user_list(),
|
await _dali.model.user_list(),
|
||||||
{
|
|
||||||
"name": "",
|
|
||||||
"hue": lib_plankton.random.generate_unit(),
|
|
||||||
"access": {
|
|
||||||
"public": false,
|
|
||||||
"default_level": _dali.enum_access_level.view,
|
|
||||||
"attributed": lib_plankton.map.hashmap.implementation_map<
|
|
||||||
_dali.type_user_id,
|
|
||||||
_dali.enum_access_level
|
|
||||||
>(
|
|
||||||
lib_plankton.map.hashmap.make<
|
|
||||||
_dali.type_user_id,
|
|
||||||
_dali.enum_access_level
|
|
||||||
>(
|
|
||||||
user_id => user_id.toFixed(0),
|
|
||||||
)
|
|
||||||
),
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* @todo
|
|
||||||
*/
|
|
||||||
"resource_id": 0,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"read_only": false,
|
"read_only": false,
|
||||||
"action_cancel": () => {
|
"action_cancel": () => {
|
||||||
|
|
@ -184,6 +155,7 @@ namespace _dali.pages.overview
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
"initial_value": null,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
_dali.overlay.clear();
|
_dali.overlay.clear();
|
||||||
|
|
@ -191,88 +163,6 @@ namespace _dali.pages.overview
|
||||||
await widget.load(_dali.overlay.get_content_element());
|
await widget.load(_dali.overlay.get_content_element());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
async function action_edit_calendar(
|
|
||||||
calendar_object_reduced_with_id : type_calendar_object_reduced_with_id
|
|
||||||
)
|
|
||||||
: Promise<void>
|
|
||||||
{
|
|
||||||
const read_only : boolean = (() => {
|
|
||||||
switch (calendar_object_reduced_with_id.access_level)
|
|
||||||
{
|
|
||||||
case _dali.enum_access_level.none:
|
|
||||||
{
|
|
||||||
throw (new Error("this event should not be visible"));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case _dali.enum_access_level.edit:
|
|
||||||
case _dali.enum_access_level.view:
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case _dali.enum_access_level.admin:
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}) ();
|
|
||||||
if (read_only)
|
|
||||||
{
|
|
||||||
lib_plankton.log.notice(
|
|
||||||
"dali.overview.may_not_edit_calendar",
|
|
||||||
{
|
|
||||||
"calendar_id": calendar_object_reduced_with_id.id,
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
const calendar_id : _dali.type_calendar_id = calendar_object_reduced_with_id.id;
|
|
||||||
const calendar_object : _dali.type_calendar_object = await _dali.model.calendar_get(
|
|
||||||
calendar_id
|
|
||||||
);
|
|
||||||
const widget = new _dali.widgets.calendar_edit.class_widget_calendar_edit(
|
|
||||||
await _dali.model.user_list(),
|
|
||||||
calendar_object,
|
|
||||||
{
|
|
||||||
"read_only": read_only,
|
|
||||||
"action_cancel": () => {
|
|
||||||
_dali.overlay.toggle({"mode": false});
|
|
||||||
},
|
|
||||||
"action_change": (data) => {
|
|
||||||
_dali.model.calendar_change(
|
|
||||||
calendar_id,
|
|
||||||
data
|
|
||||||
)
|
|
||||||
.then(
|
|
||||||
() => {
|
|
||||||
update_sources_and_entries();
|
|
||||||
_dali.overlay.toggle({"mode": false});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
"action_remove": (data) => {
|
|
||||||
_dali.model.calendar_remove(
|
|
||||||
calendar_id
|
|
||||||
)
|
|
||||||
.then(
|
|
||||||
() => {
|
|
||||||
update_sources_and_entries();
|
|
||||||
_dali.overlay.toggle({"mode": false});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
},
|
|
||||||
}
|
|
||||||
);
|
|
||||||
_dali.overlay.clear();
|
|
||||||
_dali.overlay.toggle({"mode": true});
|
|
||||||
await widget.load(_dali.overlay.get_content_element());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @todo unterschiedliches Verhalten bei Anmeldung?
|
* @todo unterschiedliches Verhalten bei Anmeldung?
|
||||||
*/
|
*/
|
||||||
|
|
@ -363,15 +253,27 @@ namespace _dali.pages.overview
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
async function action_edit_event
|
async function action_select_event
|
||||||
(
|
(
|
||||||
event_key : _dali.type_event_key
|
event_key : _dali.type_event_key
|
||||||
)
|
)
|
||||||
: Promise<void>
|
: Promise<void>
|
||||||
{
|
{
|
||||||
const event_object_extended : _dali.type_event_object_extended = await _dali.model.event_get(event_key);
|
const event_object_extended : _dali.type_event_object_extended = await _dali.model.event_get(event_key);
|
||||||
const read_only : boolean = (() => {
|
const calendar_id = event_object_extended.calendar_id;
|
||||||
switch (event_object_extended.access_level)
|
const access_level = event_object_extended.access_level;
|
||||||
|
const event_id = event_object_extended.event_id;
|
||||||
|
/*
|
||||||
|
if (! _dali.is_logged_in())
|
||||||
|
{
|
||||||
|
// do nothing
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
let read_only : boolean;
|
||||||
|
switch (access_level)
|
||||||
{
|
{
|
||||||
case _dali.enum_access_level.none:
|
case _dali.enum_access_level.none:
|
||||||
{
|
{
|
||||||
|
|
@ -380,27 +282,31 @@ namespace _dali.pages.overview
|
||||||
}
|
}
|
||||||
case _dali.enum_access_level.view:
|
case _dali.enum_access_level.view:
|
||||||
{
|
{
|
||||||
return true;
|
read_only = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case _dali.enum_access_level.edit:
|
case _dali.enum_access_level.edit:
|
||||||
case _dali.enum_access_level.admin:
|
case _dali.enum_access_level.admin:
|
||||||
{
|
{
|
||||||
return false;
|
read_only = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}) ();
|
(async () => {
|
||||||
|
const event_object : _dali.type_event_object = await _dali.backend.calendar_event_get(
|
||||||
|
calendar_id,
|
||||||
|
event_id
|
||||||
|
);
|
||||||
const widget = new _dali.widgets.event_edit.class_widget_event_edit(
|
const widget = new _dali.widgets.event_edit.class_widget_event_edit(
|
||||||
(await get_available_calendars()),
|
(await get_available_calendars()),
|
||||||
{
|
{
|
||||||
"calendar_id": event_object_extended.calendar_id,
|
"calendar_id": calendar_id,
|
||||||
"event_name": event_object_extended.event_object.name,
|
"event_name": event_object.name,
|
||||||
"event_begin": event_object_extended.event_object.begin,
|
"event_begin": event_object.begin,
|
||||||
"event_end": event_object_extended.event_object.end,
|
"event_end": event_object.end,
|
||||||
"event_location": event_object_extended.event_object.location,
|
"event_location": event_object.location,
|
||||||
"event_link": event_object_extended.event_object.link,
|
"event_link": event_object.link,
|
||||||
"event_description": event_object_extended.event_object.description,
|
"event_description": event_object.description,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"read_only": read_only,
|
"read_only": read_only,
|
||||||
|
|
@ -455,10 +361,10 @@ namespace _dali.pages.overview
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
_dali.overlay.clear();
|
_dali.overlay.clear();
|
||||||
_dali.overlay.toggle({"mode": true});
|
_dali.overlay.toggle({"mode": true});
|
||||||
await widget.load(_dali.overlay.get_content_element());
|
await widget.load(_dali.overlay.get_content_element());
|
||||||
|
}) ();
|
||||||
}
|
}
|
||||||
|
|
||||||
// hint
|
// hint
|
||||||
|
|
@ -506,9 +412,72 @@ namespace _dali.pages.overview
|
||||||
_dali.model.calendar_list,
|
_dali.model.calendar_list,
|
||||||
{
|
{
|
||||||
"initial_priviliged": _dali.is_logged_in(),
|
"initial_priviliged": _dali.is_logged_in(),
|
||||||
"action_add": action_create_calendar,
|
"action_create": action_create_calendar,
|
||||||
"action_select": (entry) => action_edit_calendar(entry),
|
"action_open": (entry) => {
|
||||||
"action_toggle": (entry, mode) => {
|
let read_only : boolean;
|
||||||
|
switch (entry.access_level)
|
||||||
|
{
|
||||||
|
case _dali.enum_access_level.none:
|
||||||
|
{
|
||||||
|
throw (new Error("this event should not be visible"));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case _dali.enum_access_level.edit:
|
||||||
|
case _dali.enum_access_level.view:
|
||||||
|
{
|
||||||
|
read_only = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case _dali.enum_access_level.admin:
|
||||||
|
{
|
||||||
|
read_only = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
(async () => {
|
||||||
|
const calendar_id : _dali.type_calendar_id = entry.id;
|
||||||
|
const calendar_object : _dali.type_calendar_object = await _dali.model.calendar_get(
|
||||||
|
calendar_id
|
||||||
|
);
|
||||||
|
const widget = new _dali.widgets.calendar_edit.class_widget_calendar_edit(
|
||||||
|
await _dali.model.user_list(),
|
||||||
|
{
|
||||||
|
"read_only": read_only,
|
||||||
|
"action_cancel": () => {
|
||||||
|
_dali.overlay.toggle({"mode": false});
|
||||||
|
},
|
||||||
|
"action_change": (data) => {
|
||||||
|
_dali.model.calendar_change(
|
||||||
|
calendar_id,
|
||||||
|
data
|
||||||
|
)
|
||||||
|
.then(
|
||||||
|
() => {
|
||||||
|
update_sources_and_entries();
|
||||||
|
_dali.overlay.toggle({"mode": false});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
"action_remove": (data) => {
|
||||||
|
_dali.model.calendar_remove(
|
||||||
|
calendar_id
|
||||||
|
)
|
||||||
|
.then(
|
||||||
|
() => {
|
||||||
|
update_sources_and_entries();
|
||||||
|
_dali.overlay.toggle({"mode": false});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
"initial_value": calendar_object,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
_dali.overlay.clear();
|
||||||
|
_dali.overlay.toggle({"mode": true});
|
||||||
|
await widget.load(_dali.overlay.get_content_element());
|
||||||
|
}) ();
|
||||||
|
},
|
||||||
|
"action_toggle_visibility": (entry, mode) => {
|
||||||
widget_weekview.toggle_visibility(entry.id, {"mode": mode});
|
widget_weekview.toggle_visibility(entry.id, {"mode": mode});
|
||||||
widget_listview.toggle_visibility(entry.id, {"mode": mode});
|
widget_listview.toggle_visibility(entry.id, {"mode": mode});
|
||||||
},
|
},
|
||||||
|
|
@ -523,7 +492,7 @@ namespace _dali.pages.overview
|
||||||
new _dali.widgets.weekview.class_widget_weekview(
|
new _dali.widgets.weekview.class_widget_weekview(
|
||||||
get_entries,
|
get_entries,
|
||||||
{
|
{
|
||||||
"action_select_event": (event_key) => action_edit_event(event_key),
|
"action_select_event": (event_key) => action_select_event(event_key),
|
||||||
"action_select_day": (date) => action_create_event({"date": date}),
|
"action_select_day": (date) => action_create_event({"date": date}),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
@ -537,7 +506,7 @@ namespace _dali.pages.overview
|
||||||
new _dali.widgets.listview.class_widget_listview(
|
new _dali.widgets.listview.class_widget_listview(
|
||||||
get_entries,
|
get_entries,
|
||||||
{
|
{
|
||||||
"action_select": (event_key) => action_edit_event(event_key),
|
"action_select": (event_key) => action_select_event(event_key),
|
||||||
"action_add": () => action_create_event(),
|
"action_add": () => action_create_event(),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
22
source/style/page-caldav.css
Normal file
22
source/style/page-caldav.css
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
.caldav-conf-section
|
||||||
|
{
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.caldav-conf-section-label
|
||||||
|
{
|
||||||
|
margin-left: 16px;
|
||||||
|
display: block;
|
||||||
|
font-weight: bold;
|
||||||
|
text-transform: capitalize;
|
||||||
|
}
|
||||||
|
|
||||||
|
.caldav-conf-section-value
|
||||||
|
{
|
||||||
|
margin-left: 32px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.caldav-conf-section-value-regular
|
||||||
|
{
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
46
source/style/page-overview.css
Normal file
46
source/style/page-overview.css
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
#overview-head
|
||||||
|
{
|
||||||
|
padding-bottom: 12px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
border-bottom: 2px solid;
|
||||||
|
}
|
||||||
|
|
||||||
|
#overview-hint
|
||||||
|
{
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#overview-hint.overview-hint-hidden
|
||||||
|
{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#overview-body
|
||||||
|
{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
#overview-body #overview-pane-left
|
||||||
|
{
|
||||||
|
flex-grow: 0;
|
||||||
|
flex-shrink: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#overview-body #overview-pane-right
|
||||||
|
{
|
||||||
|
flex-grow: 1;
|
||||||
|
flex-shrink: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#overview.overview-compact #overview-pane-left {flex-basis: 25%;}
|
||||||
|
#overview.overview-compact #overview-pane-right {flex-basis: 75%;}
|
||||||
|
#overview.overview-compact #overview-pane-right-listview {}
|
||||||
|
#overview.overview-compact #overview-pane-right-weekview {display: none;}
|
||||||
|
|
||||||
|
#overview:not(.overview-compact) #overview-pane-left {flex-basis: 12.5%;}
|
||||||
|
#overview:not(.overview-compact) #overview-pane-right {flex-basis: 87.5%;}
|
||||||
|
#overview:not(.overview-compact) #overview-pane-right-listview {display: none;}
|
||||||
|
#overview:not(.overview-compact) #overview-pane-right-weekview {}
|
||||||
62
source/style/widget-listview.css
Normal file
62
source/style/widget-listview.css
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
.listview-add
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
text-transform: capitalize;
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.listview-add-hidden
|
||||||
|
{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listview-entries
|
||||||
|
{
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listview-entry
|
||||||
|
{
|
||||||
|
background: hsl(0,0%,25%);
|
||||||
|
padding: 12px;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin: 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listview-entry-hidden
|
||||||
|
{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listview-entry-name
|
||||||
|
{
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 1.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listview-entry-label
|
||||||
|
{
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listview-entry-label::before
|
||||||
|
{
|
||||||
|
content: "[";
|
||||||
|
}
|
||||||
|
|
||||||
|
.listview-entry-label::after
|
||||||
|
{
|
||||||
|
content: "] ";
|
||||||
|
}
|
||||||
|
|
||||||
|
.listview-entry-field-empty {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.listview-entry-field:not(:last-child)
|
||||||
|
{
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
75
source/style/widget-menu.css
Normal file
75
source/style/widget-menu.css
Normal file
|
|
@ -0,0 +1,75 @@
|
||||||
|
.widget-menu
|
||||||
|
{
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: 8px;
|
||||||
|
width: fit-content;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-menu.widget-menu-collapsed > .widget-menu-platform
|
||||||
|
{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-menu-button
|
||||||
|
{
|
||||||
|
text-transform: initial;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-menu-entry
|
||||||
|
{
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-menu-platform
|
||||||
|
{
|
||||||
|
background-color: hsl(var(--hue), 0%, 25%);
|
||||||
|
|
||||||
|
border-radius: 2px;
|
||||||
|
border: 1px solid hsl(var(--hue), 0%, 0%);
|
||||||
|
|
||||||
|
padding: 8px;
|
||||||
|
|
||||||
|
min-width: 200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-menu-platform:not(.widget-menu-platform-collapsed)
|
||||||
|
{
|
||||||
|
position: fixed;
|
||||||
|
top: 32px;
|
||||||
|
right: 32px;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-menu-entries
|
||||||
|
{
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-menu-entry
|
||||||
|
{
|
||||||
|
margin: 12px 16px;
|
||||||
|
padding: 8px;
|
||||||
|
text-transform: capitalize;
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-menu-entry:not(:hover)
|
||||||
|
{
|
||||||
|
background-color: hsl(var(--hue), 0%, 25%);
|
||||||
|
color: hsl(var(--hue), 0%, 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-menu-entry:hover::after
|
||||||
|
{
|
||||||
|
content: " «";
|
||||||
|
/*
|
||||||
|
background-color: hsl(var(--hue), 0%, 50%);
|
||||||
|
color: hsl(var(--hue), 0%, 100%);
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.widget-menu-entry.widget-menu-entry-hidden
|
||||||
|
{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
66
source/style/widget-sources.css
Normal file
66
source/style/widget-sources.css
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
.sources
|
||||||
|
{
|
||||||
|
font-size: 0.75em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sources:not(.sources-priviliged) > .sources-create
|
||||||
|
{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sources-create
|
||||||
|
{
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sources-entries
|
||||||
|
{
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sources-entry
|
||||||
|
{
|
||||||
|
margin: 8px;
|
||||||
|
padding: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sources-entry-head
|
||||||
|
{
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sources-entry-body
|
||||||
|
{
|
||||||
|
display: block;
|
||||||
|
transition: max-height ease 0.5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sources-entry-body > ul
|
||||||
|
{
|
||||||
|
list-style-type: none;
|
||||||
|
padding: 0;
|
||||||
|
margin-left: 8px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sources-entry-body > ul > li
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
display: block;
|
||||||
|
*/
|
||||||
|
margin-top: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sources-entry:not(.sources-entry-open) > .sources-entry-head {}
|
||||||
|
.sources-entry:not(.sources-entry-open) > .sources-entry-body {max-height: 0; overflow: hidden;}
|
||||||
|
|
||||||
|
.sources-entry.sources-entry-open > .sources-entry-head {}
|
||||||
|
.sources-entry.sources-entry-open > .sources-entry-body {max-height: 240px; overflow: auto;}
|
||||||
|
|
||||||
|
.sources-entry-hidden
|
||||||
|
{
|
||||||
|
filter: saturate(0);
|
||||||
|
}
|
||||||
96
source/style/widget-weekview.css
Normal file
96
source/style/widget-weekview.css
Normal file
|
|
@ -0,0 +1,96 @@
|
||||||
|
.weekview-controls
|
||||||
|
{
|
||||||
|
margin-bottom: 12px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.weekview-control
|
||||||
|
{
|
||||||
|
margin: 0 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.weekview-table table
|
||||||
|
{
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
.weekview-cell
|
||||||
|
{
|
||||||
|
border: 1px solid hsl(0,0%,37.5%);
|
||||||
|
padding: 8px;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.weekview-cell-day
|
||||||
|
{
|
||||||
|
width: 13.5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.weekview-cell-week
|
||||||
|
{
|
||||||
|
width: 5.5%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.weekview-cell-regular
|
||||||
|
{
|
||||||
|
width: 13.5%;
|
||||||
|
height: 120px;
|
||||||
|
|
||||||
|
cursor: copy;
|
||||||
|
}
|
||||||
|
|
||||||
|
.weekview-cell-today
|
||||||
|
{
|
||||||
|
outline: 2px solid hsl(0, 0%, 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.weekview-cell-hidden
|
||||||
|
{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.weekview-day
|
||||||
|
{
|
||||||
|
font-size: 0.75em;
|
||||||
|
cursor: help;
|
||||||
|
}
|
||||||
|
|
||||||
|
.weekview-events
|
||||||
|
{
|
||||||
|
margin: 0; padding: 0;
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.weekview-event_entry
|
||||||
|
{
|
||||||
|
margin: 4px;
|
||||||
|
padding: 4px;
|
||||||
|
border-radius: 2px;
|
||||||
|
font-size: 0.75em;
|
||||||
|
color: #FFF;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
max-width: 100%;
|
||||||
|
min-width: 75px;
|
||||||
|
word-wrap: anywhere;
|
||||||
|
}
|
||||||
|
|
||||||
|
.weekview-event_entry.access_level-none
|
||||||
|
,
|
||||||
|
.weekview-event_entry.access_level-view
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
cursor: default;
|
||||||
|
*/
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.weekview-event_entry.access_level-edit
|
||||||
|
,
|
||||||
|
.weekview-event_entry.access_level-admin
|
||||||
|
{
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
@ -39,20 +39,20 @@ namespace _dali.widgets.calendar_edit
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
private initial_value : _dali.type_calendar_object;
|
private initial_value : (null | _dali.type_calendar_object);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
public constructor(
|
public constructor(
|
||||||
users : Array<{id : _dali.type_user_id; name : string;}>,
|
users : Array<{id : _dali.type_user_id; name : string;}>,
|
||||||
initial_value : _dali.type_calendar_object,
|
|
||||||
{
|
{
|
||||||
"read_only": read_only = false,
|
"read_only": read_only = false,
|
||||||
"action_cancel": action_cancel = null,
|
"action_cancel": action_cancel = null,
|
||||||
"action_add": action_add = null,
|
"action_add": action_add = null,
|
||||||
"action_change": action_change = null,
|
"action_change": action_change = null,
|
||||||
"action_remove": action_remove = null,
|
"action_remove": action_remove = null,
|
||||||
|
"initial_value": initial_value = null,
|
||||||
}
|
}
|
||||||
:
|
:
|
||||||
{
|
{
|
||||||
|
|
@ -61,6 +61,7 @@ namespace _dali.widgets.calendar_edit
|
||||||
action_add ?: (null | ((value : _dali.type_calendar_object) => void))
|
action_add ?: (null | ((value : _dali.type_calendar_object) => void))
|
||||||
action_change ?: (null | ((value : _dali.type_calendar_object) => void));
|
action_change ?: (null | ((value : _dali.type_calendar_object) => void));
|
||||||
action_remove ?: (null | ((value : _dali.type_calendar_object) => void));
|
action_remove ?: (null | ((value : _dali.type_calendar_object) => void));
|
||||||
|
initial_value ?: (null | _dali.type_calendar_object);
|
||||||
}
|
}
|
||||||
=
|
=
|
||||||
{
|
{
|
||||||
|
|
@ -68,12 +69,12 @@ namespace _dali.widgets.calendar_edit
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
this.users = users;
|
this.users = users;
|
||||||
this.initial_value = initial_value;
|
|
||||||
this.read_only = read_only;
|
this.read_only = read_only;
|
||||||
this.action_cancel = action_cancel;
|
this.action_cancel = action_cancel;
|
||||||
this.action_add = action_add;
|
this.action_add = action_add;
|
||||||
this.action_change = action_change;
|
this.action_change = action_change;
|
||||||
this.action_remove = action_remove;
|
this.action_remove = action_remove;
|
||||||
|
this.initial_value = initial_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -212,8 +213,35 @@ namespace _dali.widgets.calendar_edit
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
await form.setup(target_element);
|
await form.setup(target_element);
|
||||||
await form.input_lock(this.read_only);
|
await form.input_write(
|
||||||
await form.input_write(this.initial_value);
|
(! (this.initial_value === null))
|
||||||
|
?
|
||||||
|
this.initial_value
|
||||||
|
:
|
||||||
|
{
|
||||||
|
"name": "",
|
||||||
|
"hue": lib_plankton.random.generate_unit(),
|
||||||
|
"access": {
|
||||||
|
"public": false,
|
||||||
|
"default_level": _dali.enum_access_level.view,
|
||||||
|
"attributed": lib_plankton.map.hashmap.implementation_map<
|
||||||
|
_dali.type_user_id,
|
||||||
|
_dali.enum_access_level
|
||||||
|
>(
|
||||||
|
lib_plankton.map.hashmap.make<
|
||||||
|
_dali.type_user_id,
|
||||||
|
_dali.enum_access_level
|
||||||
|
>(
|
||||||
|
user_id => user_id.toFixed(0),
|
||||||
|
)
|
||||||
|
),
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* @todo
|
||||||
|
*/
|
||||||
|
"resource_id": 0,
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -184,15 +184,13 @@ namespace _dali.widgets.event_edit
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "event_begin",
|
"name": "event_begin",
|
||||||
"input": _dali.helpers.datetime_input(
|
"input": _dali.helpers.datetime_input(),
|
||||||
),
|
|
||||||
"label": lib_plankton.translate.get("event.begin")
|
"label": lib_plankton.translate.get("event.begin")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "event_end",
|
"name": "event_end",
|
||||||
"input": new lib_plankton.zoo_input.class_input_soft<lib_plankton.pit.type_datetime>(
|
"input": new lib_plankton.zoo_input.class_input_soft<lib_plankton.pit.type_datetime>(
|
||||||
_dali.helpers.datetime_input(
|
_dali.helpers.datetime_input()
|
||||||
)
|
|
||||||
),
|
),
|
||||||
"label": lib_plankton.translate.get("event.end")
|
"label": lib_plankton.translate.get("event.end")
|
||||||
},
|
},
|
||||||
|
|
@ -297,7 +295,6 @@ namespace _dali.widgets.event_edit
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
await form.setup(target_element);
|
await form.setup(target_element);
|
||||||
await form.input_lock(this.read_only);
|
|
||||||
await form.input_write(this.initial_value);
|
await form.input_write(this.initial_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,19 +25,19 @@ namespace _dali.widgets.sources
|
||||||
/**
|
/**
|
||||||
* [hook]
|
* [hook]
|
||||||
*/
|
*/
|
||||||
private action_toggle : ((entry : type_entry, mode : boolean) => void);
|
private action_open : ((entry : type_entry) => void);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [hook]
|
* [hook]
|
||||||
*/
|
*/
|
||||||
private action_select : ((entry : type_entry) => void);
|
private action_toggle_visibility : ((entry : type_entry, mode : boolean) => void);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [hook]
|
* [hook]
|
||||||
*/
|
*/
|
||||||
private action_add : (() => void);
|
private action_create : (() => void);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -57,16 +57,16 @@ namespace _dali.widgets.sources
|
||||||
public constructor(
|
public constructor(
|
||||||
get_entries : (() => Promise<Array<type_entry>>),
|
get_entries : (() => Promise<Array<type_entry>>),
|
||||||
{
|
{
|
||||||
"action_select": action_select = ((calendar_id) => {}),
|
"action_open": action_open = ((calendar_id) => {}),
|
||||||
"action_toggle": action_toggle = ((calendar_id, mode) => {}),
|
"action_toggle_visibility": action_toggle_visibility = ((calendar_id, mode) => {}),
|
||||||
"action_add": action_add = (() => {}),
|
"action_create": action_create = (() => {}),
|
||||||
"initial_priviliged": initial_priviliged = false,
|
"initial_priviliged": initial_priviliged = false,
|
||||||
}
|
}
|
||||||
:
|
:
|
||||||
{
|
{
|
||||||
action_select ?: ((entry : type_entry) => void);
|
action_open ?: ((entry : type_entry) => void);
|
||||||
action_toggle ?: ((entry : type_entry, mode : boolean) => void);
|
action_toggle_visibility ?: ((entry : type_entry, mode : boolean) => void);
|
||||||
action_add ?: (() => void);
|
action_create ?: (() => void);
|
||||||
initial_priviliged ?: boolean;
|
initial_priviliged ?: boolean;
|
||||||
}
|
}
|
||||||
=
|
=
|
||||||
|
|
@ -78,9 +78,9 @@ namespace _dali.widgets.sources
|
||||||
this.get_entries = get_entries;
|
this.get_entries = get_entries;
|
||||||
|
|
||||||
// hooks
|
// hooks
|
||||||
this.action_select = action_select;
|
this.action_open = action_open;
|
||||||
this.action_toggle = action_toggle;
|
this.action_toggle_visibility = action_toggle_visibility;
|
||||||
this.action_add = action_add;
|
this.action_create = action_create;
|
||||||
|
|
||||||
// state
|
// state
|
||||||
this.priviliged = initial_priviliged;
|
this.priviliged = initial_priviliged;
|
||||||
|
|
@ -191,7 +191,7 @@ namespace _dali.widgets.sources
|
||||||
"click",
|
"click",
|
||||||
(event) => {
|
(event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.action_add();
|
this.action_create();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
this.container.querySelectorAll(".sources-entry-visibility").forEach(
|
this.container.querySelectorAll(".sources-entry-visibility").forEach(
|
||||||
|
|
@ -204,7 +204,7 @@ namespace _dali.widgets.sources
|
||||||
const calendar_id : _dali.type_calendar_id = class_widget_sources.id_decode(key_encoded);
|
const calendar_id : _dali.type_calendar_id = class_widget_sources.id_decode(key_encoded);
|
||||||
const entry : type_entry = data.get(calendar_id);
|
const entry : type_entry = data.get(calendar_id);
|
||||||
element.parentElement.classList.toggle("sources-entry-hidden", (! mode));
|
element.parentElement.classList.toggle("sources-entry-hidden", (! mode));
|
||||||
this.action_toggle(entry, mode);
|
this.action_toggle_visibility(entry, mode);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -223,7 +223,7 @@ namespace _dali.widgets.sources
|
||||||
const key_encoded : string = element.getAttribute("rel");
|
const key_encoded : string = element.getAttribute("rel");
|
||||||
const calendar_id : _dali.type_calendar_id = class_widget_sources.id_decode(key_encoded);
|
const calendar_id : _dali.type_calendar_id = class_widget_sources.id_decode(key_encoded);
|
||||||
const entry : type_entry = data.get(calendar_id);
|
const entry : type_entry = data.get(calendar_id);
|
||||||
this.action_select(entry);
|
this.action_open(entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -366,13 +366,10 @@ namespace _dali.widgets.weekview
|
||||||
"tableview-cell-entry",
|
"tableview-cell-entry",
|
||||||
{
|
{
|
||||||
"color": _dali.helpers.event_color(entry.hue),
|
"color": _dali.helpers.event_color(entry.hue),
|
||||||
/*
|
|
||||||
"title": class_widget_weekview.event_generate_tooltip(
|
"title": class_widget_weekview.event_generate_tooltip(
|
||||||
entry.calendar_name,
|
entry.calendar_name,
|
||||||
entry.event_object
|
entry.event_object
|
||||||
),
|
),
|
||||||
*/
|
|
||||||
"title": "",
|
|
||||||
"name": entry.event_object.name,
|
"name": entry.event_object.name,
|
||||||
"rel": entry.key,
|
"rel": entry.key,
|
||||||
"additional_classes": lib_plankton.string.coin(
|
"additional_classes": lib_plankton.string.coin(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue