@ticatec/uniface-flexi-module 0.0.2
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.
- package/FLEXICRITERIASET_GUIDE.md +1559 -0
- package/FLEXICRITERIASET_GUIDE_CN.md +1133 -0
- package/FLEXIDATATABLE_GUIDE.md +1650 -0
- package/FLEXIDATATABLE_GUIDE_CN.md +1650 -0
- package/FLEXIFORM_GUIDE.md +1068 -0
- package/FLEXIFORM_GUIDE_CN.md +1068 -0
- package/FLEXI_CONTEXT_GUIDE_CN.md +172 -0
- package/MODULE_LOADER_CN.md +228 -0
- package/README.md +307 -0
- package/README_CN.md +51 -0
- package/SANDBOX_CN.md +201 -0
- package/dist/FlexiContext.d.ts +28 -0
- package/dist/FlexiContext.js +45 -0
- package/dist/ModuleLoader.d.ts +41 -0
- package/dist/ModuleLoader.js +55 -0
- package/dist/Sandbox.d.ts +33 -0
- package/dist/Sandbox.js +101 -0
- package/dist/criteria-panel/CriteriaFieldsPanel.svelte +26 -0
- package/dist/criteria-panel/CriteriaFieldsPanel.svelte.d.ts +22 -0
- package/dist/criteria-panel/components/CascadeSelectSearchField.svelte +10 -0
- package/dist/criteria-panel/components/CascadeSelectSearchField.svelte.d.ts +25 -0
- package/dist/criteria-panel/components/DateRangeField.svelte +11 -0
- package/dist/criteria-panel/components/DateRangeField.svelte.d.ts +25 -0
- package/dist/criteria-panel/components/DateSearchField.svelte +10 -0
- package/dist/criteria-panel/components/DateSearchField.svelte.d.ts +24 -0
- package/dist/criteria-panel/components/DateTimeSearchField.svelte +10 -0
- package/dist/criteria-panel/components/DateTimeSearchField.svelte.d.ts +24 -0
- package/dist/criteria-panel/components/InputOptionSelectSearchField.svelte +9 -0
- package/dist/criteria-panel/components/InputOptionSelectSearchField.svelte.d.ts +24 -0
- package/dist/criteria-panel/components/NumberRangeField.svelte +11 -0
- package/dist/criteria-panel/components/NumberRangeField.svelte.d.ts +25 -0
- package/dist/criteria-panel/components/NumberSearchField.svelte +9 -0
- package/dist/criteria-panel/components/NumberSearchField.svelte.d.ts +24 -0
- package/dist/criteria-panel/components/OptionMultiSelectSearchField.svelte +9 -0
- package/dist/criteria-panel/components/OptionMultiSelectSearchField.svelte.d.ts +24 -0
- package/dist/criteria-panel/components/OptionSelectSearchField.svelte +9 -0
- package/dist/criteria-panel/components/OptionSelectSearchField.svelte.d.ts +24 -0
- package/dist/criteria-panel/components/SearchField.svelte +14 -0
- package/dist/criteria-panel/components/SearchField.svelte.d.ts +33 -0
- package/dist/criteria-panel/components/TextSearchField.svelte +9 -0
- package/dist/criteria-panel/components/TextSearchField.svelte.d.ts +24 -0
- package/dist/criteria-panel/components/UnknownCriteriaField.svelte +9 -0
- package/dist/criteria-panel/components/UnknownCriteriaField.svelte.d.ts +24 -0
- package/dist/criteria-panel/index.d.ts +6 -0
- package/dist/criteria-panel/index.js +6 -0
- package/dist/criteria-panel/lib/CriteriaComponentBuilder.d.ts +19 -0
- package/dist/criteria-panel/lib/CriteriaComponentBuilder.js +31 -0
- package/dist/criteria-panel/lib/CriteriaFieldBuilder.d.ts +1 -0
- package/dist/criteria-panel/lib/CriteriaFieldBuilder.js +127 -0
- package/dist/criteria-panel/lib/FlexiCriteriaField.d.ts +38 -0
- package/dist/criteria-panel/lib/FlexiCriteriaField.js +31 -0
- package/dist/criteria-panel/lib/FlexiCriteriaSet.d.ts +24 -0
- package/dist/criteria-panel/lib/FlexiCriteriaSet.js +48 -0
- package/dist/flexi-datatable/FlexiDataTable.d.ts +111 -0
- package/dist/flexi-datatable/FlexiDataTable.js +90 -0
- package/dist/flexi-datatable/index.d.ts +2 -0
- package/dist/flexi-datatable/index.js +2 -0
- package/dist/flexi-form/FlexiCompound.d.ts +34 -0
- package/dist/flexi-form/FlexiCompound.js +84 -0
- package/dist/flexi-form/FlexiFormDialog.svelte +24 -0
- package/dist/flexi-form/FlexiFormDialog.svelte.d.ts +21 -0
- package/dist/flexi-form/FlexiFormPage.svelte +26 -0
- package/dist/flexi-form/FlexiFormPage.svelte.d.ts +25 -0
- package/dist/flexi-form/Schema.d.ts +6 -0
- package/dist/flexi-form/Schema.js +1 -0
- package/dist/flexi-form/components/BreakLine.svelte +1 -0
- package/dist/flexi-form/components/BreakLine.svelte.d.ts +26 -0
- package/dist/flexi-form/components/CardTitleBar.svelte +18 -0
- package/dist/flexi-form/components/CardTitleBar.svelte.d.ts +22 -0
- package/dist/flexi-form/components/CascadeOptionSelectField.svelte +13 -0
- package/dist/flexi-form/components/CascadeOptionSelectField.svelte.d.ts +24 -0
- package/dist/flexi-form/components/CellFieldBuilder.d.ts +1 -0
- package/dist/flexi-form/components/CellFieldBuilder.js +178 -0
- package/dist/flexi-form/components/DateField.svelte +12 -0
- package/dist/flexi-form/components/DateField.svelte.d.ts +24 -0
- package/dist/flexi-form/components/DateTimeField.svelte +13 -0
- package/dist/flexi-form/components/DateTimeField.svelte.d.ts +24 -0
- package/dist/flexi-form/components/InputOptionSelectField.svelte +13 -0
- package/dist/flexi-form/components/InputOptionSelectField.svelte.d.ts +24 -0
- package/dist/flexi-form/components/MemoField.svelte +12 -0
- package/dist/flexi-form/components/MemoField.svelte.d.ts +24 -0
- package/dist/flexi-form/components/NumberField.svelte +12 -0
- package/dist/flexi-form/components/NumberField.svelte.d.ts +24 -0
- package/dist/flexi-form/components/OptionsMultiSelectField.svelte +13 -0
- package/dist/flexi-form/components/OptionsMultiSelectField.svelte.d.ts +24 -0
- package/dist/flexi-form/components/OptionsSelectField.svelte +13 -0
- package/dist/flexi-form/components/OptionsSelectField.svelte.d.ts +24 -0
- package/dist/flexi-form/components/TextField.svelte +12 -0
- package/dist/flexi-form/components/TextField.svelte.d.ts +24 -0
- package/dist/flexi-form/components/UnitNumberField.svelte +12 -0
- package/dist/flexi-form/components/UnitNumberField.svelte.d.ts +24 -0
- package/dist/flexi-form/components/UnknownTypeField.svelte +5 -0
- package/dist/flexi-form/components/UnknownTypeField.svelte.d.ts +18 -0
- package/dist/flexi-form/containers/FlexiPanel.svelte +13 -0
- package/dist/flexi-form/containers/FlexiPanel.svelte.d.ts +33 -0
- package/dist/flexi-form/flexi_card/FlexiCard.d.ts +64 -0
- package/dist/flexi-form/flexi_card/FlexiCard.js +66 -0
- package/dist/flexi-form/flexi_card/FlexiCardPanel.svelte +57 -0
- package/dist/flexi-form/flexi_card/FlexiCardPanel.svelte.d.ts +22 -0
- package/dist/flexi-form/flexi_composite/FlexiComposite.d.ts +50 -0
- package/dist/flexi-form/flexi_composite/FlexiComposite.js +26 -0
- package/dist/flexi-form/flexi_composite/FlexiCompositePanel.svelte +42 -0
- package/dist/flexi-form/flexi_composite/FlexiCompositePanel.svelte.d.ts +25 -0
- package/dist/flexi-form/flexi_composite/README.md +50 -0
- package/dist/flexi-form/flexi_datasheet/FlexiDataSheet.d.ts +4 -0
- package/dist/flexi-form/flexi_datasheet/FlexiDataSheet.js +2 -0
- package/dist/flexi-form/flexi_field/FlexiField.d.ts +76 -0
- package/dist/flexi-form/flexi_field/FlexiField.js +128 -0
- package/dist/flexi-form/flexi_field/FlexiFieldCell.svelte +35 -0
- package/dist/flexi-form/flexi_field/FlexiFieldCell.svelte.d.ts +25 -0
- package/dist/flexi-form/flexi_field/UnknownField.d.ts +3 -0
- package/dist/flexi-form/flexi_field/UnknownField.js +3 -0
- package/dist/flexi-form/flexi_form/FlexiForm.d.ts +127 -0
- package/dist/flexi-form/flexi_form/FlexiForm.js +160 -0
- package/dist/flexi-form/flexi_form/FlexiFormPanel.svelte +57 -0
- package/dist/flexi-form/flexi_form/FlexiFormPanel.svelte.d.ts +25 -0
- package/dist/flexi-form/index.d.ts +11 -0
- package/dist/flexi-form/index.js +11 -0
- package/dist/flexi-form/lib/ComponentBuilder.d.ts +15 -0
- package/dist/flexi-form/lib/ComponentBuilder.js +31 -0
- package/dist/flexi-form/lib/index.d.ts +5 -0
- package/dist/flexi-form/lib/index.js +2 -0
- package/dist/flexi-form/lib/types.d.ts +7 -0
- package/dist/flexi-form/lib/types.js +6 -0
- package/dist/flexi-form/lib/utils.d.ts +10 -0
- package/dist/flexi-form/lib/utils.js +48 -0
- package/dist/i18n-res/i18nRes.d.ts +2 -0
- package/dist/i18n-res/i18nRes.js +8 -0
- package/dist/i18n-res/index.d.ts +2 -0
- package/dist/i18n-res/index.js +2 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/uniface-flexi-module.css +46 -0
- package/dist/utils.d.ts +4 -0
- package/dist/utils.js +8 -0
- package/package.json +135 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<script lang="ts">import DatePicker from "@ticatec/uniface-element/DatePicker";
|
|
2
|
+
export let keyField;
|
|
3
|
+
export let criteria;
|
|
4
|
+
export let props;
|
|
5
|
+
export let variant;
|
|
6
|
+
export let events = null;
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
<DatePicker {...props} {...events} {variant} bind:value={criteria[keyField]}/>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const DateSearchField: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
keyField: string;
|
|
16
|
+
criteria: any;
|
|
17
|
+
props: any;
|
|
18
|
+
variant: any;
|
|
19
|
+
events?: any;
|
|
20
|
+
}, {
|
|
21
|
+
[evt: string]: CustomEvent<any>;
|
|
22
|
+
}, {}, {}, string>;
|
|
23
|
+
type DateSearchField = InstanceType<typeof DateSearchField>;
|
|
24
|
+
export default DateSearchField;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<script lang="ts">import DateTimePicker from "@ticatec/uniface-element/DateTimePicker";
|
|
2
|
+
export let keyField;
|
|
3
|
+
export let criteria;
|
|
4
|
+
export let props;
|
|
5
|
+
export let variant;
|
|
6
|
+
export let events = null;
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
<DateTimePicker {...props} {...events} {variant} bind:value={criteria[keyField]}/>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const DateTimeSearchField: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
keyField: any;
|
|
16
|
+
criteria: any;
|
|
17
|
+
props: any;
|
|
18
|
+
variant: any;
|
|
19
|
+
events?: any;
|
|
20
|
+
}, {
|
|
21
|
+
[evt: string]: CustomEvent<any>;
|
|
22
|
+
}, {}, {}, string>;
|
|
23
|
+
type DateTimeSearchField = InstanceType<typeof DateTimeSearchField>;
|
|
24
|
+
export default DateTimeSearchField;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<script lang="ts">import InputOptionSelect from "@ticatec/uniface-element/InputOptionsSelect";
|
|
2
|
+
export let keyField;
|
|
3
|
+
export let criteria;
|
|
4
|
+
export let props = null;
|
|
5
|
+
export let variant;
|
|
6
|
+
export let events = null;
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<InputOptionSelect {...props} {...events} {variant} bind:value={criteria[keyField]} {...events}/>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const InputOptionSelectSearchField: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
keyField: string;
|
|
16
|
+
criteria: any;
|
|
17
|
+
props?: any;
|
|
18
|
+
variant: any;
|
|
19
|
+
events?: any;
|
|
20
|
+
}, {
|
|
21
|
+
[evt: string]: CustomEvent<any>;
|
|
22
|
+
}, {}, {}, string>;
|
|
23
|
+
type InputOptionSelectSearchField = InstanceType<typeof InputOptionSelectSearchField>;
|
|
24
|
+
export default InputOptionSelectSearchField;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script lang="ts">import NumberRange from "@ticatec/uniface-element/NumberRange";
|
|
2
|
+
export let fromField;
|
|
3
|
+
export let toField;
|
|
4
|
+
export let criteria;
|
|
5
|
+
export let props;
|
|
6
|
+
export let variant;
|
|
7
|
+
export let events = null;
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
<NumberRange {...props} {...events} {variant} bind:fromValue={criteria[fromField]} bind:toValue={criteria[toField]}/>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const NumberRangeField: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
fromField: any;
|
|
16
|
+
toField: any;
|
|
17
|
+
criteria: any;
|
|
18
|
+
props: any;
|
|
19
|
+
variant: any;
|
|
20
|
+
events?: any;
|
|
21
|
+
}, {
|
|
22
|
+
[evt: string]: CustomEvent<any>;
|
|
23
|
+
}, {}, {}, string>;
|
|
24
|
+
type NumberRangeField = InstanceType<typeof NumberRangeField>;
|
|
25
|
+
export default NumberRangeField;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<script lang="ts">import NumberEditor from "@ticatec/uniface-element/NumberEditor";
|
|
2
|
+
export let keyField;
|
|
3
|
+
export let criteria;
|
|
4
|
+
export let props;
|
|
5
|
+
export let variant;
|
|
6
|
+
export let events = null;
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<NumberEditor {...props} {...events} {variant} bind:value={criteria[keyField]}/>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const NumberSearchField: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
keyField: string;
|
|
16
|
+
criteria: any;
|
|
17
|
+
props: any;
|
|
18
|
+
variant: any;
|
|
19
|
+
events?: any;
|
|
20
|
+
}, {
|
|
21
|
+
[evt: string]: CustomEvent<any>;
|
|
22
|
+
}, {}, {}, string>;
|
|
23
|
+
type NumberSearchField = InstanceType<typeof NumberSearchField>;
|
|
24
|
+
export default NumberSearchField;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<script lang="ts">import OptionMultiSelect from "@ticatec/uniface-element/OptionsMultiSelect";
|
|
2
|
+
export let keyField;
|
|
3
|
+
export let criteria;
|
|
4
|
+
export let props = null;
|
|
5
|
+
export let variant;
|
|
6
|
+
export let events = null;
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<OptionMultiSelect {...props} {...events} {variant} bind:value={criteria[keyField]}/>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const OptionMultiSelectSearchField: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
keyField: string;
|
|
16
|
+
criteria: any;
|
|
17
|
+
props?: any;
|
|
18
|
+
variant: any;
|
|
19
|
+
events?: any;
|
|
20
|
+
}, {
|
|
21
|
+
[evt: string]: CustomEvent<any>;
|
|
22
|
+
}, {}, {}, string>;
|
|
23
|
+
type OptionMultiSelectSearchField = InstanceType<typeof OptionMultiSelectSearchField>;
|
|
24
|
+
export default OptionMultiSelectSearchField;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<script lang="ts">import OptionSelect from "@ticatec/uniface-element/OptionsSelect";
|
|
2
|
+
export let keyField;
|
|
3
|
+
export let criteria;
|
|
4
|
+
export let props = null;
|
|
5
|
+
export let variant;
|
|
6
|
+
export let events = null;
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<OptionSelect {...props} {...events} {variant} bind:value={criteria[keyField]}/>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const OptionSelectSearchField: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
keyField: string;
|
|
16
|
+
criteria: any;
|
|
17
|
+
props?: any;
|
|
18
|
+
variant: any;
|
|
19
|
+
events?: any;
|
|
20
|
+
}, {
|
|
21
|
+
[evt: string]: CustomEvent<any>;
|
|
22
|
+
}, {}, {}, string>;
|
|
23
|
+
type OptionSelectSearchField = InstanceType<typeof OptionSelectSearchField>;
|
|
24
|
+
export default OptionSelectSearchField;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script lang="ts">import CriteriaField from "@ticatec/uniface-element/CriteriaField";
|
|
2
|
+
export let size = undefined;
|
|
3
|
+
export let width = '';
|
|
4
|
+
export let label = '';
|
|
5
|
+
export let label$style = '';
|
|
6
|
+
export let style = '';
|
|
7
|
+
let cssWidth = '';
|
|
8
|
+
$: cssWidth = (width == null || width.trim().length == 0) ? '' : `width: ${width}`;
|
|
9
|
+
$: console.log('组件尺寸', size);
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<CriteriaField style="display: block; box-sizing: border-box; {style}; {cssWidth}" {size} {label} {label$style}>
|
|
13
|
+
<slot/>
|
|
14
|
+
</CriteriaField>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
15
|
+
default: any;
|
|
16
|
+
} ? Props extends Record<string, never> ? any : {
|
|
17
|
+
children?: any;
|
|
18
|
+
} : {});
|
|
19
|
+
declare const SearchField: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
20
|
+
size?: "x15" | "x20" | "x25" | "x30" | "x35" | "x40" | undefined;
|
|
21
|
+
width?: string;
|
|
22
|
+
label?: string;
|
|
23
|
+
label$style?: string;
|
|
24
|
+
style?: string;
|
|
25
|
+
}, {
|
|
26
|
+
default: {};
|
|
27
|
+
}>, {
|
|
28
|
+
[evt: string]: CustomEvent<any>;
|
|
29
|
+
}, {
|
|
30
|
+
default: {};
|
|
31
|
+
}, {}, string>;
|
|
32
|
+
type SearchField = InstanceType<typeof SearchField>;
|
|
33
|
+
export default SearchField;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<script lang="ts">import TextEditor from "@ticatec/uniface-element/TextEditor";
|
|
2
|
+
export let keyField;
|
|
3
|
+
export let criteria;
|
|
4
|
+
export let props;
|
|
5
|
+
export let variant;
|
|
6
|
+
export let events = null;
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<TextEditor {...props} {...events} {variant} bind:value={criteria[keyField]}/>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const TextSearchField: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
keyField: string;
|
|
16
|
+
criteria: any;
|
|
17
|
+
props: any;
|
|
18
|
+
variant: any;
|
|
19
|
+
events?: any;
|
|
20
|
+
}, {
|
|
21
|
+
[evt: string]: CustomEvent<any>;
|
|
22
|
+
}, {}, {}, string>;
|
|
23
|
+
type TextSearchField = InstanceType<typeof TextSearchField>;
|
|
24
|
+
export default TextSearchField;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const UnknownCriteriaField: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
+
keyField: string;
|
|
16
|
+
criteria: any;
|
|
17
|
+
props: any;
|
|
18
|
+
variant: any;
|
|
19
|
+
events?: any;
|
|
20
|
+
}, {
|
|
21
|
+
[evt: string]: CustomEvent<any>;
|
|
22
|
+
}, {}, {}, string>;
|
|
23
|
+
type UnknownCriteriaField = InstanceType<typeof UnknownCriteriaField>;
|
|
24
|
+
export default UnknownCriteriaField;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import FlexiCriteriaSet from "./lib/FlexiCriteriaSet";
|
|
2
|
+
import FlexiCriteriaField from "./lib/FlexiCriteriaField";
|
|
3
|
+
import CriteriaFieldsPanel from "./CriteriaFieldsPanel.svelte";
|
|
4
|
+
import { registerCriteriaFieldBuilder } from "./lib/CriteriaFieldBuilder";
|
|
5
|
+
export default CriteriaFieldsPanel;
|
|
6
|
+
export { FlexiCriteriaSet, FlexiCriteriaField, registerCriteriaFieldBuilder };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import FlexiCriteriaSet from "./lib/FlexiCriteriaSet";
|
|
2
|
+
import FlexiCriteriaField from "./lib/FlexiCriteriaField";
|
|
3
|
+
import CriteriaFieldsPanel from "./CriteriaFieldsPanel.svelte";
|
|
4
|
+
import { registerCriteriaFieldBuilder } from "./lib/CriteriaFieldBuilder";
|
|
5
|
+
export default CriteriaFieldsPanel;
|
|
6
|
+
export { FlexiCriteriaSet, FlexiCriteriaField, registerCriteriaFieldBuilder };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { FlexiCriteriaFieldSchema } from "./FlexiCriteriaField";
|
|
2
|
+
export type KeyAttr = {
|
|
3
|
+
[key: string]: string;
|
|
4
|
+
};
|
|
5
|
+
export type CriteriaFieldComponent = {
|
|
6
|
+
component: any;
|
|
7
|
+
props: any;
|
|
8
|
+
keyFields: KeyAttr;
|
|
9
|
+
};
|
|
10
|
+
export type DictionaryLoader = (name: string) => Array<any>;
|
|
11
|
+
export type BuildField = (schema: FlexiCriteriaFieldSchema, dictLoader: DictionaryLoader) => CriteriaFieldComponent;
|
|
12
|
+
export default class CriteriaComponentBuilder {
|
|
13
|
+
private static instance;
|
|
14
|
+
private map;
|
|
15
|
+
private constructor();
|
|
16
|
+
static getInstance(): CriteriaComponentBuilder;
|
|
17
|
+
register(type: string, builder: BuildField): void;
|
|
18
|
+
buildField(schema: FlexiCriteriaFieldSchema, dictLoader: DictionaryLoader): CriteriaFieldComponent;
|
|
19
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import UnknownCriteriaField from "../components/UnknownCriteriaField.svelte";
|
|
2
|
+
const unknownField = {
|
|
3
|
+
component: UnknownCriteriaField,
|
|
4
|
+
keyFields: {},
|
|
5
|
+
props: {}
|
|
6
|
+
};
|
|
7
|
+
export default class CriteriaComponentBuilder {
|
|
8
|
+
static instance;
|
|
9
|
+
map;
|
|
10
|
+
constructor() {
|
|
11
|
+
this.map = new Map;
|
|
12
|
+
}
|
|
13
|
+
static getInstance() {
|
|
14
|
+
if (CriteriaComponentBuilder.instance == null) {
|
|
15
|
+
CriteriaComponentBuilder.instance = new CriteriaComponentBuilder();
|
|
16
|
+
}
|
|
17
|
+
return CriteriaComponentBuilder.instance;
|
|
18
|
+
}
|
|
19
|
+
register(type, builder) {
|
|
20
|
+
this.map.set(type, builder);
|
|
21
|
+
}
|
|
22
|
+
buildField(schema, dictLoader) {
|
|
23
|
+
let builder = this.map.get(schema.type);
|
|
24
|
+
if (builder != null) {
|
|
25
|
+
return builder(schema, dictLoader);
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
return unknownField;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const registerCriteriaFieldBuilder: () => void;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import CriteriaComponentBuilder, {} from "./CriteriaComponentBuilder";
|
|
2
|
+
import TextSearchField from "../components/TextSearchField.svelte";
|
|
3
|
+
import OptionSelectSearchField from "../components/OptionSelectSearchField.svelte";
|
|
4
|
+
import DateSearchField from "../components/DateSearchField.svelte";
|
|
5
|
+
import DateRangeField from "../components/DateRangeField.svelte";
|
|
6
|
+
import utils from "../../utils";
|
|
7
|
+
import DateTimeSearchField from "../components/DateTimeSearchField.svelte";
|
|
8
|
+
import CascadeSelectSearchField from "../components/CascadeSelectSearchField.svelte";
|
|
9
|
+
import InputOptionSelectField from "../../flexi-form/components/InputOptionSelectField.svelte";
|
|
10
|
+
import OptionsMultiSelectField from "../../flexi-form/components/OptionsMultiSelectField.svelte";
|
|
11
|
+
import NumberRangeField from "../components/NumberRangeField.svelte";
|
|
12
|
+
/**
|
|
13
|
+
* 构造一个文字输入框
|
|
14
|
+
* @param schema
|
|
15
|
+
* @param dictLoader
|
|
16
|
+
*/
|
|
17
|
+
const buildTextEditor = (schema, dictLoader) => {
|
|
18
|
+
const props = schema.props;
|
|
19
|
+
return {
|
|
20
|
+
component: TextSearchField,
|
|
21
|
+
keyFields: { keyField: schema.keys.valueField },
|
|
22
|
+
props: utils.propsFilter(props, ['value', "disabled", "readonly", "mandatory", "displayMode"])
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* 构造下拉选择框
|
|
27
|
+
* @param schema
|
|
28
|
+
* @param dictLoader
|
|
29
|
+
*/
|
|
30
|
+
const buildOptionsSelector = (schema, dictLoader) => {
|
|
31
|
+
const props = schema.props;
|
|
32
|
+
if (schema.dictName) {
|
|
33
|
+
props.options = dictLoader(schema.dictName);
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
component: OptionSelectSearchField,
|
|
37
|
+
keyFields: { keyField: schema.keys.valueField },
|
|
38
|
+
props: utils.propsFilter(props, ['value', "disabled", "readonly", "mandatory", "displayMode"]),
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
const buildDateRangeField = (schema, dictLoader) => {
|
|
42
|
+
const props = schema.props;
|
|
43
|
+
return {
|
|
44
|
+
component: DateRangeField,
|
|
45
|
+
keyFields: { fromField: schema.keys.fromField, toField: schema.keys.toField },
|
|
46
|
+
props: utils.propsFilter(props, ['fromValue', 'toValue', "disabled", "readonly", "mandatory", "displayMode"])
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
const buildNumberRangeField = (schema, dictLoader) => {
|
|
50
|
+
const props = schema.props;
|
|
51
|
+
return {
|
|
52
|
+
component: NumberRangeField,
|
|
53
|
+
keyFields: { fromField: schema.keys.fromField, toField: schema.keys.toField },
|
|
54
|
+
props: utils.propsFilter(props, ['fromValue', 'toValue', 'value', "disabled", "readonly", "mandatory", "displayMode"])
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* 构造日期选择框
|
|
59
|
+
* @param schema
|
|
60
|
+
* @param dictLoader
|
|
61
|
+
*/
|
|
62
|
+
const buildDateField = (schema, dictLoader) => {
|
|
63
|
+
const props = schema.props;
|
|
64
|
+
return {
|
|
65
|
+
component: DateSearchField,
|
|
66
|
+
keyFields: { keyField: schema.keys.valueField },
|
|
67
|
+
props: utils.propsFilter(props, ['value', "disabled", "readonly", "mandatory", "displayMode"])
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* 构造时间选择框
|
|
72
|
+
* @param schema
|
|
73
|
+
* @param dictLoader
|
|
74
|
+
*/
|
|
75
|
+
const buildTimeField = (schema, dictLoader) => {
|
|
76
|
+
const props = schema.props;
|
|
77
|
+
return {
|
|
78
|
+
component: DateTimeSearchField,
|
|
79
|
+
keyFields: { keyField: schema.keys.valueField },
|
|
80
|
+
props: utils.propsFilter(props, ['value', "disabled", "readonly", "mandatory", "displayMode"])
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
const buildCascadeField = (schema, dictLoader) => {
|
|
84
|
+
const props = schema.props;
|
|
85
|
+
return {
|
|
86
|
+
component: CascadeSelectSearchField,
|
|
87
|
+
keyFields: { keyField: schema.keys.valueField, textField: schema.keys.textField },
|
|
88
|
+
props: utils.propsFilter(props, ['value', "disabled", "readonly", "mandatory", "displayMode"])
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
const buildInputOptionsField = (schema, dictLoader) => {
|
|
92
|
+
const props = schema.props;
|
|
93
|
+
return {
|
|
94
|
+
component: InputOptionSelectField,
|
|
95
|
+
keyFields: { field: schema.keys.valueField },
|
|
96
|
+
props: utils.propsFilter(props, ['value', "disabled", "readonly", "mandatory", "displayMode"])
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
const buildMultiOptionsField = (schema, dictLoader) => {
|
|
100
|
+
const props = schema.props;
|
|
101
|
+
return {
|
|
102
|
+
component: OptionsMultiSelectField,
|
|
103
|
+
keyFields: { field: schema.keys.valueField },
|
|
104
|
+
props: utils.propsFilter(props, ['value', "disabled", "readonly", "mandatory", "displayMode"])
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
const buildNumberSearchField = (schema, dictLoader) => {
|
|
108
|
+
const props = schema.props;
|
|
109
|
+
return {
|
|
110
|
+
component: OptionsMultiSelectField,
|
|
111
|
+
keyFields: { field: schema.keys.valueField },
|
|
112
|
+
props: utils.propsFilter(props, ['value', "disabled", "readonly", "mandatory", "displayMode"])
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
export const registerCriteriaFieldBuilder = () => {
|
|
116
|
+
const componentBuilder = CriteriaComponentBuilder.getInstance();
|
|
117
|
+
componentBuilder.register('cascade-options', buildCascadeField);
|
|
118
|
+
componentBuilder.register('date-range', buildDateRangeField);
|
|
119
|
+
componentBuilder.register('date-picker', buildDateField);
|
|
120
|
+
componentBuilder.register('datetime-picker', buildTimeField);
|
|
121
|
+
componentBuilder.register('input-options-selector', buildInputOptionsField);
|
|
122
|
+
componentBuilder.register('number-range', buildNumberRangeField);
|
|
123
|
+
componentBuilder.register('number-editor', buildNumberSearchField);
|
|
124
|
+
componentBuilder.register('options-multi-selector', buildMultiOptionsField);
|
|
125
|
+
componentBuilder.register('options-selector', buildOptionsSelector);
|
|
126
|
+
componentBuilder.register('text-editor', buildTextEditor);
|
|
127
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type FlexiCriteriaSet from "./FlexiCriteriaSet";
|
|
2
|
+
import type { SvelteComponent } from "svelte";
|
|
3
|
+
export interface FlexiCriteriaFieldSchema {
|
|
4
|
+
/** 字段的类型 */
|
|
5
|
+
type: string;
|
|
6
|
+
/** 字段的名称 */
|
|
7
|
+
keys: {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
};
|
|
10
|
+
/** 字段的名称 */
|
|
11
|
+
name: string;
|
|
12
|
+
/** 关联的数据字典项目 */
|
|
13
|
+
dictName?: string;
|
|
14
|
+
/** 是否可见 */
|
|
15
|
+
visible?: boolean;
|
|
16
|
+
/** 字段的标签 */
|
|
17
|
+
label: string;
|
|
18
|
+
/** 事件 */
|
|
19
|
+
events?: Record<string, string>;
|
|
20
|
+
/** 在卡片/Block中所在单元格的属性,flex布局和grid布局对应的属性也不一样*/
|
|
21
|
+
size?: 'x15' | 'x20' | 'x25' | 'x30' | 'x35' | 'x40';
|
|
22
|
+
/** 字段的属性 */
|
|
23
|
+
props?: any;
|
|
24
|
+
}
|
|
25
|
+
export default class FlexiCriteriaField {
|
|
26
|
+
#private;
|
|
27
|
+
readonly component: typeof SvelteComponent;
|
|
28
|
+
readonly variant?: "" | "outlined" | "filled";
|
|
29
|
+
visible: boolean;
|
|
30
|
+
readonly events: any;
|
|
31
|
+
size?: 'x15' | 'x20' | 'x25' | 'x30' | 'x35' | 'x40';
|
|
32
|
+
label: string;
|
|
33
|
+
readonly keys: {
|
|
34
|
+
[key: string]: string;
|
|
35
|
+
};
|
|
36
|
+
constructor(set: FlexiCriteriaSet, schema: FlexiCriteriaFieldSchema);
|
|
37
|
+
get props(): any;
|
|
38
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import CriteriaComponentBuilder from "./CriteriaComponentBuilder";
|
|
2
|
+
export default class FlexiCriteriaField {
|
|
3
|
+
#set;
|
|
4
|
+
component;
|
|
5
|
+
variant;
|
|
6
|
+
visible;
|
|
7
|
+
#props = {};
|
|
8
|
+
events = {};
|
|
9
|
+
size;
|
|
10
|
+
label;
|
|
11
|
+
keys;
|
|
12
|
+
constructor(set, schema) {
|
|
13
|
+
this.#set = set;
|
|
14
|
+
this.visible = schema.visible != false;
|
|
15
|
+
this.size = schema.size;
|
|
16
|
+
this.label = schema.label;
|
|
17
|
+
if (schema.events) {
|
|
18
|
+
for (let key in schema.events) {
|
|
19
|
+
let eventHandler = schema.events[key];
|
|
20
|
+
this.events[key] = (...args) => set[eventHandler]?.(...args);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const cellField = CriteriaComponentBuilder.getInstance().buildField(schema, (name) => this.#set.getDictionary(name));
|
|
24
|
+
this.component = cellField.component;
|
|
25
|
+
this.#props = cellField.props;
|
|
26
|
+
this.keys = cellField.keyFields;
|
|
27
|
+
}
|
|
28
|
+
get props() {
|
|
29
|
+
return this.#props;
|
|
30
|
+
}
|
|
31
|
+
}
|