@shwfed/nuxt 0.8.3 → 0.9.1

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shwfed/nuxt",
3
3
  "configKey": "shwfed",
4
- "version": "0.8.3",
4
+ "version": "0.9.1",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,174 +1,176 @@
1
1
  import { Effect } from 'effect';
2
- import type { Field } from './ui/fields/Fields.vue.js';
3
- export { CalendarFieldC, FieldC, NumberFieldC, SelectFieldC, StringFieldC, } from './ui/fields/Fields.vue.js';
4
- export type { Field } from './ui/fields/Fields.vue.js';
2
+ import type { FieldsConfig } from './ui/fields/Fields.vue.js';
3
+ export { CalendarFieldC, FieldC, FieldsConfigC, NumberFieldC, SelectFieldC, StringFieldC, } from './ui/fields/Fields.vue.js';
4
+ export type { Field, FieldsConfig } from './ui/fields/Fields.vue.js';
5
5
  declare const _default: typeof __VLS_export;
6
6
  export default _default;
7
7
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
8
- orientation?: "horizontal" | "vertical" | "floating";
9
- config?: Effect.Effect<ReadonlyArray<Field> | undefined>;
8
+ config?: Effect.Effect<FieldsConfig | undefined>;
10
9
  } & {
11
10
  modelValue?: Record<string, unknown>;
12
11
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
12
  "update:modelValue": (value: Record<string, unknown>) => any;
14
- "update:config": (args_0: readonly ({
15
- type: "string";
16
- path: string;
17
- title: readonly {
18
- locale: "zh" | "ja" | "en" | "ko";
19
- message: string;
20
- }[];
21
- icon?: string | undefined;
22
- style?: string | undefined;
23
- discardEmptyString?: boolean | undefined;
24
- maxLength?: string | undefined;
25
- hidden?: string | undefined;
26
- disabled?: string | undefined;
27
- validation?: readonly Readonly<{
28
- expression: string;
29
- message: string;
30
- }>[] | undefined;
31
- } | {
32
- type: "number";
33
- path: string;
34
- title: readonly {
35
- locale: "zh" | "ja" | "en" | "ko";
36
- message: string;
37
- }[];
38
- icon?: string | undefined;
39
- style?: string | undefined;
40
- min?: string | undefined;
41
- max?: string | undefined;
42
- step?: string | undefined;
43
- hidden?: string | undefined;
44
- disabled?: string | undefined;
45
- validation?: readonly Readonly<{
46
- expression: string;
47
- message: string;
48
- }>[] | undefined;
49
- } | {
50
- type: "select";
51
- path: string;
52
- title: readonly {
53
- locale: "zh" | "ja" | "en" | "ko";
54
- message: string;
55
- }[];
56
- options: string;
57
- label: string;
58
- value: string;
59
- key: string;
60
- icon?: string | undefined;
61
- style?: string | undefined;
62
- hidden?: string | undefined;
63
- disabled?: string | undefined;
64
- validation?: readonly Readonly<{
65
- expression: string;
66
- message: string;
67
- }>[] | undefined;
68
- } | {
69
- type: "calendar";
70
- path: string;
71
- title: readonly {
72
- locale: "zh" | "ja" | "en" | "ko";
73
- message: string;
74
- }[];
75
- mode: "date" | "month" | "year";
76
- value: string;
77
- icon?: string | undefined;
78
- style?: string | undefined;
79
- display?: string | undefined;
80
- disableDate?: string | undefined;
81
- hidden?: string | undefined;
82
- disabled?: string | undefined;
83
- validation?: readonly Readonly<{
84
- expression: string;
85
- message: string;
86
- }>[] | undefined;
87
- })[]) => any;
13
+ "update:config": (args_0: Readonly<{
14
+ fields: readonly ({
15
+ type: "string";
16
+ path: string;
17
+ title: readonly {
18
+ locale: "zh" | "ja" | "en" | "ko";
19
+ message: string;
20
+ }[];
21
+ icon?: string | undefined;
22
+ style?: string | undefined;
23
+ discardEmptyString?: boolean | undefined;
24
+ maxLength?: string | undefined;
25
+ hidden?: string | undefined;
26
+ disabled?: string | undefined;
27
+ validation?: readonly Readonly<{
28
+ expression: string;
29
+ message: string;
30
+ }>[] | undefined;
31
+ } | {
32
+ type: "number";
33
+ path: string;
34
+ title: readonly {
35
+ locale: "zh" | "ja" | "en" | "ko";
36
+ message: string;
37
+ }[];
38
+ icon?: string | undefined;
39
+ style?: string | undefined;
40
+ min?: string | undefined;
41
+ max?: string | undefined;
42
+ step?: string | undefined;
43
+ hidden?: string | undefined;
44
+ disabled?: string | undefined;
45
+ validation?: readonly Readonly<{
46
+ expression: string;
47
+ message: string;
48
+ }>[] | undefined;
49
+ } | {
50
+ type: "select";
51
+ path: string;
52
+ title: readonly {
53
+ locale: "zh" | "ja" | "en" | "ko";
54
+ message: string;
55
+ }[];
56
+ options: string;
57
+ label: string;
58
+ value: string;
59
+ key: string;
60
+ icon?: string | undefined;
61
+ style?: string | undefined;
62
+ hidden?: string | undefined;
63
+ disabled?: string | undefined;
64
+ validation?: readonly Readonly<{
65
+ expression: string;
66
+ message: string;
67
+ }>[] | undefined;
68
+ } | {
69
+ type: "calendar";
70
+ path: string;
71
+ title: readonly {
72
+ locale: "zh" | "ja" | "en" | "ko";
73
+ message: string;
74
+ }[];
75
+ mode: "date" | "month" | "year";
76
+ value: string;
77
+ icon?: string | undefined;
78
+ style?: string | undefined;
79
+ display?: string | undefined;
80
+ disableDate?: string | undefined;
81
+ hidden?: string | undefined;
82
+ disabled?: string | undefined;
83
+ validation?: readonly Readonly<{
84
+ expression: string;
85
+ message: string;
86
+ }>[] | undefined;
87
+ })[];
88
+ orientation?: "vertical" | "horizontal" | "floating" | undefined;
89
+ }>) => any;
88
90
  }, string, import("vue").PublicProps, Readonly<{
89
- orientation?: "horizontal" | "vertical" | "floating";
90
- config?: Effect.Effect<ReadonlyArray<Field> | undefined>;
91
+ config?: Effect.Effect<FieldsConfig | undefined>;
91
92
  } & {
92
93
  modelValue?: Record<string, unknown>;
93
94
  }> & Readonly<{
94
95
  "onUpdate:modelValue"?: ((value: Record<string, unknown>) => any) | undefined;
95
- "onUpdate:config"?: ((args_0: readonly ({
96
- type: "string";
97
- path: string;
98
- title: readonly {
99
- locale: "zh" | "ja" | "en" | "ko";
100
- message: string;
101
- }[];
102
- icon?: string | undefined;
103
- style?: string | undefined;
104
- discardEmptyString?: boolean | undefined;
105
- maxLength?: string | undefined;
106
- hidden?: string | undefined;
107
- disabled?: string | undefined;
108
- validation?: readonly Readonly<{
109
- expression: string;
110
- message: string;
111
- }>[] | undefined;
112
- } | {
113
- type: "number";
114
- path: string;
115
- title: readonly {
116
- locale: "zh" | "ja" | "en" | "ko";
117
- message: string;
118
- }[];
119
- icon?: string | undefined;
120
- style?: string | undefined;
121
- min?: string | undefined;
122
- max?: string | undefined;
123
- step?: string | undefined;
124
- hidden?: string | undefined;
125
- disabled?: string | undefined;
126
- validation?: readonly Readonly<{
127
- expression: string;
128
- message: string;
129
- }>[] | undefined;
130
- } | {
131
- type: "select";
132
- path: string;
133
- title: readonly {
134
- locale: "zh" | "ja" | "en" | "ko";
135
- message: string;
136
- }[];
137
- options: string;
138
- label: string;
139
- value: string;
140
- key: string;
141
- icon?: string | undefined;
142
- style?: string | undefined;
143
- hidden?: string | undefined;
144
- disabled?: string | undefined;
145
- validation?: readonly Readonly<{
146
- expression: string;
147
- message: string;
148
- }>[] | undefined;
149
- } | {
150
- type: "calendar";
151
- path: string;
152
- title: readonly {
153
- locale: "zh" | "ja" | "en" | "ko";
154
- message: string;
155
- }[];
156
- mode: "date" | "month" | "year";
157
- value: string;
158
- icon?: string | undefined;
159
- style?: string | undefined;
160
- display?: string | undefined;
161
- disableDate?: string | undefined;
162
- hidden?: string | undefined;
163
- disabled?: string | undefined;
164
- validation?: readonly Readonly<{
165
- expression: string;
166
- message: string;
167
- }>[] | undefined;
168
- })[]) => any) | undefined;
169
- }>, {
170
- orientation: "horizontal" | "vertical" | "floating";
171
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
96
+ "onUpdate:config"?: ((args_0: Readonly<{
97
+ fields: readonly ({
98
+ type: "string";
99
+ path: string;
100
+ title: readonly {
101
+ locale: "zh" | "ja" | "en" | "ko";
102
+ message: string;
103
+ }[];
104
+ icon?: string | undefined;
105
+ style?: string | undefined;
106
+ discardEmptyString?: boolean | undefined;
107
+ maxLength?: string | undefined;
108
+ hidden?: string | undefined;
109
+ disabled?: string | undefined;
110
+ validation?: readonly Readonly<{
111
+ expression: string;
112
+ message: string;
113
+ }>[] | undefined;
114
+ } | {
115
+ type: "number";
116
+ path: string;
117
+ title: readonly {
118
+ locale: "zh" | "ja" | "en" | "ko";
119
+ message: string;
120
+ }[];
121
+ icon?: string | undefined;
122
+ style?: string | undefined;
123
+ min?: string | undefined;
124
+ max?: string | undefined;
125
+ step?: string | undefined;
126
+ hidden?: string | undefined;
127
+ disabled?: string | undefined;
128
+ validation?: readonly Readonly<{
129
+ expression: string;
130
+ message: string;
131
+ }>[] | undefined;
132
+ } | {
133
+ type: "select";
134
+ path: string;
135
+ title: readonly {
136
+ locale: "zh" | "ja" | "en" | "ko";
137
+ message: string;
138
+ }[];
139
+ options: string;
140
+ label: string;
141
+ value: string;
142
+ key: string;
143
+ icon?: string | undefined;
144
+ style?: string | undefined;
145
+ hidden?: string | undefined;
146
+ disabled?: string | undefined;
147
+ validation?: readonly Readonly<{
148
+ expression: string;
149
+ message: string;
150
+ }>[] | undefined;
151
+ } | {
152
+ type: "calendar";
153
+ path: string;
154
+ title: readonly {
155
+ locale: "zh" | "ja" | "en" | "ko";
156
+ message: string;
157
+ }[];
158
+ mode: "date" | "month" | "year";
159
+ value: string;
160
+ icon?: string | undefined;
161
+ style?: string | undefined;
162
+ display?: string | undefined;
163
+ disableDate?: string | undefined;
164
+ hidden?: string | undefined;
165
+ disabled?: string | undefined;
166
+ validation?: readonly Readonly<{
167
+ expression: string;
168
+ message: string;
169
+ }>[] | undefined;
170
+ })[];
171
+ orientation?: "vertical" | "horizontal" | "floating" | undefined;
172
+ }>) => any) | undefined;
173
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
172
174
  [x: string]: ((props: any) => any) | undefined;
173
175
  }>;
