@application-kit/ui 0.0.0-stage → 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +41 -2
- package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/accent-color.d.ts +2 -0
- package/dist/accent-color.js +15 -0
- package/dist/components/avatar/Avatar.js +5 -0
- package/dist/components/avatar/Avatar.vue.d.ts +24 -0
- package/dist/components/avatar/Avatar.vue_vue_type_script_setup_true_lang.js +31 -0
- package/dist/components/button/Button.js +5 -0
- package/dist/components/button/Button.vue.d.ts +130 -0
- package/dist/components/button/Button.vue_vue_type_script_setup_true_lang.js +104 -0
- package/dist/components/button/severity-to-vendor.d.ts +4 -0
- package/dist/components/button/severity-to-vendor.js +11 -0
- package/dist/components/card/Card.js +5 -0
- package/dist/components/card/Card.vue.d.ts +17 -0
- package/dist/components/card/Card.vue_vue_type_script_setup_true_lang.js +34 -0
- package/dist/components/confirm/ConfirmHost.js +5 -0
- package/dist/components/confirm/ConfirmHost.vue.d.ts +3 -0
- package/dist/components/confirm/ConfirmHost.vue_vue_type_script_setup_true_lang.js +13 -0
- package/dist/components/confirm/install-confirmation-service.d.ts +2 -0
- package/dist/components/confirm/install-confirmation-service.js +16 -0
- package/dist/components/date-range-filter/DateRangeFilter.js +7 -0
- package/dist/components/date-range-filter/DateRangeFilter.vue.d.ts +13 -0
- package/dist/components/date-range-filter/DateRangeFilter.vue_vue_type_script_setup_true_lang.js +121 -0
- package/dist/components/dialog/Dialog.js +5 -0
- package/dist/components/dialog/Dialog.vue.d.ts +56 -0
- package/dist/components/dialog/Dialog.vue_vue_type_script_setup_true_lang.js +71 -0
- package/dist/components/drawer/Drawer.js +5 -0
- package/dist/components/drawer/Drawer.vue.d.ts +24 -0
- package/dist/components/drawer/Drawer.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/components/error-page/Error.js +7 -0
- package/dist/components/error-page/Error.vue.d.ts +62 -0
- package/dist/components/error-page/Error.vue_vue_type_script_setup_true_lang.js +93 -0
- package/dist/components/error-page/GradientBackground.js +7 -0
- package/dist/components/error-page/GradientBackground.vue.d.ts +17 -0
- package/dist/components/error-page/GradientBackground.vue_vue_type_script_setup_true_lang.js +54 -0
- package/dist/components/form/Checkbox.js +5 -0
- package/dist/components/form/Checkbox.vue.d.ts +16 -0
- package/dist/components/form/Checkbox.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/components/form/DateField.js +5 -0
- package/dist/components/form/DateField.vue.d.ts +24 -0
- package/dist/components/form/DateField.vue_vue_type_script_setup_true_lang.js +52 -0
- package/dist/components/form/DateRangeField.js +5 -0
- package/dist/components/form/DateRangeField.vue.d.ts +32 -0
- package/dist/components/form/DateRangeField.vue_vue_type_script_setup_true_lang.js +48 -0
- package/dist/components/form/InputNumber.js +5 -0
- package/dist/components/form/InputNumber.vue.d.ts +17 -0
- package/dist/components/form/InputNumber.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/components/form/InputOtp.js +5 -0
- package/dist/components/form/InputOtp.vue.d.ts +20 -0
- package/dist/components/form/InputOtp.vue_vue_type_script_setup_true_lang.js +39 -0
- package/dist/components/form/InputText.js +5 -0
- package/dist/components/form/InputText.vue.d.ts +17 -0
- package/dist/components/form/InputText.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/components/form/MultiSelect.js +5 -0
- package/dist/components/form/MultiSelect.vue.d.ts +34 -0
- package/dist/components/form/MultiSelect.vue_vue_type_script_setup_true_lang.js +47 -0
- package/dist/components/form/RadioButton.js +5 -0
- package/dist/components/form/RadioButton.vue.d.ts +27 -0
- package/dist/components/form/RadioButton.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/components/form/Select.js +5 -0
- package/dist/components/form/Select.vue.d.ts +41 -0
- package/dist/components/form/Select.vue_vue_type_script_setup_true_lang.js +78 -0
- package/dist/components/form/SelectButton.js +5 -0
- package/dist/components/form/SelectButton.vue.d.ts +27 -0
- package/dist/components/form/SelectButton.vue_vue_type_script_setup_true_lang.js +36 -0
- package/dist/components/form/Textarea.js +5 -0
- package/dist/components/form/Textarea.vue.d.ts +16 -0
- package/dist/components/form/Textarea.vue_vue_type_script_setup_true_lang.js +34 -0
- package/dist/components/form/ToggleSwitch.js +5 -0
- package/dist/components/form/ToggleSwitch.vue.d.ts +14 -0
- package/dist/components/form/ToggleSwitch.vue_vue_type_script_setup_true_lang.js +26 -0
- package/dist/components/form/date-format.d.ts +1 -0
- package/dist/components/form/date-format.js +14 -0
- package/dist/components/form/select-button-option.interface.d.ts +4 -0
- package/dist/components/icon/Icon.js +7 -0
- package/dist/components/icon/Icon.vue.d.ts +23 -0
- package/dist/components/icon/Icon.vue_vue_type_script_setup_true_lang.js +28 -0
- package/dist/components/icon-cell/IconCell.js +7 -0
- package/dist/components/icon-cell/IconCell.vue.d.ts +7 -0
- package/dist/components/icon-cell/IconCell.vue_vue_type_script_setup_true_lang.js +32 -0
- package/dist/components/layouts/EmptyLayout.js +16 -0
- package/dist/components/layouts/EmptyLayout.vue.d.ts +15 -0
- package/dist/components/message/Message.js +5 -0
- package/dist/components/message/Message.vue.d.ts +72 -0
- package/dist/components/message/Message.vue_vue_type_script_setup_true_lang.js +63 -0
- package/dist/components/message/severity-to-vendor.d.ts +4 -0
- package/dist/components/message/severity-to-vendor.js +11 -0
- package/dist/components/overlay-badge/OverlayBadge.js +5 -0
- package/dist/components/overlay-badge/OverlayBadge.vue.d.ts +16 -0
- package/dist/components/overlay-badge/OverlayBadge.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/components/skeleton/Skeleton.js +5 -0
- package/dist/components/skeleton/Skeleton.vue.d.ts +7 -0
- package/dist/components/skeleton/Skeleton.vue_vue_type_script_setup_true_lang.js +20 -0
- package/dist/components/table/DataTable.js +7 -0
- package/dist/components/table/DataTable.vue.d.ts +61 -0
- package/dist/components/table/DataTable.vue_vue_type_script_setup_true_lang.js +303 -0
- package/dist/components/table/InfiniteDataTable.js +7 -0
- package/dist/components/table/InfiniteDataTable.vue.d.ts +32 -0
- package/dist/components/table/InfiniteDataTable.vue_vue_type_script_setup_true_lang.js +88 -0
- package/dist/components/table/SelectColumnFilter.js +5 -0
- package/dist/components/table/SelectColumnFilter.vue.d.ts +29 -0
- package/dist/components/table/SelectColumnFilter.vue_vue_type_script_setup_true_lang.js +58 -0
- package/dist/components/table/StaticTable.js +5 -0
- package/dist/components/table/StaticTable.vue.d.ts +39 -0
- package/dist/components/table/StaticTable.vue_vue_type_script_setup_true_lang.js +48 -0
- package/dist/components/table/TextColumn.js +5 -0
- package/dist/components/table/TextColumn.vue.d.ts +13 -0
- package/dist/components/table/TextColumn.vue_vue_type_script_setup_true_lang.js +16 -0
- package/dist/components/table/collect-column-filters.d.ts +4 -0
- package/dist/components/table/collect-column-filters.js +11 -0
- package/dist/components/table/column-filters-interface.d.ts +10 -0
- package/dist/components/table/column-schema-interface.d.ts +20 -0
- package/dist/components/table/get-filters.d.ts +3 -0
- package/dist/components/table/get-filters.js +73 -0
- package/dist/components/table/select-column-filter-option.interface.d.ts +8 -0
- package/dist/components/table/static-table-column.d.ts +1 -0
- package/dist/components/tabs/Tabs.js +5 -0
- package/dist/components/tabs/Tabs.vue.d.ts +35 -0
- package/dist/components/tabs/Tabs.vue_vue_type_script_setup_true_lang.js +54 -0
- package/dist/components/tabs/tab-item.interface.d.ts +7 -0
- package/dist/components/tag/Tag.js +5 -0
- package/dist/components/tag/Tag.vue.d.ts +44 -0
- package/dist/components/tag/Tag.vue_vue_type_script_setup_true_lang.js +47 -0
- package/dist/components/tag/severity-to-vendor.d.ts +4 -0
- package/dist/components/tag/severity-to-vendor.js +11 -0
- package/dist/components/time-lag/TimeLag.js +7 -0
- package/dist/components/time-lag/TimeLag.vue.d.ts +29 -0
- package/dist/components/time-lag/TimeLag.vue_vue_type_script_setup_true_lang.js +38 -0
- package/dist/components/timestamp/Timestamp.js +5 -0
- package/dist/components/timestamp/Timestamp.vue.d.ts +13 -0
- package/dist/components/timestamp/Timestamp.vue_vue_type_script_setup_true_lang.js +21 -0
- package/dist/components/toast/ToastHost.js +6 -0
- package/dist/components/toast/ToastHost.vue.d.ts +3 -0
- package/dist/components/toast/ToastHost.vue_vue_type_script_setup_true_lang.js +13 -0
- package/dist/components/toast/install-toast-service.d.ts +2 -0
- package/dist/components/toast/install-toast-service.js +15 -0
- package/dist/components/toast/severity-to-vendor.d.ts +4 -0
- package/dist/components/toast/severity-to-vendor.js +11 -0
- package/dist/components/tooltip/Tooltip.js +7 -0
- package/dist/components/tooltip/Tooltip.vue.d.ts +51 -0
- package/dist/components/tooltip/Tooltip.vue_vue_type_script_setup_true_lang.js +47 -0
- package/dist/components/tooltip/dismiss-tooltips.d.ts +2 -0
- package/dist/components/tooltip/dismiss-tooltips.js +13 -0
- package/dist/components/tooltip/install-tooltip-directive.d.ts +6 -0
- package/dist/components/tooltip/install-tooltip-directive.js +80 -0
- package/dist/components/tooltip/tooltip-options.interface.d.ts +10 -0
- package/dist/components/truncated-code/TruncatedCode.js +5 -0
- package/dist/components/truncated-code/TruncatedCode.vue.d.ts +9 -0
- package/dist/components/truncated-code/TruncatedCode.vue_vue_type_script_setup_true_lang.js +23 -0
- package/dist/components/ui-icon/UiIcon.js +5 -0
- package/dist/components/ui-icon/UiIcon.vue.d.ts +13 -0
- package/dist/components/ui-icon/UiIcon.vue_vue_type_script_setup_true_lang.js +22 -0
- package/dist/composables/use-app-toast.d.ts +12 -0
- package/dist/composables/use-app-toast.js +50 -0
- package/dist/composables/use-confirm.d.ts +12 -0
- package/dist/composables/use-confirm.js +49 -0
- package/dist/composables/use-copy-to-clipboard.d.ts +2 -0
- package/dist/composables/use-copy-to-clipboard.js +23 -0
- package/dist/icons/ui-icon-registry.d.ts +6 -0
- package/dist/icons/ui-icon-registry.js +4 -0
- package/dist/index.d.ts +66 -0
- package/dist/index.js +56 -0
- package/dist/layout/layout.d.ts +37 -0
- package/dist/layout/layout.js +60 -0
- package/dist/messages/ui-messages.d.ts +23 -0
- package/dist/plugin/ui-injection.d.ts +11 -0
- package/dist/plugin/ui-injection.js +18 -0
- package/dist/plugin/ui-vendor-plugin.d.ts +22 -0
- package/dist/plugin/ui-vendor-plugin.js +57 -0
- package/dist/severity.d.ts +1 -0
- package/dist/store/listing/cursor-listing.d.ts +25 -0
- package/dist/store/listing/cursor-listing.js +97 -0
- package/dist/store/listing/infinite-listing-store.d.ts +21 -0
- package/dist/store/listing/infinite-listing-store.interface.d.ts +13 -0
- package/dist/store/listing/infinite-listing-store.js +68 -0
- package/dist/store/listing/listing-store.d.ts +7 -0
- package/dist/store/listing/listing-store.interface.d.ts +21 -0
- package/dist/store/listing/listing-store.js +114 -0
- package/dist/style.css +158 -0
- package/dist/styles/_tokens.scss +96 -0
- package/dist/styles/_variables.scss +8 -0
- package/dist/testing/browser-api-stubs.d.ts +1 -0
- package/dist/testing/browser-api-stubs.js +38 -0
- package/dist/testing/index.d.ts +5 -0
- package/dist/testing/index.js +6 -0
- package/dist/testing/set-viewport-width.d.ts +1 -0
- package/dist/testing/set-viewport-width.js +18 -0
- package/dist/testing/submit-form.d.ts +1 -0
- package/dist/testing/submit-form.js +25 -0
- package/dist/testing/ui-messages.fixture.d.ts +2 -0
- package/dist/testing/ui-messages.fixture.js +26 -0
- package/dist/testing/vendor-plugins.d.ts +2 -0
- package/dist/testing/vendor-plugins.js +22 -0
- package/dist/utils/datetime.d.ts +10 -0
- package/dist/utils/datetime.js +53 -0
- package/dist/utils/truncate-string.d.ts +2 -0
- package/dist/utils/truncate-string.js +10 -0
- package/package.json +93 -3
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/components/table/collect-column-filters.ts
|
|
2
|
+
/* v8 ignore file */
|
|
3
|
+
var collectColumnFilters = (columns) => columns.reduce((accum, value) => {
|
|
4
|
+
if (value.filter?.metadata === void 0) return { ...accum };
|
|
5
|
+
return {
|
|
6
|
+
...accum,
|
|
7
|
+
[value.field]: value.filter.metadata
|
|
8
|
+
};
|
|
9
|
+
}, {});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { collectColumnFilters };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type ColumnFilterEntryType = ColumnFilterGroupInterface | ColumnFilterMetaInterface | string;
|
|
2
|
+
export interface ColumnFilterGroupInterface {
|
|
3
|
+
constraints: ColumnFilterMetaInterface[];
|
|
4
|
+
operator: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ColumnFilterMetaInterface {
|
|
7
|
+
matchMode: string | undefined;
|
|
8
|
+
value: unknown;
|
|
9
|
+
}
|
|
10
|
+
export type ColumnFiltersInterface = Record<string, ColumnFilterEntryType>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { AllowedComponentProps, Component } from 'vue';
|
|
2
|
+
import type { ColumnFilterMetaInterface } from './column-filters-interface';
|
|
3
|
+
export interface ColumnSchemaInterface<T, U extends Component, F = Component | undefined> {
|
|
4
|
+
component: U;
|
|
5
|
+
componentProps(column: T): ComponentProps<U>;
|
|
6
|
+
field: string;
|
|
7
|
+
filter?: {
|
|
8
|
+
component?: FilterComponentSchemaInterface<T, F>;
|
|
9
|
+
filterPlaceholder?: string;
|
|
10
|
+
metadata?: ColumnFilterMetaInterface;
|
|
11
|
+
};
|
|
12
|
+
header?: string;
|
|
13
|
+
showFilterMenu?: boolean;
|
|
14
|
+
sortable: boolean;
|
|
15
|
+
}
|
|
16
|
+
export type ComponentProps<C extends Component> = C extends new (...arguments_: unknown[]) => unknown ? Omit<InstanceType<C>['$props'], keyof AllowedComponentProps> : never;
|
|
17
|
+
export interface FilterComponentSchemaInterface<T, F extends Component> {
|
|
18
|
+
component: F;
|
|
19
|
+
filterComponentProps(column: T): ComponentProps<F>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { FILTER_VALUE_SEPARATOR, FiltersMatchMode } from "@application-kit/typeorm/listing";
|
|
2
|
+
//#region src/components/table/get-filters.ts
|
|
3
|
+
var mappedFilters = {
|
|
4
|
+
between: FiltersMatchMode.BETWEEN,
|
|
5
|
+
contains: FiltersMatchMode.CONTAINS,
|
|
6
|
+
dateAfter: FiltersMatchMode.DATE_AFTER,
|
|
7
|
+
dateBefore: FiltersMatchMode.DATE_BEFORE,
|
|
8
|
+
dateIs: FiltersMatchMode.DATE_IS,
|
|
9
|
+
dateIsNot: FiltersMatchMode.DATE_IS_NOT,
|
|
10
|
+
endsWith: FiltersMatchMode.ENDS_WITH,
|
|
11
|
+
equals: FiltersMatchMode.EQUALS,
|
|
12
|
+
gt: FiltersMatchMode.GT,
|
|
13
|
+
gte: FiltersMatchMode.GTE,
|
|
14
|
+
in: FiltersMatchMode.IN,
|
|
15
|
+
lt: FiltersMatchMode.LT,
|
|
16
|
+
lte: FiltersMatchMode.LTE,
|
|
17
|
+
notContains: FiltersMatchMode.NOT_CONTAINS,
|
|
18
|
+
notEquals: FiltersMatchMode.NOT_EQUALS,
|
|
19
|
+
startsWith: FiltersMatchMode.STARTS_WITH
|
|
20
|
+
};
|
|
21
|
+
var ownMatchModeNames = Object.values(FiltersMatchMode).map((matchMode) => [matchMode, matchMode]);
|
|
22
|
+
var matchModeByName = new Map([...Object.entries(mappedFilters), ...ownMatchModeNames]);
|
|
23
|
+
var DECIMAL_COMMA = /^-?\d+,\d+$/u;
|
|
24
|
+
var normalizeDecimalComma = (value) => DECIMAL_COMMA.test(value) ? value.replace(",", ".") : value;
|
|
25
|
+
var isUnknownArray = (value) => Array.isArray(value);
|
|
26
|
+
var toWireValue = (value) => {
|
|
27
|
+
if (typeof value === "string") return normalizeDecimalComma(value);
|
|
28
|
+
if (value instanceof Date) return value.toISOString();
|
|
29
|
+
if (isUnknownArray(value)) {
|
|
30
|
+
const bounds = value.map((bound) => toWireValue(bound));
|
|
31
|
+
const filled = bounds.filter((bound) => bound !== null && bound !== "");
|
|
32
|
+
return filled.length === bounds.length ? filled.join(FILTER_VALUE_SEPARATOR) : null;
|
|
33
|
+
}
|
|
34
|
+
return null;
|
|
35
|
+
};
|
|
36
|
+
var toFilterEntry = (options) => {
|
|
37
|
+
if (typeof options === "string") return null;
|
|
38
|
+
if (!("value" in options) || !("matchMode" in options)) return null;
|
|
39
|
+
const { matchMode, value } = options;
|
|
40
|
+
const wireValue = toWireValue(value);
|
|
41
|
+
return wireValue === null ? null : {
|
|
42
|
+
matchMode,
|
|
43
|
+
value: wireValue
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
var resolveMatchMode = (matchMode) => {
|
|
47
|
+
return matchMode === void 0 ? null : matchModeByName.get(matchMode) ?? null;
|
|
48
|
+
};
|
|
49
|
+
var toFilterValue = (options) => {
|
|
50
|
+
const entry = toFilterEntry(options);
|
|
51
|
+
if (entry === null) return null;
|
|
52
|
+
if (entry.value === "") return null;
|
|
53
|
+
const matchMode = resolveMatchMode(entry.matchMode);
|
|
54
|
+
return matchMode === null ? null : {
|
|
55
|
+
matchMode,
|
|
56
|
+
value: entry.value
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
var getFilters = (columnFilters) => {
|
|
60
|
+
const filters = [];
|
|
61
|
+
const tableFilters = new Map(Object.entries(columnFilters));
|
|
62
|
+
for (const [filterName, options] of tableFilters) {
|
|
63
|
+
const filter = toFilterValue(options);
|
|
64
|
+
if (filter !== null) filters.push({
|
|
65
|
+
field: filterName,
|
|
66
|
+
matchMode: filter.matchMode,
|
|
67
|
+
value: filter.value
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
return filters;
|
|
71
|
+
};
|
|
72
|
+
//#endregion
|
|
73
|
+
export { getFilters };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from 'openvue/column';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Tabs_vue_vue_type_script_setup_true_lang_default from "./Tabs.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
//#region src/components/tabs/Tabs.vue
|
|
3
|
+
var Tabs_default = Tabs_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { Tabs_default as default };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { VNode } from 'vue';
|
|
2
|
+
import type { TabItemAttributesType, TabItemInterface } from './tab-item.interface';
|
|
3
|
+
declare const __VLS_export: <TabValue extends string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<({
|
|
5
|
+
items: TabItemInterface<TabValue>[];
|
|
6
|
+
} & {
|
|
7
|
+
activeValue: TabValue;
|
|
8
|
+
}) & {
|
|
9
|
+
"onUpdate:activeValue"?: (value: TabValue) => any;
|
|
10
|
+
}> & (typeof globalThis extends {
|
|
11
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
12
|
+
} ? P : {});
|
|
13
|
+
expose: (exposed: {}) => void;
|
|
14
|
+
attrs: any;
|
|
15
|
+
slots: {
|
|
16
|
+
item?: (_scope: {
|
|
17
|
+
active: boolean;
|
|
18
|
+
item: TabItemInterface<TabValue>;
|
|
19
|
+
itemAttributes: TabItemAttributesType;
|
|
20
|
+
}) => VNode[];
|
|
21
|
+
label?: (_scope: {
|
|
22
|
+
item: TabItemInterface<TabValue>;
|
|
23
|
+
}) => VNode[];
|
|
24
|
+
};
|
|
25
|
+
emit: (event: "update:activeValue", value: TabValue) => void;
|
|
26
|
+
}>) => import("vue").VNode & {
|
|
27
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
28
|
+
};
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
32
|
+
[K in keyof T]: T[K];
|
|
33
|
+
} : {
|
|
34
|
+
[K in keyof T as K]: T[K];
|
|
35
|
+
}) & {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Fragment, createBlock, createElementBlock, createTextVNode, createVNode, defineComponent, mergeModels, openBlock, renderList, renderSlot, toDisplayString, unref, useModel, withCtx } from "vue";
|
|
2
|
+
import VendorTab from "openvue/tab";
|
|
3
|
+
import VendorTabList from "openvue/tablist";
|
|
4
|
+
import VendorTabs from "openvue/tabs";
|
|
5
|
+
//#region src/components/tabs/Tabs.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var Tabs_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
7
|
+
__name: "Tabs",
|
|
8
|
+
props: /*@__PURE__*/ mergeModels({ items: {} }, {
|
|
9
|
+
"activeValue": { required: true },
|
|
10
|
+
"activeValueModifiers": {}
|
|
11
|
+
}),
|
|
12
|
+
emits: ["update:activeValue"],
|
|
13
|
+
setup(__props) {
|
|
14
|
+
const activeValue = useModel(__props, "activeValue");
|
|
15
|
+
const readVendorScope = (scope) => scope ?? {};
|
|
16
|
+
const VendorTabWithScope = VendorTab;
|
|
17
|
+
const toItemAttributes = (scope) => {
|
|
18
|
+
const { a11yAttrs: accessibilityAttributes, class: itemClass, dataP } = readVendorScope(scope);
|
|
19
|
+
return {
|
|
20
|
+
...accessibilityAttributes,
|
|
21
|
+
class: itemClass,
|
|
22
|
+
"data-p": dataP
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
const isActiveTab = (scope) => readVendorScope(scope).active === true;
|
|
26
|
+
return (_ctx, _cache) => {
|
|
27
|
+
return openBlock(), createBlock(unref(VendorTabs), {
|
|
28
|
+
value: activeValue.value,
|
|
29
|
+
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => activeValue.value = $event)
|
|
30
|
+
}, {
|
|
31
|
+
default: withCtx(() => [createVNode(unref(VendorTabList), null, {
|
|
32
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
|
|
33
|
+
return openBlock(), createBlock(unref(VendorTabWithScope), {
|
|
34
|
+
key: item.value,
|
|
35
|
+
"as-child": _ctx.$slots.item !== void 0,
|
|
36
|
+
value: item.value
|
|
37
|
+
}, {
|
|
38
|
+
default: withCtx((vendorScope) => [_ctx.$slots.item ? renderSlot(_ctx.$slots, "item", {
|
|
39
|
+
active: isActiveTab(vendorScope),
|
|
40
|
+
item,
|
|
41
|
+
itemAttributes: toItemAttributes(vendorScope)
|
|
42
|
+
}, void 0, void 0, 0) : renderSlot(_ctx.$slots, "label", { item }, () => [createTextVNode(toDisplayString(item.label), 1)], void 0, 1)]),
|
|
43
|
+
_: 2
|
|
44
|
+
}, 1032, ["as-child", "value"]);
|
|
45
|
+
}), 128))]),
|
|
46
|
+
_: 3
|
|
47
|
+
})]),
|
|
48
|
+
_: 3
|
|
49
|
+
}, 8, ["value"]);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
//#endregion
|
|
54
|
+
export { Tabs_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
import type { IconName } from '../../icons/ui-icon-registry';
|
|
3
|
+
import type { Severity } from '../../severity';
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
icon: {
|
|
6
|
+
default: undefined;
|
|
7
|
+
type: PropType<IconName | undefined>;
|
|
8
|
+
};
|
|
9
|
+
rounded: {
|
|
10
|
+
default: boolean;
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
};
|
|
13
|
+
severity: {
|
|
14
|
+
default: undefined;
|
|
15
|
+
type: PropType<Severity | undefined>;
|
|
16
|
+
};
|
|
17
|
+
value: {
|
|
18
|
+
required: true;
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
};
|
|
21
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
|
+
icon: {
|
|
23
|
+
default: undefined;
|
|
24
|
+
type: PropType<IconName | undefined>;
|
|
25
|
+
};
|
|
26
|
+
rounded: {
|
|
27
|
+
default: boolean;
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
};
|
|
30
|
+
severity: {
|
|
31
|
+
default: undefined;
|
|
32
|
+
type: PropType<Severity | undefined>;
|
|
33
|
+
};
|
|
34
|
+
value: {
|
|
35
|
+
required: true;
|
|
36
|
+
type: StringConstructor;
|
|
37
|
+
};
|
|
38
|
+
}>> & Readonly<{}>, {
|
|
39
|
+
icon: "times" | undefined;
|
|
40
|
+
rounded: boolean;
|
|
41
|
+
severity: Severity | undefined;
|
|
42
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
43
|
+
declare const _default: typeof __VLS_export;
|
|
44
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { useUiIconClass } from "../../plugin/ui-injection.js";
|
|
2
|
+
import { SEVERITY_TO_VENDOR } from "./severity-to-vendor.js";
|
|
3
|
+
import { computed, createBlock, defineComponent, openBlock, unref } from "vue";
|
|
4
|
+
import Tag from "openvue/tag";
|
|
5
|
+
//#region src/components/tag/Tag.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var Tag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
7
|
+
__name: "Tag",
|
|
8
|
+
props: {
|
|
9
|
+
icon: {
|
|
10
|
+
default: void 0,
|
|
11
|
+
type: String
|
|
12
|
+
},
|
|
13
|
+
rounded: {
|
|
14
|
+
default: false,
|
|
15
|
+
type: Boolean
|
|
16
|
+
},
|
|
17
|
+
severity: {
|
|
18
|
+
default: void 0,
|
|
19
|
+
type: String
|
|
20
|
+
},
|
|
21
|
+
value: {
|
|
22
|
+
required: true,
|
|
23
|
+
type: String
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
setup(__props) {
|
|
27
|
+
const props = __props;
|
|
28
|
+
const vendorSeverity = computed(() => props.severity === void 0 ? void 0 : SEVERITY_TO_VENDOR[props.severity]);
|
|
29
|
+
const iconClass = useUiIconClass();
|
|
30
|
+
const vendorIcon = computed(() => props.icon === void 0 ? void 0 : iconClass(props.icon));
|
|
31
|
+
return (_ctx, _cache) => {
|
|
32
|
+
return openBlock(), createBlock(unref(Tag), {
|
|
33
|
+
icon: vendorIcon.value,
|
|
34
|
+
rounded: __props.rounded,
|
|
35
|
+
severity: vendorSeverity.value,
|
|
36
|
+
value: __props.value
|
|
37
|
+
}, null, 8, [
|
|
38
|
+
"icon",
|
|
39
|
+
"rounded",
|
|
40
|
+
"severity",
|
|
41
|
+
"value"
|
|
42
|
+
]);
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
//#endregion
|
|
47
|
+
export { Tag_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import TimeLag_vue_vue_type_script_setup_true_lang_default from "./TimeLag.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/time-lag/TimeLag.vue
|
|
5
|
+
var TimeLag_default = /*#__PURE__*/ _plugin_vue_export_helper_default(TimeLag_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-6caca029"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { TimeLag_default as default };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
end: {
|
|
3
|
+
required: true;
|
|
4
|
+
type: DateConstructor;
|
|
5
|
+
};
|
|
6
|
+
max: {
|
|
7
|
+
required: true;
|
|
8
|
+
type: NumberConstructor;
|
|
9
|
+
};
|
|
10
|
+
start: {
|
|
11
|
+
required: true;
|
|
12
|
+
type: DateConstructor;
|
|
13
|
+
};
|
|
14
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
|
+
end: {
|
|
16
|
+
required: true;
|
|
17
|
+
type: DateConstructor;
|
|
18
|
+
};
|
|
19
|
+
max: {
|
|
20
|
+
required: true;
|
|
21
|
+
type: NumberConstructor;
|
|
22
|
+
};
|
|
23
|
+
start: {
|
|
24
|
+
required: true;
|
|
25
|
+
type: DateConstructor;
|
|
26
|
+
};
|
|
27
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { formatSignificantDuration, getDifferenceInHours } from "../../utils/datetime.js";
|
|
2
|
+
import { createElementBlock, defineComponent, normalizeClass, openBlock, toDisplayString, unref } from "vue";
|
|
3
|
+
//#region src/components/time-lag/TimeLag.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var TimeLag_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
5
|
+
__name: "TimeLag",
|
|
6
|
+
props: {
|
|
7
|
+
end: {
|
|
8
|
+
required: true,
|
|
9
|
+
type: Date
|
|
10
|
+
},
|
|
11
|
+
max: {
|
|
12
|
+
required: true,
|
|
13
|
+
type: Number
|
|
14
|
+
},
|
|
15
|
+
start: {
|
|
16
|
+
required: true,
|
|
17
|
+
type: Date
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
setup(__props) {
|
|
21
|
+
const properties = __props;
|
|
22
|
+
const isNegativeLag = properties.end.getTime() < properties.start.getTime();
|
|
23
|
+
const [intervalStart, intervalEnd] = isNegativeLag ? [properties.end, properties.start] : [properties.start, properties.end];
|
|
24
|
+
const { text, truncated } = formatSignificantDuration(intervalStart, intervalEnd);
|
|
25
|
+
const buildDuration = () => {
|
|
26
|
+
if (text === "") return "0 seconds";
|
|
27
|
+
const value = `${isNegativeLag ? "-" : ""}${text}`;
|
|
28
|
+
return truncated ? `more than ${value}` : value;
|
|
29
|
+
};
|
|
30
|
+
const duration = buildDuration();
|
|
31
|
+
const isTimeLagAlert = isNegativeLag || getDifferenceInHours(intervalEnd, intervalStart) > properties.max;
|
|
32
|
+
return (_ctx, _cache) => {
|
|
33
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(["time-lag", unref(isTimeLagAlert) ? "time-lag--alert" : ""]) }, toDisplayString(unref(duration)), 3);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
//#endregion
|
|
38
|
+
export { TimeLag_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Timestamp_vue_vue_type_script_setup_true_lang_default from "./Timestamp.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
//#region src/components/timestamp/Timestamp.vue
|
|
3
|
+
var Timestamp_default = Timestamp_vue_vue_type_script_setup_true_lang_default;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { Timestamp_default as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const __VLS_export: import("*.vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
timestamp: {
|
|
3
|
+
required: true;
|
|
4
|
+
type: DateConstructor;
|
|
5
|
+
};
|
|
6
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
|
+
timestamp: {
|
|
8
|
+
required: true;
|
|
9
|
+
type: DateConstructor;
|
|
10
|
+
};
|
|
11
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import Tooltip_default from "../tooltip/Tooltip.js";
|
|
2
|
+
import { formatDate, formatDistance } from "../../utils/datetime.js";
|
|
3
|
+
import { createBlock, createTextVNode, defineComponent, openBlock, toDisplayString, unref, withCtx } from "vue";
|
|
4
|
+
//#region src/components/timestamp/Timestamp.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var Timestamp_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
6
|
+
__name: "Timestamp",
|
|
7
|
+
props: { timestamp: {
|
|
8
|
+
required: true,
|
|
9
|
+
type: Date
|
|
10
|
+
} },
|
|
11
|
+
setup(__props) {
|
|
12
|
+
return (_ctx, _cache) => {
|
|
13
|
+
return openBlock(), createBlock(Tooltip_default, { value: unref(formatDate)(__props.timestamp) }, {
|
|
14
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(formatDistance)(__props.timestamp, /* @__PURE__ */ new Date())), 1)]),
|
|
15
|
+
_: 1
|
|
16
|
+
}, 8, ["value"]);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Timestamp_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import ToastHost_vue_vue_type_script_setup_true_lang_default from "./ToastHost.vue_vue_type_script_setup_true_lang.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
//#region src/components/toast/ToastHost.vue
|
|
4
|
+
var ToastHost_default = ToastHost_vue_vue_type_script_setup_true_lang_default;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { ToastHost_default as default };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createBlock, defineComponent, openBlock, unref } from "vue";
|
|
2
|
+
import VendorToast from "openvue/toast";
|
|
3
|
+
//#region src/components/toast/ToastHost.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var ToastHost_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
5
|
+
__name: "ToastHost",
|
|
6
|
+
setup(__props) {
|
|
7
|
+
return (_ctx, _cache) => {
|
|
8
|
+
return openBlock(), createBlock(unref(VendorToast));
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
//#endregion
|
|
13
|
+
export { ToastHost_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import ToastService from "openvue/toastservice";
|
|
2
|
+
//#region src/components/toast/install-toast-service.ts
|
|
3
|
+
/**
|
|
4
|
+
* Runtime dependency of the `useAppToast()` facade: the vendor toast service is installed here,
|
|
5
|
+
* inside the shared layer, instead of the app-level plugin — otherwise `openvue/toastservice`
|
|
6
|
+
* leaks into `src/modules`.
|
|
7
|
+
* @param app - Vue.js app (module VendorPlugin or the test harness).
|
|
8
|
+
* @example
|
|
9
|
+
* installToastService(vue)
|
|
10
|
+
*/
|
|
11
|
+
var installToastService = (app) => {
|
|
12
|
+
app.use(ToastService);
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { installToastService };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import _plugin_vue_export_helper_default from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import Tooltip_vue_vue_type_script_setup_true_lang_default from "./Tooltip.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/tooltip/Tooltip.vue
|
|
5
|
+
var Tooltip_default = /*#__PURE__*/ _plugin_vue_export_helper_default(Tooltip_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-405629ae"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { Tooltip_default as default };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
autoHide: {
|
|
7
|
+
default: boolean;
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
};
|
|
10
|
+
position: {
|
|
11
|
+
default: string;
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
};
|
|
14
|
+
showDelay: {
|
|
15
|
+
default: number;
|
|
16
|
+
type: NumberConstructor;
|
|
17
|
+
};
|
|
18
|
+
value: {
|
|
19
|
+
required: true;
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
};
|
|
22
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
23
|
+
autoHide: {
|
|
24
|
+
default: boolean;
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
};
|
|
27
|
+
position: {
|
|
28
|
+
default: string;
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
};
|
|
31
|
+
showDelay: {
|
|
32
|
+
default: number;
|
|
33
|
+
type: NumberConstructor;
|
|
34
|
+
};
|
|
35
|
+
value: {
|
|
36
|
+
required: true;
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
};
|
|
39
|
+
}>> & Readonly<{}>, {
|
|
40
|
+
position: string;
|
|
41
|
+
autoHide: boolean;
|
|
42
|
+
showDelay: number;
|
|
43
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
44
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
45
|
+
declare const _default: typeof __VLS_export;
|
|
46
|
+
export default _default;
|
|
47
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
48
|
+
new (): {
|
|
49
|
+
$slots: S;
|
|
50
|
+
};
|
|
51
|
+
};
|