@signal24/vue-foundation 3.8.1 → 4.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/.eslintrc.cjs +35 -0
- package/.prettierrc.json +4 -2
- package/dist/src/components/ajax-select.vue.d.ts +21 -0
- package/dist/src/components/alert-helpers.d.ts +8 -0
- package/dist/src/components/alert-modal.vue.d.ts +27 -0
- package/dist/src/components/ez-smart-select.vue.d.ts +27 -0
- package/dist/src/components/index.d.ts +8 -0
- package/dist/src/components/modal-container.d.ts +33 -0
- package/dist/src/components/modal.vue.d.ts +34 -0
- package/dist/src/components/smart-select.vue.d.ts +121 -0
- package/dist/src/config.d.ts +8 -0
- package/dist/src/directives/autofocus.d.ts +2 -0
- package/dist/src/directives/confirm-button.d.ts +2 -0
- package/dist/src/directives/date-input.d.ts +2 -0
- package/dist/src/directives/datetime.d.ts +2 -0
- package/dist/src/directives/disabled.d.ts +2 -0
- package/dist/src/directives/duration.d.ts +2 -0
- package/dist/src/directives/index.d.ts +24 -0
- package/dist/src/directives/infinite-scroll.d.ts +3 -0
- package/dist/src/directives/readonly.d.ts +2 -0
- package/dist/src/directives/tooltip.d.ts +41 -0
- package/dist/src/filters/index.d.ts +39 -0
- package/dist/src/helpers/array.d.ts +3 -0
- package/dist/src/helpers/context-menu.d.ts +13 -0
- package/dist/src/helpers/delay.d.ts +2 -0
- package/dist/src/helpers/error.d.ts +7 -0
- package/dist/src/helpers/index.d.ts +9 -0
- package/dist/src/helpers/mask.d.ts +15 -0
- package/dist/src/helpers/number.d.ts +1 -0
- package/dist/src/helpers/object.d.ts +2 -0
- package/dist/src/helpers/openapi.d.ts +34 -0
- package/dist/src/helpers/string.d.ts +5 -0
- package/dist/src/hooks/index.d.ts +2 -0
- package/dist/src/hooks/infinite-scroll.d.ts +30 -0
- package/dist/src/hooks/resize-watcher.d.ts +1 -0
- package/dist/src/index.d.ts +8 -0
- package/dist/src/types.d.ts +14 -0
- package/dist/src/vite-plugins/index.d.ts +1 -0
- package/dist/src/vite-plugins/index.js +2 -0
- package/dist/src/vite-plugins/vite-openapi-plugin.d.ts +4 -0
- package/dist/src/vite-plugins/vite-openapi-plugin.js +58 -0
- package/dist/vue-foundation.css +1 -1
- package/dist/vue-foundation.es.js +880 -1880
- package/package.json +44 -16
- package/src/components/ajax-select.vue +44 -23
- package/src/components/alert-helpers.ts +45 -0
- package/src/components/alert-modal.vue +68 -0
- package/src/components/ez-smart-select.vue +51 -0
- package/src/components/index.ts +10 -0
- package/src/components/modal-container.ts +131 -0
- package/src/components/modal.vue +44 -129
- package/src/components/smart-select.vue +196 -243
- package/src/config.ts +15 -0
- package/src/directives/autofocus.ts +20 -0
- package/src/directives/confirm-button.ts +50 -0
- package/src/directives/date-input.ts +19 -0
- package/src/directives/datetime.ts +48 -0
- package/src/directives/disabled.ts +30 -0
- package/src/directives/duration.ts +79 -0
- package/src/directives/index.ts +37 -0
- package/src/directives/infinite-scroll.ts +9 -0
- package/src/directives/readonly.ts +15 -0
- package/src/directives/tooltip.ts +190 -0
- package/src/filters/index.ts +79 -0
- package/src/helpers/array.ts +7 -0
- package/src/helpers/context-menu.ts +108 -0
- package/src/helpers/delay.ts +2 -0
- package/src/helpers/error.ts +41 -0
- package/src/helpers/index.ts +9 -0
- package/src/helpers/mask.ts +105 -0
- package/src/helpers/number.ts +3 -0
- package/src/helpers/object.ts +19 -0
- package/src/helpers/openapi.ts +82 -0
- package/src/helpers/string.ts +27 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/infinite-scroll.ts +107 -0
- package/src/hooks/resize-watcher.ts +8 -0
- package/src/index.ts +14 -0
- package/src/types.ts +14 -0
- package/src/vite-plugins/index.ts +2 -0
- package/src/vite-plugins/vite-openapi-plugin.ts +71 -0
- package/tsconfig.app.json +22 -0
- package/tsconfig.json +14 -0
- package/tsconfig.node.json +9 -0
- package/tsconfig.vite-plugins.json +10 -0
- package/tsconfig.vitest.json +9 -0
- package/vite.config.js +37 -35
- package/vitest.config.js +17 -0
- package/.eslintrc.js +0 -16
- package/CHANGES.md +0 -2
- package/dist/vue-foundation.cjs.js +0 -5
- package/dist/vue-foundation.umd.js +0 -6
- package/postcss.config.cjs +0 -5
- package/src/app.js +0 -25
- package/src/components/alert.vue +0 -130
- package/src/components/index.js +0 -12
- package/src/config.js +0 -11
- package/src/directives/autofocus.js +0 -17
- package/src/directives/confirm-button.js +0 -40
- package/src/directives/date-input.js +0 -18
- package/src/directives/datetime.js +0 -46
- package/src/directives/disabled.js +0 -28
- package/src/directives/duration.js +0 -72
- package/src/directives/index.js +0 -10
- package/src/directives/infinite-scroll.js +0 -17
- package/src/directives/readonly.js +0 -17
- package/src/directives/tooltip.js +0 -178
- package/src/directives/user-text.js +0 -11
- package/src/filters/index.js +0 -82
- package/src/helpers/array.js +0 -99
- package/src/helpers/context-menu.js +0 -66
- package/src/helpers/delay.js +0 -3
- package/src/helpers/error.js +0 -36
- package/src/helpers/http.js +0 -44
- package/src/helpers/index.js +0 -9
- package/src/helpers/mask.js +0 -90
- package/src/helpers/number.js +0 -6
- package/src/helpers/string.js +0 -36
- package/src/helpers/vue.js +0 -5
- package/src/index.js +0 -33
- package/src/plugins/index.js +0 -10
- package/src/plugins/infinite-scroll/hook.js +0 -30
- package/src/plugins/infinite-scroll.js +0 -100
- package/src/plugins/resize-watcher.js +0 -28
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { OptionalKeysOf, RequiredKeysOf } from 'type-fest';
|
|
2
|
+
export type Branded<T, A> = A & {
|
|
3
|
+
__brand: T;
|
|
4
|
+
};
|
|
5
|
+
export type BrandOf<A> = [A] extends [Branded<infer R, unknown>] ? R : never;
|
|
6
|
+
export type Debrand<A> = A extends Branded<BrandOf<A>, infer R> ? R : never;
|
|
7
|
+
export type PickRequired<T> = T extends object ? Pick<T, RequiredKeysOf<T>> : never;
|
|
8
|
+
export type PickOptional<T> = T extends object ? Pick<T, OptionalKeysOf<T>> : never;
|
|
9
|
+
export type WithoutNever<T> = {
|
|
10
|
+
[P in keyof T as T[P] extends never ? never : P]: T[P];
|
|
11
|
+
};
|
|
12
|
+
export type UnwrapBrand<T, B> = WithoutNever<{
|
|
13
|
+
[K in keyof T]: BrandOf<T[K]> extends B ? Debrand<T[K]> : never;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './vite-openapi-plugin.js';
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { existsSync, readFileSync, watch } from 'node:fs';
|
|
3
|
+
import { rmdir } from 'node:fs/promises';
|
|
4
|
+
import * as OpenAPI from 'openapi-typescript-codegen';
|
|
5
|
+
let generatedHash = null;
|
|
6
|
+
export function openapiClientGeneratorPlugin(openapiYamlPath) {
|
|
7
|
+
const generator = getGenerator(openapiYamlPath);
|
|
8
|
+
return {
|
|
9
|
+
name: 'openapi-types-generator',
|
|
10
|
+
closeBundle() {
|
|
11
|
+
generator?.close();
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function getGenerator(openapiYamlPath) {
|
|
16
|
+
if (!existsSync(openapiYamlPath)) {
|
|
17
|
+
console.log(`OpenAPI YAML file not found: ${openapiYamlPath}`);
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
const watcher = watch(openapiYamlPath);
|
|
21
|
+
watcher.on('change', () => {
|
|
22
|
+
// give the writes a moment to settle
|
|
23
|
+
setTimeout(() => generateClient(openapiYamlPath), 100);
|
|
24
|
+
});
|
|
25
|
+
generateClient(openapiYamlPath);
|
|
26
|
+
return {
|
|
27
|
+
close() {
|
|
28
|
+
watcher.close();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
async function generateClient(openapiYamlPath) {
|
|
33
|
+
const yaml = readFileSync(openapiYamlPath, 'utf8');
|
|
34
|
+
const hash = createHash('sha256').update(yaml).digest('hex');
|
|
35
|
+
if (hash === generatedHash) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
generatedHash = hash;
|
|
39
|
+
try {
|
|
40
|
+
try {
|
|
41
|
+
await rmdir('./src/openapi-client-generated', { recursive: true });
|
|
42
|
+
}
|
|
43
|
+
catch (e) {
|
|
44
|
+
// ignore
|
|
45
|
+
}
|
|
46
|
+
await OpenAPI.generate({
|
|
47
|
+
input: openapiYamlPath,
|
|
48
|
+
output: './src/openapi-client-generated',
|
|
49
|
+
clientName: 'ApiClient',
|
|
50
|
+
useOptions: true,
|
|
51
|
+
useUnionTypes: true
|
|
52
|
+
});
|
|
53
|
+
console.log(`[${new Date().toISOString()}] Generated client from ${openapiYamlPath} to ./src/openapi-client/`);
|
|
54
|
+
}
|
|
55
|
+
catch (err) {
|
|
56
|
+
console.error(`[${new Date().toISOString()}] Error generating client from ${openapiYamlPath}:`, err);
|
|
57
|
+
}
|
|
58
|
+
}
|
package/dist/vue-foundation.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.vf-overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100}.vf-modal-wrap{background:rgba(0,0,0,.25);display:flex;justify-content:center;align-items:center}.vf-modal{background:white;box-shadow:0 3px 6px #00000026;min-width:200px;max-width:95%;max-height:95%;display:flex;flex-direction:column}.vf-modal-header,.vf-modal-footer{flex-shrink:0;position:relative}.vf-modal.scrolls>.vf-modal-content{overflow:auto;flex-grow:1;flex-shrink:1;flex-basis:0%}.vf-modal-wrap.vf-alert .vf-modal{max-width:800px}.vf-modal-wrap.vf-alert .vf-modal>.vf-modal-content{padding:12px}.vf-modal-wrap.vf-alert.wait .vf-modal-content{text-align:center}.vf-modal-wrap.vf-alert.destructive button.primary{color:red}.vf-smart-select{position:relative}.vf-smart-select input{width:100%;padding-right:24px!important}.vf-smart-select input.nullable
|
|
1
|
+
.vf-overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100}.vf-modal-wrap{background:rgba(0,0,0,.25);display:flex;justify-content:center;align-items:center}.vf-modal{background:white;box-shadow:0 3px 6px #00000026;min-width:200px;max-width:95%;max-height:95%;display:flex;flex-direction:column}.vf-modal-header,.vf-modal-footer{flex-shrink:0;position:relative}.vf-modal.scrolls>.vf-modal-content{overflow:auto;flex-grow:1;flex-shrink:1;flex-basis:0%}.vf-modal-wrap.vf-alert .vf-modal{max-width:800px}.vf-modal-wrap.vf-alert .vf-modal>.vf-modal-content{padding:12px}.vf-modal-wrap.vf-alert.wait .vf-modal-content{text-align:center}.vf-modal-wrap.vf-alert.destructive button.primary{color:red}.vf-smart-select{position:relative}.vf-smart-select input{width:100%;padding-right:24px!important}.vf-smart-select input.nullable::placeholder{color:#000}.vf-smart-select:after{content:" ";display:block;position:absolute;top:50%;right:8px;margin-top:-3px;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:#333333 transparent transparent transparent;pointer-events:none}.vf-smart-select.open:after{margin-top:-4px;border-width:0 5px 5px 5px;border-color:transparent transparent #333333 transparent}.vf-smart-select:not(.disabled) input{cursor:pointer}.vf-smart-select.disabled:after{opacity:.4}.vf-smart-select-options{visibility:hidden;position:absolute;min-height:20px;border:1px solid #e8e8e8;background:white;overflow:auto;z-index:101}.vf-smart-select-options .option,.vf-smart-select-options .no-results{padding:5px 8px}.vf-smart-select-options .option{cursor:pointer}.vf-smart-select-options .option.highlighted{background-color:#f5f5f5}
|