174
176
  type __VLS_WithSlots<T, S> = T & {
@@ -5,17 +5,18 @@ defineOptions({
5
5
  inheritAttrs: false
6
6
  });
7
7
  const props = defineProps({
8
- orientation: { type: String, required: false, default: "horizontal" },
9
8
  config: { type: null, required: false }
10
9
  });
11
10
  const emit = defineEmits(["update:config"]);
12
11
  const modelValue = defineModel("modelValue", { type: Object, ...{
13
12
  default: () => ({})
14
13
  } });
15
- const emptyFields = [];
16
- const fields = props.config ? props.config.pipe(Effect.map((config) => config ?? emptyFields)) : Effect.succeed(emptyFields);
17
- function handleConfigUpdate(config) {
18
- emit("update:config", config);
14
+ const defaultConfig = {
15
+ fields: []
16
+ };
17
+ const config = props.config ? props.config.pipe(Effect.map((config2) => config2 ?? defaultConfig)) : Effect.succeed(defaultConfig);
18
+ function handleConfigUpdate(config2) {
19
+ emit("update:config", config2);
19
20
  }
20
21
  </script>
21
22
 
@@ -23,6 +24,7 @@ function handleConfigUpdate(config) {
23
24
  export {
24
25
  CalendarFieldC,
25
26
  FieldC,
27
+ FieldsConfigC,
26
28
  NumberFieldC,
27
29
  SelectFieldC,
28
30
  StringFieldC
@@ -33,9 +35,8 @@ export {
33
35
  <UiFields
34
36
  v-bind="$attrs"
35
37
  v-model="modelValue"
36
- :orientation="props.orientation"
37
- :fields="fields"
38
- @update:fields="handleConfigUpdate"
38
+ :config="config"
39
+ @update:config="handleConfigUpdate"
39
40
  >
40
41
  <template
41
42
  v-for="(_, slotName) in $slots"