@es-joy/jsoe 0.17.0 → 0.18.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/CHANGES.md
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
# CHANGES TO `@es-joy/jsoe`
|
|
2
2
|
|
|
3
|
+
## 0.18.0
|
|
4
|
+
|
|
5
|
+
- feat: give option to disable `autoTrigger` for building type choices, e.g.,
|
|
6
|
+
with `$setFormat(format, autoTrigger)`
|
|
7
|
+
|
|
3
8
|
## 0.17.0
|
|
4
9
|
|
|
10
|
+
BREAKING CHANGES: API changes to `formatAndTypeChoices` and
|
|
11
|
+
`getFormatAndSchemaChoices`
|
|
12
|
+
|
|
5
13
|
- feat: Zodex schema support
|
|
6
14
|
|
|
7
15
|
## 0.16.0
|
|
@@ -56,22 +56,22 @@ export function formatAndTypeChoices({ schemas, getSchemaContent, hasValue, sing
|
|
|
56
56
|
$setFormat: (this: HTMLSelectElement & {
|
|
57
57
|
$buildTypeChoices: (this: HTMLSelectElement & {
|
|
58
58
|
$buildTypeChoices: any;
|
|
59
|
-
}) => Promise<void>;
|
|
60
|
-
}, valueFormat: string) => Promise<void>;
|
|
59
|
+
}, autoTrigger?: boolean | undefined) => Promise<void>;
|
|
60
|
+
}, valueFormat: string, autoTrigger?: boolean | undefined) => Promise<void>;
|
|
61
61
|
$buildTypeChoices: (this: HTMLSelectElement & {
|
|
62
62
|
$buildTypeChoices: any;
|
|
63
|
-
}) => Promise<void>;
|
|
63
|
+
}, autoTrigger?: boolean | undefined) => Promise<void>;
|
|
64
64
|
};
|
|
65
65
|
typesHolder: HTMLDivElement;
|
|
66
66
|
domArray: [formatChoices: HTMLSelectElement & {
|
|
67
67
|
$setFormat: (this: HTMLSelectElement & {
|
|
68
68
|
$buildTypeChoices: (this: HTMLSelectElement & {
|
|
69
69
|
$buildTypeChoices: any;
|
|
70
|
-
}) => Promise<void>;
|
|
71
|
-
}, valueFormat: string) => Promise<void>;
|
|
70
|
+
}, autoTrigger?: boolean | undefined) => Promise<void>;
|
|
71
|
+
}, valueFormat: string, autoTrigger?: boolean | undefined) => Promise<void>;
|
|
72
72
|
$buildTypeChoices: (this: HTMLSelectElement & {
|
|
73
73
|
$buildTypeChoices: any;
|
|
74
|
-
}) => Promise<void>;
|
|
74
|
+
}, autoTrigger?: boolean | undefined) => Promise<void>;
|
|
75
75
|
}, typesHolder: HTMLDivElement];
|
|
76
76
|
getValue: (stateObj: import("./types.js").StateObject, currentPath: string) => import("./formats.js").StructuredCloneValue;
|
|
77
77
|
getType: () => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatAndTypeChoices.d.ts","sourceRoot":"","sources":["../src/formatAndTypeChoices.js"],"names":[],"mappings":"AAuDA;;;;;GAKG;AAEH;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,sJA/BG;IAAuB,OAAO;IACyB,gBAAgB,aAAtD,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC;IAE1B,QAAQ;IAGR,WAAW;IACX,UAAU;IAKX,aAAa;IAEb,cAAc;IACU,OAAO;IACT,KAAK;CAChD,GAAU,OAAO,CAAC;IACpB,aAAiB;;;;
|
|
1
|
+
{"version":3,"file":"formatAndTypeChoices.d.ts","sourceRoot":"","sources":["../src/formatAndTypeChoices.js"],"names":[],"mappings":"AAuDA;;;;;GAKG;AAEH;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,sJA/BG;IAAuB,OAAO;IACyB,gBAAgB,aAAtD,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC;IAE1B,QAAQ;IAGR,WAAW;IACX,UAAU;IAKX,aAAa;IAEb,cAAc;IACU,OAAO;IACT,KAAK;CAChD,GAAU,OAAO,CAAC;IACpB,aAAiB;;;;qDAgDC,OAAO,CAAC,IAAI,CAAC;wBAff,MAAM,wCAKJ,OAAO,CAAC,IAAI,CAAC;;;iDAUb,OAAO,CAAC,IAAI,CAAC;MAhDE;IACjC,WAAe,iBAAc;IAC7B,QAAY,EAAE,CAAC,aAAa;;;;qDA8CV,OAAO,CAAC,IAAI,CAAC;wBAff,MAAM,wCAKJ,OAAO,CAAC,IAAI,CAAC;;;iDAUb,OAAO,CAAC,IAAI,CAAC;KA9CY,EAAE,WAAW,gBAAa,CAAC,CAAC;IACvE,QAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,YAAY,EAAE,WAAW,EACnD,WAAW,EAAE,MAAM,KAAK,OAAO,cAAc,EAAE,oBAAoB,CAAC;IAC1E,OAAW,EAAE,MAAM,MAAM,CAAC;IAC1B,cAAkB,EAAE,MAAM,OAAO,CAAC;IAClC,QAAY,EAAE,QAAQ,CAAC;IACvB,OAAW,EAAE,OAAO,cAAc,EAAE,OAAO,CAAC;IAC5C,KAAS,EAAE,OAAO,YAAY,EAAE,OAAO,CAAA;CACpC,CAAC,CAiOJ;AA5SM,oFAPJ;IAAuB,OAAO;IACT,cAAc;IACb,UAAU;CAGhC,GAAU,gBAAgB,CAiC5B;+BAIU,OAAO,cAAc,EAAE,oBAAoB,YAC3C,OAAO,YAAY,EAAE,WAAW,KAC9B,OAAO,CAAC,IAAI,CAAC;0BAIb,OAAO,qBAAqB,EAAE,WAAW;mCAvDzC,cAAc,GAAC,IAAI;oBALZ,cAAc;kBADhB,YAAY"}
|
package/dist/index.js
CHANGED
|
@@ -21823,6 +21823,7 @@ async function formatAndTypeChoices ({
|
|
|
21823
21823
|
* Sets the desired format and rebuilds the type choices.
|
|
21824
21824
|
* @callback SetFormat
|
|
21825
21825
|
* @param {string} valueFormat
|
|
21826
|
+
* @param {boolean} [autoTrigger]
|
|
21826
21827
|
* @this {HTMLSelectElement & {
|
|
21827
21828
|
* $buildTypeChoices: TypeChoiceBuilder
|
|
21828
21829
|
* }}
|
|
@@ -21832,6 +21833,7 @@ async function formatAndTypeChoices ({
|
|
|
21832
21833
|
/**
|
|
21833
21834
|
* Rebuilds the type choices.
|
|
21834
21835
|
* @callback TypeChoiceBuilder
|
|
21836
|
+
* @param {boolean} [autoTrigger]
|
|
21835
21837
|
* @this {HTMLSelectElement & {
|
|
21836
21838
|
* $buildTypeChoices: TypeChoiceBuilder
|
|
21837
21839
|
* }}
|
|
@@ -21848,18 +21850,19 @@ async function formatAndTypeChoices ({
|
|
|
21848
21850
|
/**
|
|
21849
21851
|
* @type {SetFormat}
|
|
21850
21852
|
*/
|
|
21851
|
-
async $setFormat (valueFormat) {
|
|
21853
|
+
async $setFormat (valueFormat, autoTrigger) {
|
|
21852
21854
|
this.value = valueFormat;
|
|
21853
|
-
await this.$buildTypeChoices();
|
|
21855
|
+
await this.$buildTypeChoices(autoTrigger);
|
|
21854
21856
|
},
|
|
21855
21857
|
|
|
21856
21858
|
/**
|
|
21857
21859
|
* @type {TypeChoiceBuilder}
|
|
21858
21860
|
*/
|
|
21859
|
-
async $buildTypeChoices () {
|
|
21861
|
+
async $buildTypeChoices (autoTrigger) {
|
|
21860
21862
|
DOM.removeChildren(typesHolder);
|
|
21861
21863
|
const {schema} = this.selectedOptions[0].dataset;
|
|
21862
21864
|
jml({'#': buildTypeChoices({
|
|
21865
|
+
autoTrigger,
|
|
21863
21866
|
topRoot: /** @type {HTMLDivElement} */ (
|
|
21864
21867
|
$e(typesHolder, 'div[data-type]')
|
|
21865
21868
|
),
|
package/package.json
CHANGED
|
@@ -119,6 +119,7 @@ export async function formatAndTypeChoices ({
|
|
|
119
119
|
* Sets the desired format and rebuilds the type choices.
|
|
120
120
|
* @callback SetFormat
|
|
121
121
|
* @param {string} valueFormat
|
|
122
|
+
* @param {boolean} [autoTrigger]
|
|
122
123
|
* @this {HTMLSelectElement & {
|
|
123
124
|
* $buildTypeChoices: TypeChoiceBuilder
|
|
124
125
|
* }}
|
|
@@ -128,6 +129,7 @@ export async function formatAndTypeChoices ({
|
|
|
128
129
|
/**
|
|
129
130
|
* Rebuilds the type choices.
|
|
130
131
|
* @callback TypeChoiceBuilder
|
|
132
|
+
* @param {boolean} [autoTrigger]
|
|
131
133
|
* @this {HTMLSelectElement & {
|
|
132
134
|
* $buildTypeChoices: TypeChoiceBuilder
|
|
133
135
|
* }}
|
|
@@ -144,18 +146,19 @@ export async function formatAndTypeChoices ({
|
|
|
144
146
|
/**
|
|
145
147
|
* @type {SetFormat}
|
|
146
148
|
*/
|
|
147
|
-
async $setFormat (valueFormat) {
|
|
149
|
+
async $setFormat (valueFormat, autoTrigger) {
|
|
148
150
|
this.value = valueFormat;
|
|
149
|
-
await this.$buildTypeChoices();
|
|
151
|
+
await this.$buildTypeChoices(autoTrigger);
|
|
150
152
|
},
|
|
151
153
|
|
|
152
154
|
/**
|
|
153
155
|
* @type {TypeChoiceBuilder}
|
|
154
156
|
*/
|
|
155
|
-
async $buildTypeChoices () {
|
|
157
|
+
async $buildTypeChoices (autoTrigger) {
|
|
156
158
|
DOM.removeChildren(typesHolder);
|
|
157
159
|
const {schema} = this.selectedOptions[0].dataset;
|
|
158
160
|
jml({'#': buildTypeChoices({
|
|
161
|
+
autoTrigger,
|
|
159
162
|
topRoot: /** @type {HTMLDivElement} */ (
|
|
160
163
|
$e(typesHolder, 'div[data-type]')
|
|
161
164
|
),
|