@yeepay/yee-boss-ui 0.1.20 → 0.1.22

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/dist/grid.js CHANGED
@@ -1,5 +1,6 @@
1
- import { Y as i, u as s } from "./use-yee-grid-ClKZU8CY.js";
1
+ import { Y as i, a, u as s } from "./use-yee-grid-idCNjiBi.js";
2
2
  export {
3
3
  i as YeeGridApi,
4
+ a as YeeGridFormApi,
4
5
  s as useYeeGrid
5
6
  };
package/dist/index.d.ts CHANGED
@@ -3,14 +3,13 @@ export * from './components/descriptions';
3
3
  export * from './components/ellipsis-text';
4
4
  export * from './components/app-shell';
5
5
  export * from './components/file-upload';
6
- export * from './components/form';
7
6
  export * from './components/grid';
8
7
  export * from './components/modal';
9
8
  export * from './components/page';
10
- export * from './components/select';
11
9
  export { toAntDesignTheme } from './theme/ant-theme';
12
10
  export { platformThemeKey, usePlatformTheme } from './theme/context';
13
11
  export { toPlatformCssVariables } from './theme/css-variables';
14
12
  export { darkThemeTokens, lightThemeTokens, resolvePlatformTheme, } from './theme/tokens';
13
+ export { YeeBossUIResolver } from './resolver';
15
14
  export type { PlatformTheme, PlatformThemeMode, PlatformThemeTokens, ResolvedPlatformTheme, } from './theme/types';
16
15
  export { default } from './plugin';
package/dist/index.js CHANGED
@@ -1,62 +1,57 @@
1
- import { P as s } from "./PlatformConfigProvider-BuML7gEO.js";
1
+ import { P as r } from "./PlatformConfigProvider-BuML7gEO.js";
2
2
  import { C as G } from "./PlatformConfigProvider-BuML7gEO.js";
3
- import { d as I, l as O, r as U, t as v, a as B } from "./tokens-Dw6w0SSs.js";
4
- import { p as L, u as M } from "./context-DJQ4f46a.js";
3
+ import { d as S, l as U, r as _, t as k, a as v } from "./tokens-Dw6w0SSs.js";
4
+ import { p as H, u as O } from "./context-DJQ4f46a.js";
5
5
  import { Y as a } from "./index-mOUIZzI1.js";
