eco-vue-js 0.23.0 → 0.23.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.
@@ -1 +1 @@
1
- {"version":3,"file":"useUniformModel.d.ts","sourceRoot":"","sources":["../../../../../src/components/Uniform/use/useUniformModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,GAAG,EAAyD,MAAM,KAAK,CAAA;AAmDpF,eAAO,MAAM,eAAe,GAAI,WAAW,EAAE,KAAK,SAAS,MAAM,WAAW,CAAC,WAAW,CAAC,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAC7H,aAAa,GAAG,CAAC,WAAW,CAAC,EAC7B,iBAAiB,GAAG,CAAC,WAAW,CAAC,EACjC,OAAO,GAAG,CAAC,KAAK,GAAG,SAAS,CAAC,EAC7B,YAAY,eAAe,CAAC,UAAU,EAAE,WAAW,CAAC,GAAG,SAAS,EAChE,aAAa,GAAG,CAAC,WAAW,GAAG,SAAS,CAAC,GAAG,SAAS,EACrD,QAAQ,CAAC,CAAC,KAAK,EAAE,UAAU,KAAK,WAAW,CAAC,GAAG,SAAS,EACxD,cAAc,CAAC,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,KAAK,YAAY,GAAG,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC,GAAG,SAAS,CAAC,GAAG,SAAS,EACrI,aAAa,MAAM,OAAO,EAC1B,gBAAgB,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAAK,IAAI,EACzE,QAAQ,MAAM,IAAI,EAClB,eAAe,MAAM,IAAI,EACzB,kBAAkB,CAAC,CAAC,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAC,GAAG,SAAS;;;;;;wBAmEpC,UAAU;wBAsBV,UAAU,GAAG,SAAS,WAAW,OAAO,CAAC,WAAW,CAAC;uBA6CtD,WAAW,SAAS,OAAO,EAAE,G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AW,KAAK,IAAI,CAAC,GAAG,SAAS;;;;;;wBA2EpC,UAAU;wBAsBV,UAAU,GAAG,SAAS,WAAW,OAAO,CAAC,WAAW,CAAC;uBA6CtD,WAAW,SAAS,OAAO,EAAE,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,KAAK,KAAG,IAAI;yBAMhE,WAAW,SAAS,OAAO,EAAE,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,KAAK,KAAG,IAAI;iCAQ1D,WAAW,GAAG,SAAS,KAAG,OAAO,CAAC,IAAI,CAAC;sCAIlC,WAAW,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE;CAsClF,CAAA"}
@@ -42,13 +42,16 @@ var useUniformModel = (parentModel, parentModelInit, field, useQueryFn, queryPar
42
42
  const reset = ref(0);
43
43
  if (data && modelValueInitRef) {
44
44
  provide(wUniformReset, reset);
45
+ let resetPending = false;
45
46
  watch([
46
47
  innerModel,
47
48
  () => queryParams?.value,
48
49
  () => parentReset?.value
49
50
  ], ([value, params, parentResetValue], [, paramsOld, parentResetOld]) => {
51
+ const isReset = resetPending || !isSame(params, paramsOld) || parentResetValue !== parentResetOld;
52
+ resetPending = isReset && value === void 0 && (query?.isEnabled.value ?? false);
53
+ if (resetPending) return;
50
54
  const next = (initFn ?? copyItem)(value ?? {});
51
- const isReset = !isSame(params, paramsOld) || parentResetValue !== parentResetOld;
52
55
  data.value = isReset ? next : keepChanges(next, data.value, modelValueInitRef.value);
53
56
  modelValueInitRef.value = (initFn ?? copyItem)(value ?? {});
54
57
  if (isReset) reset.value++;
@@ -222,7 +222,7 @@ const confirmDisable = (value: boolean): ConfirmProps | undefined => value ? und
222
222
  </WUniform>
223
223
  ```
224
224
 
225
- When the loaded value changes — another view saved the item and updated the cache, or an auto-save did — the form takes it and keeps the changes not saved yet. When `queryParams` change, the form loads another item and drops its changes, and so do the forms inside it that keep their own copy of the model.
225
+ When the loaded value changes — another view saved the item and updated the cache, or an auto-save did — the form takes it and keeps the changes not saved yet. When `queryParams` change, the form loads another item and drops its changes, and so do the forms inside it that keep their own copy of the model. Until that item loads, the form keeps its current model, so a create whose result carries the new id stays filled while the saved item loads.
226
226
 
227
227
  ## Nested objects
228
228
 
package/docs/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  # eco-vue-js
2
2
 
3
- > Vue 3 UI kit with Tailwind v4 — components, utilities, icons and recipes. These are the docs of version 0.23.0, the one installed next to them. Start with Getting started and Conventions; each component page lists its props, events and slots with examples.
3
+ > Vue 3 UI kit with Tailwind v4 — components, utilities, icons and recipes. These are the docs of version 0.23.1, the one installed next to them. Start with Getting started and Conventions; each component page lists its props, events and slots with examples.
4
4
 
5
5
  Release notes, for what changed between versions: https://github.com/rsmple/eco-vue-js/releases. The docs site, with live demos: https://rsmple.github.io/eco-vue-js/
6
6
 
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/rsmple/eco-vue-js.git"
6
6
  },
7
- "version": "0.23.0",
7
+ "version": "0.23.1",
8
8
  "homepage": "https://rsmple.github.io/eco-vue-js/",
9
9
  "dependencies": {
10
10
  "@stylistic/eslint-plugin": "5.10.0",