@sealcode/sealgen 0.19.7 → 0.19.9
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/@types/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export * as Components from "./components/components.js";
|
|
|
17
17
|
export * from "./mount.js";
|
|
18
18
|
export * from "./page/default-list-filters.js";
|
|
19
19
|
export * from "./forms/fields/get-field-for-sealious.js";
|
|
20
|
+
export * from "./forms/controls/form-control.js";
|
|
20
21
|
import { Context } from "koa";
|
|
21
22
|
import { Readable } from "node:stream";
|
|
22
23
|
export interface HTMLOptions {
|
|
@@ -30,7 +30,7 @@ class PhoneNumberWithCountryCode extends FormField {
|
|
|
30
30
|
getControl() {
|
|
31
31
|
return new Hybrid(this, {
|
|
32
32
|
country_code: new PickFromListField(
|
|
33
|
-
|
|
33
|
+
this.required,
|
|
34
34
|
async () => countryCodes.all().sort(
|
|
35
35
|
(a, b) => a.countryCallingCode < b.countryCallingCode ? -1 : 1
|
|
36
36
|
).map((code) => ({
|
|
@@ -38,7 +38,7 @@ class PhoneNumberWithCountryCode extends FormField {
|
|
|
38
38
|
label: "+" + code.countryCallingCode + " " + code.flag
|
|
39
39
|
}))
|
|
40
40
|
).setLabel("Country code"),
|
|
41
|
-
number: new PhoneNumberWithoutCountryCode(
|
|
41
|
+
number: new PhoneNumberWithoutCountryCode(this.required).setLabel(
|
|
42
42
|
"Phone number"
|
|
43
43
|
)
|
|
44
44
|
});
|
package/lib/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import * as Components from "./components/components.js";
|
|
|
17
17
|
export * from "./mount.js";
|
|
18
18
|
export * from "./page/default-list-filters.js";
|
|
19
19
|
export * from "./forms/fields/get-field-for-sealious.js";
|
|
20
|
+
export * from "./forms/controls/form-control.js";
|
|
20
21
|
export {
|
|
21
22
|
Components,
|
|
22
23
|
Controls,
|
package/package.json
CHANGED
|
@@ -40,7 +40,7 @@ export class PhoneNumberWithCountryCode<
|
|
|
40
40
|
|
|
41
41
|
getControl(): FormControl {
|
|
42
42
|
return new Hybrid(this, {
|
|
43
|
-
country_code: new PickFromListField(
|
|
43
|
+
country_code: new PickFromListField(this.required, async () =>
|
|
44
44
|
countryCodes
|
|
45
45
|
.all()
|
|
46
46
|
.sort((a, b) =>
|
|
@@ -51,7 +51,7 @@ export class PhoneNumberWithCountryCode<
|
|
|
51
51
|
label: "+" + code.countryCallingCode + " " + code.flag,
|
|
52
52
|
}))
|
|
53
53
|
).setLabel("Country code"),
|
|
54
|
-
number: new PhoneNumberWithoutCountryCode(
|
|
54
|
+
number: new PhoneNumberWithoutCountryCode(this.required).setLabel(
|
|
55
55
|
"Phone number"
|
|
56
56
|
),
|
|
57
57
|
});
|
package/src/index.ts
CHANGED
|
@@ -17,6 +17,7 @@ export * as Components from "./components/components.js";
|
|
|
17
17
|
export * from "./mount.js";
|
|
18
18
|
export * from "./page/default-list-filters.js";
|
|
19
19
|
export * from "./forms/fields/get-field-for-sealious.js";
|
|
20
|
+
export * from "./forms/controls/form-control.js";
|
|
20
21
|
|
|
21
22
|
import { Context } from "koa";
|
|
22
23
|
import { Readable } from "node:stream";
|