6
- import { Y as m } from "./index-DvY7PmUA.js";
7
- import { d as t, c as Y, b as i, a as p, Y as f } from "./YeeTabs-YwptF8tY.js";
8
- import { Y as l } from "./YeePage-Duxhrl0F.js";
9
- import { Y as n } from "./YeeForm-COND7XQj.js";
10
- import { Y as T } from "./YeeFileUpload-BUFoWs8x.js";
11
- import { Y as d } from "./YeeEllipsisText-BTSbIuBl.js";
12
- import { Y as c } from "./YeeDescriptions-DyYySPuw.js";
13
- import { Y as V } from "./form-api-0148j8ew.js";
14
- import { Y as y, u as K } from "./use-yee-grid-ClKZU8CY.js";
15
- const h = {
16
- PlatformConfigProvider: s,
17
- YeeAppShell: f,
18
- YeeDescriptions: c,
19
- YeeEllipsisText: d,
20
- YeeFileUpload: T,
21
- YeeForm: n,
6
+ import { YeeBossUIResolver as F } from "./resolver.js";
7
+ import { d as m, c as t, b as i, a as p, Y } from "./YeeTabs-YwptF8tY.js";
8
+ import { Y as f } from "./YeePage-Duxhrl0F.js";
9
+ import { Y as l } from "./YeeFileUpload-BUFoWs8x.js";
10
+ import { Y as n } from "./YeeEllipsisText-BTSbIuBl.js";
11
+ import { Y as T } from "./YeeDescriptions-DyYySPuw.js";
12
+ import { Y as M, a as N, u as R } from "./use-yee-grid-idCNjiBi.js";
13
+ const d = {
14
+ PlatformConfigProvider: r,
15
+ YeeAppShell: Y,
16
+ YeeDescriptions: T,
17
+ YeeEllipsisText: n,
18
+ YeeFileUpload: l,
22
19
  YeeHeader: p,
23
20
  YeeMenu: i,
24
21
  YeeModal: a,
25
- YeePage: l,
26
- YeeSelect: m,
27
- YeeSidebar: Y,
28
- YeeTabs: t
29
- }, _ = {
22
+ YeePage: f,
23
+ YeeSidebar: t,
24
+ YeeTabs: m
25
+ }, C = {
30
26
  install(e) {
31
- Object.entries(h).forEach(([o, r]) => {
32
- e.component(o, r);
27
+ Object.entries(d).forEach(([o, s]) => {
28
+ e.component(o, s);
33
29
  });
34
30
  }
35
31
  };
36
32
  export {
37
33
  G as CSS_VARIABLE_LAYOUT_CONTENT_HEIGHT,
38
- s as PlatformConfigProvider,
39
- f as YeeAppShell,
40
- c as YeeDescriptions,
41
- d as YeeEllipsisText,
42
- T as YeeFileUpload,
43
- n as YeeForm,
44
- V as YeeFormApi,
45
- y as YeeGridApi,
34
+ r as PlatformConfigProvider,
35
+ Y as YeeAppShell,
36
+ F as YeeBossUIResolver,
37
+ T as YeeDescriptions,
38
+ n as YeeEllipsisText,
39
+ l as YeeFileUpload,
40
+ M as YeeGridApi,
41
+ N as YeeGridFormApi,
46
42
  p as YeeHeader,
47
43
  i as YeeMenu,
48
44
  a as YeeModal,
49
- l as YeePage,
50
- m as YeeSelect,
51
- Y as YeeSidebar,
52
- t as YeeTabs,
53
- I as darkThemeTokens,
54
- _ as default,
55
- O as lightThemeTokens,
56
- L as platformThemeKey,
57
- U as resolvePlatformTheme,
58
- v as toAntDesignTheme,
59
- B as toPlatformCssVariables,
60
- M as usePlatformTheme,
61
- K as useYeeGrid
45
+ f as YeePage,
46
+ t as YeeSidebar,
47
+ m as YeeTabs,
48
+ S as darkThemeTokens,
49
+ C as default,
50
+ U as lightThemeTokens,
51
+ H as platformThemeKey,
52
+ _ as resolvePlatformTheme,
53
+ k as toAntDesignTheme,
54
+ v as toPlatformCssVariables,
55
+ O as usePlatformTheme,
56
+ R as useYeeGrid
62
57
  };
@@ -0,0 +1,25 @@
1
+ declare const yeeBossUIComponentEntries: {
2
+ readonly PlatformConfigProvider: "@yeepay/yee-boss-ui/core";
3
+ readonly YeeAppShell: "@yeepay/yee-boss-ui/app-shell";
4
+ readonly YeeDescriptions: "@yeepay/yee-boss-ui/descriptions";
5
+ readonly YeeEllipsisText: "@yeepay/yee-boss-ui/ellipsis-text";
6
+ readonly YeeFileUpload: "@yeepay/yee-boss-ui/file-upload";
7
+ readonly YeeHeader: "@yeepay/yee-boss-ui/app-shell";
8
+ readonly YeeMenu: "@yeepay/yee-boss-ui/app-shell";
9
+ readonly YeeModal: "@yeepay/yee-boss-ui/modal";
10
+ readonly YeePage: "@yeepay/yee-boss-ui/page";
11
+ readonly YeeSidebar: "@yeepay/yee-boss-ui/app-shell";
12
+ readonly YeeTabs: "@yeepay/yee-boss-ui/app-shell";
13
+ };
14
+ export type YeeBossUIComponentName = keyof typeof yeeBossUIComponentEntries;
15
+ /**
16
+ * Resolver for unplugin-vue-components.
17
+ *
18
+ * Keep this entrypoint free of Vue component imports so Vite config loading
19
+ * does not eagerly load the component library.
20
+ */
21
+ export declare function YeeBossUIResolver(): (name: string) => {
22
+ from: "@yeepay/yee-boss-ui/core" | "@yeepay/yee-boss-ui/app-shell" | "@yeepay/yee-boss-ui/descriptions" | "@yeepay/yee-boss-ui/ellipsis-text" | "@yeepay/yee-boss-ui/file-upload" | "@yeepay/yee-boss-ui/modal" | "@yeepay/yee-boss-ui/page";
23
+ name: string;
24
+ } | undefined;
25
+ export {};
@@ -0,0 +1,22 @@
1
+ const y = {
2
+ PlatformConfigProvider: "@yeepay/yee-boss-ui/core",
3
+ YeeAppShell: "@yeepay/yee-boss-ui/app-shell",
4
+ YeeDescriptions: "@yeepay/yee-boss-ui/descriptions",
5
+ YeeEllipsisText: "@yeepay/yee-boss-ui/ellipsis-text",
6
+ YeeFileUpload: "@yeepay/yee-boss-ui/file-upload",
7
+ YeeHeader: "@yeepay/yee-boss-ui/app-shell",
8
+ YeeMenu: "@yeepay/yee-boss-ui/app-shell",
9
+ YeeModal: "@yeepay/yee-boss-ui/modal",
10
+ YeePage: "@yeepay/yee-boss-ui/page",
11
+ YeeSidebar: "@yeepay/yee-boss-ui/app-shell",
12
+ YeeTabs: "@yeepay/yee-boss-ui/app-shell"
13
+ };
14
+ function o() {
15
+ return (e) => {
16
+ const s = y[e];
17
+ return s ? { from: s, name: e } : void 0;
18
+ };
19
+ }
20
+ export {
21
+ o as YeeBossUIResolver
22
+ };
package/dist/style.css CHANGED
@@ -127,8 +127,6 @@ html.dark,
127
127
 
128
128
  .yee-ui-modal__header[data-v-7424b0ee]{display:flex;align-items:center;width:100%;min-width:0}.yee-ui-modal__heading[data-v-7424b0ee]{flex:1;min-width:0}.yee-ui-modal__title[data-v-7424b0ee]{display:block;overflow:hidden;color:var(--yee-foreground);font-size:var(--yee-font-size-lg);font-weight:600;text-overflow:ellipsis;white-space:nowrap}.yee-ui-modal__header-actions[data-v-7424b0ee]{display:flex;flex:none;gap:4px;align-items:center;margin-inline-start:auto;padding-inline-start:16px}.yee-ui-modal__body[data-v-7424b0ee]{color:var(--yee-foreground);font-size:var(--yee-font-size)}.yee-ui-modal__header-action[data-v-7424b0ee]{display:inline-flex;align-items:center;justify-content:center;width:24px;min-width:24px;height:24px;padding:0;color:var(--yee-muted-foreground)}.yee-ui-modal__header-action[data-v-7424b0ee]:hover,.yee-ui-modal__header-action[data-v-7424b0ee]:focus-visible{color:var(--yee-foreground)}.ant-modal.yee-ui-modal .ant-modal-content,.yee-modal.yee-ui-modal .yee-modal-content{padding:0}.ant-modal.yee-ui-modal .ant-modal-header,.yee-modal.yee-ui-modal .yee-modal-header{padding:16px;margin-bottom:0;border-bottom:1px solid var(--yee-border-secondary)}.ant-modal.yee-ui-modal .ant-modal-body,.yee-modal.yee-ui-modal .yee-modal-body,.ant-drawer-content.yee-ui-modal-drawer .ant-drawer-header,.ant-drawer-content.yee-ui-modal-drawer .ant-drawer-body,.yee-drawer-content.yee-ui-modal-drawer .yee-drawer-header,.yee-drawer-content.yee-ui-modal-drawer .yee-drawer-body{padding:16px}.ant-drawer-content.yee-ui-modal-drawer .ant-drawer-footer,.yee-drawer-content.yee-ui-modal-drawer .yee-drawer-footer{padding:10px 16px}.ant-modal.yee-ui-modal .ant-modal-footer,.yee-modal.yee-ui-modal .yee-modal-footer{padding:10px 16px;margin-top:0;border-top:1px solid var(--yee-border-secondary)}.ant-modal.yee-ui-modal--fullscreen,.yee-modal.yee-ui-modal--fullscreen{height:100vh;height:100dvh}.ant-modal.yee-ui-modal--fullscreen .ant-modal-content,.yee-modal.yee-ui-modal--fullscreen .yee-modal-content{display:flex;flex-direction:column;height:100vh;height:100dvh;border-radius:0}.ant-modal.yee-ui-modal--fullscreen .ant-modal-header,.ant-modal.yee-ui-modal--fullscreen .ant-modal-footer,.yee-modal.yee-ui-modal--fullscreen .yee-modal-header,.yee-modal.yee-ui-modal--fullscreen .yee-modal-footer{flex:none}.ant-modal.yee-ui-modal--fullscreen .ant-modal-header,.yee-modal.yee-ui-modal--fullscreen .yee-modal-header{border-radius:0}.ant-modal.yee-ui-modal--fullscreen .ant-modal-body,.yee-modal.yee-ui-modal--fullscreen .yee-modal-body{flex:1;min-height:0;overflow:hidden}.ant-modal.yee-ui-modal--fullscreen .yee-ui-modal__body,.yee-modal.yee-ui-modal--fullscreen .yee-ui-modal__body{height:100%;overflow:auto}.yee-ui-modal__footer[data-v-7424b0ee]{display:flex;gap:8px;justify-content:flex-end}
129
129
 
130
- .yee-ui-select[data-v-8acc9d8f]{min-width:0}.yee-ui-select[data-v-8acc9d8f] .ant-select,.yee-ui-select[data-v-8acc9d8f] .yee-select{width:100%}.yee-ui-select__option-label{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
131
- /*$vite$:1*/
132
130
  .yee-ui-platform-theme[data-v-7e0afdd9]{display:contents}
133
131
  /*$vite$:1*/
134
132
  .yee-ui-descriptions[data-v-cd55dc37] .ant-descriptions-header,.yee-ui-descriptions[data-v-cd55dc37] .yee-descriptions-header{margin-bottom:16px}.yee-ui-descriptions[data-v-cd55dc37] .ant-descriptions-title,.yee-ui-descriptions[data-v-cd55dc37] .yee-descriptions-title{font-size:var(--yee-font-size-lg);font-weight:600}.yee-ui-descriptions[data-v-cd55dc37] .ant-descriptions-view table,.yee-ui-descriptions[data-v-cd55dc37] .yee-descriptions-view table{table-layout:fixed}.yee-ui-descriptions[data-v-cd55dc37] .ant-descriptions-item-label,.yee-ui-descriptions[data-v-cd55dc37] .yee-descriptions-item-label{color:var(--yee-foreground);font-weight:500;white-space:nowrap}.yee-ui-descriptions[data-v-cd55dc37] .ant-descriptions-item-content,.yee-ui-descriptions[data-v-cd55dc37] .yee-descriptions-item-content{min-width:0;overflow:hidden;color:var(--yee-card-foreground)}.yee-ui-descriptions__item[data-v-cd55dc37]{display:flex;flex-direction:column;gap:4px;min-width:0}.yee-ui-descriptions__content-row[data-v-cd55dc37]{display:flex;gap:8px;align-items:flex-start;min-width:0}.yee-ui-descriptions__value[data-v-cd55dc37]{flex:1 1 auto;min-width:0}.yee-ui-descriptions__value--ellipsis[data-v-cd55dc37]{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.yee-ui-descriptions__copy[data-v-cd55dc37]{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;width:22px;min-width:22px;height:22px;padding:0;color:var(--yee-primary);font:inherit;font-size:var(--yee-font-size);line-height:1;background:transparent;border:0;border-radius:var(--yee-radius-sm);cursor:pointer}.yee-ui-descriptions__copy[data-v-cd55dc37]:hover:not(:disabled){background:var(--yee-accent)}.yee-ui-descriptions__copy--copied[data-v-cd55dc37]:disabled{color:var(--yee-success);cursor:default}.yee-ui-descriptions__copy[data-v-cd55dc37]:focus-visible{outline:2px solid var(--yee-ring);outline-offset:2px}.yee-ui-descriptions__info[data-v-cd55dc37]{color:var(--yee-muted-foreground);font-size:var(--yee-font-size-sm);line-height:1.4}
@@ -137,9 +135,7 @@ html.dark,
137
135
  /*$vite$:1*/
138
136
  .yee-ui-file-upload[data-v-ac555a97],.yee-ui-file-upload[data-v-ac555a97] .ant-upload-wrapper,.yee-ui-file-upload[data-v-ac555a97] .yee-upload-wrapper{min-width:0}.yee-ui-file-upload[data-v-ac555a97] .ant-upload-select,.yee-ui-file-upload[data-v-ac555a97] .yee-upload-select{width:auto;height:auto;margin-inline-end:0}.yee-ui-file-upload[data-v-ac555a97] .ant-upload-list-item-action,.yee-ui-file-upload[data-v-ac555a97] .yee-upload-list-item-action{background:transparent!important}.yee-ui-file-upload__trigger[data-v-ac555a97]{display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center;box-sizing:border-box;color:var(--yee-muted-foreground);font-size:var(--yee-font-size-sm)}.yee-ui-file-upload__trigger-sign[data-v-ac555a97]{color:var(--yee-foreground);font-size:24px;line-height:1}.yee-ui-file-upload__empty[data-v-ac555a97]{color:var(--yee-muted-foreground);font-size:var(--yee-font-size)}.yee-ui-file-upload__preview[data-v-ac555a97]{display:none}
139
137
  /*$vite$:1*/
140
- .yee-ui-form[data-v-13cadc25]{display:flex;gap:16px;align-items:flex-start;padding:16px;background:var(--yee-card)}.yee-ui-form__fields[data-v-13cadc25]{display:grid;flex:1 1 auto;grid-template-columns:repeat(3,minmax(220px,1fr));gap:16px 24px;min-width:0}.yee-ui-form__field[data-v-13cadc25]{display:grid;grid-template-columns:minmax(72px,auto) minmax(0,1fr);gap:8px;align-items:center;min-width:0}.yee-ui-form__label[data-v-13cadc25]{color:var(--yee-foreground);font-size:var(--yee-font-size);white-space:nowrap}.yee-ui-form__actions[data-v-13cadc25]{display:flex;flex:0 0 auto;gap:8px;align-items:center}@media not (min-width:1200px){.yee-ui-form[data-v-13cadc25]{flex-direction:column}.yee-ui-form__fields[data-v-13cadc25]{width:100%;grid-template-columns:repeat(2,minmax(220px,1fr))}}@media not (min-width:720px){.yee-ui-form__fields[data-v-13cadc25]{grid-template-columns:minmax(0,1fr)}}
141
- /*$vite$:1*/
142
- .yee-ui-grid[data-v-b69f5a93]{display:flex;flex-direction:column;min-width:0;height:auto;min-height:0;box-sizing:border-box;overflow:hidden;color:var(--yee-foreground);background:var(--yee-card);border-radius:var(--yee-radius)}.yee-ui-grid--fill-page-content[data-v-b69f5a93]{height:100%}.yee-ui-grid__separator[data-v-b69f5a93]{flex:0 0 12px;background:var(--yee-background-deep)}.yee-ui-grid__table-container[data-v-b69f5a93]{flex:1 1 auto;min-width:0;min-height:0;overflow:hidden}.yee-ui-grid__table[data-v-b69f5a93]{min-height:0;box-sizing:border-box;padding:16px}.yee-ui-grid__title[data-v-b69f5a93]{display:inline-flex;gap:6px;align-items:center;margin-right:12px;font-size:var(--yee-font-size-lg);font-weight:600}.yee-ui-grid__help[data-v-b69f5a93]{display:inline-grid;width:16px;height:16px;color:var(--yee-muted-foreground);font-size:11px;border:1px solid var(--yee-border);border-radius:50%;place-items:center}.yee-ui-grid__empty[data-v-b69f5a93]{padding:32px 0;color:var(--yee-muted-foreground);text-align:center}
138
+ .yee-ui-grid[data-v-df63401d]{display:flex;flex-direction:column;min-width:0;height:auto;min-height:0;box-sizing:border-box;overflow:hidden;color:var(--yee-foreground);background:var(--yee-card);border-radius:var(--yee-radius)}.yee-ui-grid--fill-page-content[data-v-df63401d]{height:100%}.yee-ui-grid__search-form[data-v-df63401d]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 24px;align-items:center;padding:16px;background:var(--yee-card)}.yee-ui-grid__field[data-v-df63401d]{display:grid;grid-template-columns:var(--yee-grid-label-width, max-content) minmax(0,1fr);gap:8px;align-items:center;min-width:0}.yee-ui-grid__field--span-2[data-v-df63401d]{grid-column:span 2}.yee-ui-grid__field--span-3[data-v-df63401d]{grid-column:span 3}.yee-ui-grid__field--vertical[data-v-df63401d]{grid-template-columns:minmax(0,1fr);gap:4px;align-items:stretch}.yee-ui-grid__field--no-label[data-v-df63401d]{grid-template-columns:minmax(0,1fr);gap:0}.yee-ui-grid__control[data-v-df63401d]{display:flex;flex-direction:column;min-width:0}.yee-ui-grid__label[data-v-df63401d]{color:var(--yee-foreground);font-size:var(--yee-font-size);text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.yee-ui-grid__field--vertical .yee-ui-grid__label[data-v-df63401d]{justify-self:start;text-align:left}.yee-ui-grid__field--error .yee-ui-grid__control[data-v-df63401d]>.ant-checkbox-wrapper,.yee-ui-grid__field--error .yee-ui-grid__control[data-v-df63401d]>.ant-radio-wrapper,.yee-ui-grid__field--error .yee-ui-grid__control[data-v-df63401d]>.ant-rate{color:var(--yee-destructive)}.yee-ui-grid__field--error .yee-ui-grid__control[data-v-df63401d]>.ant-checkbox-wrapper .ant-checkbox-inner,.yee-ui-grid__field--error .yee-ui-grid__control[data-v-df63401d]>.ant-radio-wrapper .ant-radio-inner{border-color:var(--yee-destructive)}.yee-ui-grid__field--error .yee-ui-grid__control[data-v-df63401d]>.ant-switch{background:var(--yee-destructive)}.yee-ui-grid__field--error .yee-ui-grid__control[data-v-df63401d]>.ant-segmented,.yee-ui-grid__field--error .yee-ui-grid__control[data-v-df63401d]>.ant-upload-select-picture-card{border-color:var(--yee-destructive)}.yee-ui-grid__field--error .yee-ui-grid__control[data-v-df63401d]>.ant-slider .ant-slider-track,.yee-ui-grid__field--error .yee-ui-grid__control[data-v-df63401d]>.ant-slider .ant-slider-handle{background:var(--yee-destructive);border-color:var(--yee-destructive)}.yee-ui-grid__field--error .yee-ui-grid__label[data-v-df63401d]:before,.yee-ui-grid__field--required .yee-ui-grid__label[data-v-df63401d]:before{margin-right:2px;color:var(--yee-destructive);content:"*"}.yee-ui-grid__form-actions[data-v-df63401d]{display:flex;gap:8px;align-items:center;grid-column:-2 / -1;justify-content:flex-end}.yee-ui-grid__collapse-button[data-v-df63401d]{display:inline-flex;gap:2px;align-items:center;padding-left:0;padding-right:0}.yee-ui-grid__collapse-icon[data-v-df63401d]{flex:0 0 auto;width:16px;height:16px;transition:transform .3s ease}.yee-ui-grid__collapse-icon--expanded[data-v-df63401d]{transform:rotate(180deg)}.yee-ui-grid__separator[data-v-df63401d]{flex:0 0 12px;background:var(--yee-background-deep)}.yee-ui-grid__table-container[data-v-df63401d]{flex:1 1 auto;min-width:0;min-height:0;overflow:hidden}.yee-ui-grid__table[data-v-df63401d]{min-height:0;box-sizing:border-box;padding:16px}.yee-ui-grid__title[data-v-df63401d]{display:inline-flex;gap:6px;align-items:center;margin-right:12px;font-size:var(--yee-font-size-lg);font-weight:600}.yee-ui-grid__help[data-v-df63401d]{display:inline-grid;width:16px;height:16px;color:var(--yee-muted-foreground);font-size:11px;border:1px solid var(--yee-border);border-radius:50%;place-items:center}.yee-ui-grid__empty[data-v-df63401d]{padding:32px 0;color:var(--yee-muted-foreground);text-align:center}@media not (min-width:1024px){.yee-ui-grid__search-form[data-v-df63401d]{grid-template-columns:repeat(2,minmax(0,1fr))}.yee-ui-grid__field--span-3[data-v-df63401d]{grid-column:span 2}}@media not (min-width:768px){.yee-ui-grid__search-form[data-v-df63401d]{grid-template-columns:minmax(0,1fr)}.yee-ui-grid__field--span-2[data-v-df63401d],.yee-ui-grid__field--span-3[data-v-df63401d]{grid-column:span 1}}
143
139
  /*$vite$:1*/
144
140
  .yee-ui-page[data-v-ba7ea0ff]{display:flex;flex-direction:column;min-width:0;min-height:100%;box-sizing:border-box;color:var(--yee-foreground);background:var(--yee-background-deep)}.yee-ui-page--auto-height[data-v-ba7ea0ff]{height:calc(var(--yee-content-height, 100%) - var(--yee-page-height-offset));min-height:0;overflow:hidden}.yee-ui-page__header[data-v-ba7ea0ff],.yee-ui-page__footer[data-v-ba7ea0ff]{display:flex;flex:0 0 auto;gap:16px;align-items:center;box-sizing:border-box;padding:16px 24px;background:var(--yee-card)}.yee-ui-page__header[data-v-ba7ea0ff]{justify-content:space-between;border-bottom:1px solid var(--yee-border-secondary)}.yee-ui-page__footer[data-v-ba7ea0ff]{justify-content:flex-end;border-top:1px solid var(--yee-border-secondary)}.yee-ui-page__heading[data-v-ba7ea0ff]{min-width:0}.yee-ui-page__title[data-v-ba7ea0ff],.yee-ui-page__description[data-v-ba7ea0ff]{margin:0}.yee-ui-page__title[data-v-ba7ea0ff]{font-size:var(--yee-font-size-lg);font-weight:600;line-height:1.5}.yee-ui-page__description[data-v-ba7ea0ff]{margin-top:4px;color:var(--yee-muted-foreground);font-size:var(--yee-font-size);line-height:var(--yee-line-height)}.yee-ui-page__extra[data-v-ba7ea0ff]{flex:0 0 auto}.yee-ui-page__content[data-v-ba7ea0ff]{flex:1 1 auto;min-width:0;min-height:0;box-sizing:border-box}.yee-ui-page--auto-height>.yee-ui-page__content[data-v-ba7ea0ff]{flex:0 0 auto}
145
141
  /*$vite$:1*/
@@ -0,0 +1,141 @@
1
+ import { shallowRef as a, reactive as n, defineComponent as h, onBeforeUnmount as d, h as o, defineAsyncComponent as m } from "vue";
2
+ class c {
3
+ /** 当前表单 Schema,由组件初始化,可通过 updateSchema 动态更新。 */
4
+ schema = a([]);
5
+ initialValues = {};
6
+ values = n({});
7
+ /** @internal 使用配置初始化 Schema 和字段值。 */
8
+ configure(e) {
9
+ this.schema.value = e.schema.map((s) => ({ ...s })), this.initialValues = { ...e.initialValues }, this.resetForm();
10
+ }
11
+ /** 获取指定字段值,并保留 TValues 中声明的字段类型。 */
12
+ getFieldValue(e) {
13
+ return this.values[e];
14
+ }
15
+ /** 获取当前全部字段值的浅拷贝。 */
16
+ getValues() {
17
+ return { ...this.values };
18
+ }
19
+ /** 将字段值恢复为 initialValues。 */
20
+ resetForm() {
21
+ for (const e of Object.keys(this.values))
22
+ delete this.values[e];
23
+ Object.assign(this.values, this.initialValues);
24
+ }
25
+ /** 设置指定字段值,字段名和值必须与 TValues 保持一致。 */
26
+ setFieldValue(e, s) {
27
+ this.values[e] = s;
28
+ }
29
+ /** 批量更新已声明字段的值。 */
30
+ setValues(e) {
31
+ Object.assign(this.values, e);
32
+ }
33
+ /** @internal 获取供 Ant Design Vue Form 使用的响应式模型。 */
34
+ getModel() {
35
+ return this.values;
36
+ }
37
+ /** 校验指定字段是否满足必填配置。 */
38
+ validateField(e) {
39
+ const s = this.schema.value.find((i) => i.fieldName === e);
40
+ return !s || s.hide || !s.required || !f(this.getFieldValue(e));
41
+ }
42
+ /** 校验所有未隐藏的必填字段;校验失败时返回 false。 */
43
+ validate() {
44
+ return this.schema.value.every((e) => this.validateField(e.fieldName));
45
+ }
46
+ /** 按字段名动态更新 Schema。 */
47
+ updateSchema(e) {
48
+ const s = new Map(e.map((i) => [i.fieldName, i]));
49
+ this.schema.value = this.schema.value.map((i) => ({
50
+ ...i,
51
+ ...s.get(i.fieldName)
52
+ }));
53
+ }
54
+ }
55
+ function f(t) {
56
+ return t == null ? !0 : typeof t == "string" ? t.trim().length === 0 : Array.isArray(t) ? t.length === 0 : typeof t == "number" && Number.isNaN(t);
57
+ }
58
+ class p {
59
+ /** 查询表单控制器。 */
60
+ formApi = new c();
61
+ /** 查询表单当前是否可见。 */
62
+ searchFormVisible;
63
+ /** 当前 Grid 初始化配置。 */
64
+ state;
65
+ grid;
66
+ constructor(e) {
67
+ this.state = a(e), this.searchFormVisible = a(e.showSearchForm ?? !0);
68
+ }
69
+ /** @internal 由 YeeGrid 挂载底层 VXE Grid 实例。 */
70
+ mount(e) {
71
+ this.grid = e;
72
+ }
73
+ /** 保留当前页码并执行查询,可在查询前合并表单值。 */
74
+ query = async (e) => (e && this.formApi.setValues(e), this.grid?.commitProxy("query"));
75
+ /** 回到第一页并重新查询,可在查询前合并表单值。 */
76
+ reload = async (e) => (e && this.formApi.setValues(e), this.grid?.commitProxy("reload"));
77
+ /** 合并更新 VXE Grid 配置。 */
78
+ setGridOptions(e) {
79
+ this.setState({
80
+ gridOptions: {
81
+ ...this.state.value.gridOptions,
82
+ ...e
83
+ }
84
+ });
85
+ }
86
+ /** 设置表格加载状态。 */
87
+ setLoading(e) {
88
+ this.setGridOptions({ loading: e });
89
+ }
90
+ /** 合并更新 useYeeGrid 初始化配置。 */
91
+ setState(e) {
92
+ this.state.value = {
93
+ ...this.state.value,
94
+ ...e
95
+ };
96
+ }
97
+ /** 切换查询表单显隐,并返回切换后的状态。 */
98
+ toggleSearchForm(e) {
99
+ return this.searchFormVisible.value = e ?? !this.searchFormVisible.value, this.searchFormVisible.value;
100
+ }
101
+ /** @internal 清理底层 VXE Grid 实例引用。 */
102
+ unmount() {
103
+ this.grid = void 0;
104
+ }
105
+ }
106
+ let r = !1;
107
+ function g() {
108
+ if (!(r || typeof document > "u")) {
109
+ if (document.querySelector("link[data-yee-grid-styles]")) {
110
+ r = !0;
111
+ return;
112
+ }
113
+ r = !0, import("@yeepay/yee-boss-ui/grid.css");
114
+ }
115
+ }
116
+ const y = m(() => import("./YeeGrid-C5jcjTuQ.js"));
117
+ function b(t) {
118
+ g();
119
+ const e = new p(t);
120
+ return [h({
121
+ name: "YeeGrid",
122
+ inheritAttrs: !1,
123
+ props: {
124
+ tableTitle: String,
125
+ tableTitleHelp: String
126
+ },
127
+ setup(i, { attrs: l, slots: u }) {
128
+ return d(() => e.unmount()), () => o(y, {
129
+ ...l,
130
+ api: e,
131
+ ...i.tableTitle ? { tableTitle: i.tableTitle } : {},
132
+ ...i.tableTitleHelp ? { tableTitleHelp: i.tableTitleHelp } : {}
133
+ }, u);
134
+ }
135
+ }), e];
136
+ }
137
+ export {
138
+ p as Y,
139
+ c as a,
140
+ b as u
141
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeepay/yee-boss-ui",
3
- "version": "0.1.20",
3
+ "version": "0.1.22",
4
4
  "description": "运营后台平台公共 UI 与主题基础能力",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -35,10 +35,6 @@
35
35
  "types": "./dist/file-upload.d.ts",
36
36
  "import": "./dist/file-upload.js"
37
37
  },
38
- "./form": {
39
- "types": "./dist/form.d.ts",
40
- "import": "./dist/form.js"
41
- },
42
38
  "./grid": {
43
39
  "types": "./dist/grid.d.ts",
44
40
  "import": "./dist/grid.js"
@@ -61,9 +57,9 @@
61
57
  "types": "./dist/page.d.ts",
62
58
  "import": "./dist/page.js"
63
59
  },
64
- "./select": {
65
- "types": "./dist/select.d.ts",
66
- "import": "./dist/select.js"
60
+ "./resolver": {
61
+ "types": "./dist/resolver.d.ts",
62
+ "import": "./dist/resolver.js"
67
63
  },
68
64
  "./style.css": "./dist/style.css"
69
65
  },
@@ -77,17 +73,6 @@
77
73
  "sideEffects": [
78
74
  "**/*.css"
79
75
  ],
80
- "scripts": {
81
- "build": "vite build",
82
- "build:example": "vite build --config examples/vite.config.ts",
83
- "check": "pnpm typecheck && pnpm test && pnpm build && pnpm typecheck:public && pnpm publint",
84
- "example": "vite --config examples/vite.config.ts",
85
- "prepack": "pnpm check",
86
- "publint": "publint",
87
- "test": "vitest run",
88
- "typecheck": "vue-tsc --noEmit",
89
- "typecheck:public": "vue-tsc --noEmit -p tsconfig.public.json"
90
- },
91
76
  "peerDependencies": {
92
77
  "ant-design-vue": "^4.2.0",
93
78
  "vue": "^3.5.0"
@@ -113,14 +98,18 @@
113
98
  "node": ">=20.19.0",
114
99
  "pnpm": ">=10.0.0"
115
100
  },
116
- "packageManager": "pnpm@10.28.1",
117
- "pnpm": {
118
- "overrides": {
119
- "@vxe-ui/core": "4.3.1"
120
- }
121
- },
122
101
  "publishConfig": {
123
102
  "access": "public",
124
103
  "registry": "https://registry.npmjs.org/"
104
+ },
105
+ "scripts": {
106
+ "build": "vite build",
107
+ "build:example": "vite build --config examples/vite.config.ts",
108
+ "check": "pnpm typecheck && pnpm test && pnpm build && pnpm typecheck:public && pnpm publint",
109
+ "example": "vite --config examples/vite.config.ts",
110
+ "publint": "publint",
111
+ "test": "vitest run",
112
+ "typecheck": "vue-tsc --noEmit",
113
+ "typecheck:public": "vue-tsc --noEmit -p tsconfig.public.json"
125
114
  }
126
- }
115
+ }
@@ -1,160 +0,0 @@
1
- import { defineComponent as O, shallowRef as m, computed as p, onMounted as U, nextTick as D, onBeforeUnmount as z, openBlock as i, createElementBlock as d, withModifiers as L, createElementVNode as f, Fragment as G, renderList as K, toDisplayString as R, renderSlot as $, createBlock as F, resolveDynamicComponent as A, mergeProps as j, createCommentVNode as V, createVNode as x, unref as v, withCtx as y, createTextVNode as h } from "vue";
2
- import { TreeSelect as q, TimeRangePicker as H, TimePicker as J, Textarea as Q, Switch as W, Slider as X, Select as Z, Segmented as ee, Rate as te, RangePicker as oe, RadioGroup as ne, Radio as ae, Mentions as ie, InputPassword as le, InputNumber as re, Input as se, DatePicker as ue, CheckboxGroup as ce, Checkbox as me, Cascader as pe, AutoComplete as de, Button as C } from "ant-design-vue";
3
- import { Y as fe } from "./YeeFileUpload-BUFoWs8x.js";
4
- import { _ as ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- const ye = {
6
- AutoComplete: de,
7
- Cascader: pe,
8
- Checkbox: me,
9
- CheckboxGroup: ce,
10
- DatePicker: ue,
11
- Input: se,
12
- InputNumber: re,
13
- InputPassword: le,
14
- Mentions: ie,
15
- Radio: ae,
16
- RadioGroup: ne,
17
- RangePicker: oe,
18
- Rate: te,
19
- Segmented: ee,
20
- Select: Z,
21
- Slider: X,
22
- Switch: W,
23
- Textarea: Q,
24
- TimePicker: J,
25
- TimeRangePicker: H,
26
- TreeSelect: q,
27
- Upload: fe
28
- }, he = {
29
- Checkbox: "checked",
30
- Radio: "checked",
31
- Switch: "checked",
32
- Upload: "fileList"
33
- }, Ce = { class: "yee-ui-form__label" }, ge = { class: "yee-ui-form__actions" }, ke = /* @__PURE__ */ O({
34
- name: "YeeForm",
35
- __name: "YeeForm",
36
- props: {
37
- api: {},
38
- onReset: { type: Function },
39
- onSubmit: { type: Function },
40
- options: {}
41
- },
42
- setup(r) {
43
- const t = r, a = m(t.options.collapsed ?? !0), g = m(3), l = m(null);
44
- let s;
45
- t.api.configure(t.options);
46
- const k = p(() => t.api.schema.value.filter((e) => !e.hide)), B = p(() => Math.max(1, t.options.collapsedRows ?? 1) * g.value), P = p(() => !t.options.showCollapseButton || !a.value ? k.value : k.value.slice(0, B.value));
47
- function b() {
48
- const e = l.value;
49
- if (!e) return;
50
- const n = getComputedStyle(e).gridTemplateColumns.split(" ").map((o) => o.trim()).filter(Boolean);
51
- n.length > 0 && (g.value = n.length);
52
- }
53
- U(async () => {
54
- await D(), b(), typeof ResizeObserver < "u" && l.value && (s = new ResizeObserver(b), s.observe(l.value));
55
- }), z(() => {
56
- s?.disconnect();
57
- });
58
- function _(e) {
59
- return t.api.getFieldValue(e.fieldName);
60
- }
61
- function w(e) {
62
- return e !== "Custom";
63
- }
64
- function N(e) {
65
- return w(e.component) ? ye[e.component] : void 0;
66
- }
67
- function M(e) {
68
- return w(e.component) ? he[e.component] ?? "value" : "value";
69
- }
70
- function T(e) {
71
- const n = _(e), o = M(e);
72
- return {
73
- ...e.componentProps,
74
- ...n === void 0 ? {} : { [o]: n },
75
- [`onUpdate:${o}`]: (c) => S(e, c)
76
- };
77
- }
78
- function S(e, n) {
79
- t.api.setFieldValue(
80
- e.fieldName,
81
- n
82
- ), t.options.submitOnChange && u();
83
- }
84
- async function E() {
85
- t.api.resetForm(), await t.onReset?.();
86
- }
87
- async function u() {
88
- await t.onSubmit?.(t.api.getValues());
89
- }
90
- function Y(e) {
91
- e.key === "Enter" && t.options.submitOnEnter && (e.preventDefault(), u());
92
- }
93
- function I() {
94
- a.value = !a.value, t.options.handleCollapsedChange?.(a.value);
95
- }
96
- return (e, n) => (i(), d("form", {
97
- class: "yee-ui-form",
98
- onKeydown: Y,
99
- onSubmit: L(u, ["prevent"])
100
- }, [
101
- f("div", {
102
- ref_key: "fieldsElement",
103
- ref: l,
104
- class: "yee-ui-form__fields"
105
- }, [
106
- (i(!0), d(G, null, K(P.value, (o) => (i(), d("label", {
107
- key: o.fieldName,
108
- class: "yee-ui-form__field"
109
- }, [
110
- f("span", Ce, R(o.label), 1),
111
- $(e.$slots, o.fieldName, {
112
- field: o,
113
- setValue: (c) => S(o, c),
114
- value: _(o),
115
- values: r.api.getValues()
116
- }, () => [
117
- o.component !== "Custom" ? (i(), F(A(N(o)), j({
118
- key: 0,
119
- ref_for: !0
120
- }, T(o)), null, 16)) : V("", !0)
121
- ], !0)
122
- ]))), 128))
123
- ], 512),
124
- f("div", ge, [
125
- x(v(C), {
126
- "html-type": "button",
127
- onClick: E
128
- }, {
129
- default: y(() => [...n[0] || (n[0] = [
130
- h(" 重置 ", -1)
131
- ])]),
132
- _: 1
133
- }),
134
- x(v(C), {
135
- type: "primary",
136
- "html-type": "submit"
137
- }, {
138
- default: y(() => [...n[1] || (n[1] = [
139
- h(" 查询 ", -1)
140
- ])]),
141
- _: 1
142
- }),
143
- r.options.showCollapseButton ? (i(), F(v(C), {
144
- key: 0,
145
- type: "link",
146
- "html-type": "button",
147
- onClick: I
148
- }, {
149
- default: y(() => [
150
- h(R(a.value ? "展开" : "收起"), 1)
151
- ]),
152
- _: 1
153
- })) : V("", !0)
154
- ])
155
- ], 32));
156
- }
157
- }), Re = /* @__PURE__ */ ve(ke, [["__scopeId", "data-v-13cadc25"]]);
158
- export {
159
- Re as Y
160
- };