@azure-net/kit 1.4.35 → 2.0.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.
@@ -1,4 +1,4 @@
1
- import { FormDataUtil, ObjectUtil } from 'azure-net-tools';
1
+ import { FormDataUtil } from 'azure-net-tools';
2
2
  export class SchemaFail {
3
3
  _errors;
4
4
  constructor(_errors) {
@@ -37,7 +37,7 @@ class SchemaBuilderImpl {
37
37
  if (dataToPrepare instanceof FormData) {
38
38
  return FormDataUtil.toObject(dataToPrepare);
39
39
  }
40
- return ObjectUtil.deepClone(dataToPrepare, true);
40
+ return dataToPrepare;
41
41
  };
42
42
  const getByPath = (path, data) => {
43
43
  return path.split('.').reduce((o, k) => (o && typeof o === 'object' ? o[k] : undefined), data);
@@ -1,6 +1,6 @@
1
1
  import { EventBus } from 'azure-net-tools';
2
2
  import { createPresenter } from 'edges-svelte';
3
- export const AppEvents = createPresenter('GlobalAppEventBus', () => {
3
+ export const AppEvents = createPresenter(() => {
4
4
  const appEventBus = new EventBus({ OnAsyncHelperError: [] });
5
5
  return {
6
6
  bus: appEventBus
@@ -8,7 +8,7 @@ export const createActiveForm = (onSubmit, config) => {
8
8
  const submit = async () => {
9
9
  pending = true;
10
10
  try {
11
- const result = await onSubmit(ObjectUtil.deepClone(formData, true));
11
+ const result = await onSubmit($state.snapshot(formData));
12
12
  if (result.error?.fields) {
13
13
  formErrors = result.error.fields;
14
14
  }
@@ -25,7 +25,7 @@ export const createActiveForm = (onSubmit, config) => {
25
25
  }
26
26
  };
27
27
  const reset = (toInitial = false) => {
28
- formData = toInitial ? ObjectUtil.deepClone(initial, true) : {};
28
+ formData = toInitial ? ObjectUtil.deepClone(initial) : {};
29
29
  formErrors = {};
30
30
  };
31
31
  return {
@@ -0,0 +1 @@
1
+ export { DevTools } from 'edges-svelte/dev';
@@ -0,0 +1 @@
1
+ export { DevTools } from 'edges-svelte/dev';
@@ -1 +1 @@
1
- export { createPresenter, createPresenterFactory, createStore, createStoreFactory } from 'edges-svelte';
1
+ export { createPresenter, createPresenterFactory, createStore, createStoreFactory, batch, transaction } from 'edges-svelte';
@@ -1 +1 @@
1
- export { createPresenter, createPresenterFactory, createStore, createStoreFactory } from 'edges-svelte';
1
+ export { createPresenter, createPresenterFactory, createStore, createStoreFactory, batch, transaction } from 'edges-svelte';
@@ -0,0 +1 @@
1
+ export { edgesPlugin } from 'edges-svelte/plugin';
@@ -0,0 +1 @@
1
+ export { edgesPlugin } from 'edges-svelte/plugin';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure-net/kit",
3
- "version": "1.4.35",
3
+ "version": "2.0.0",
4
4
  "files": [
5
5
  "dist",
6
6
  "!dist/**/*.test.*",
@@ -45,6 +45,14 @@
45
45
  "types": "./dist/edges/context/index.d.ts",
46
46
  "svelte": "./dist/edges/context/index.js"
47
47
  },
48
+ "./edges/dev": {
49
+ "types": "./dist/edges/dev/index.d.ts",
50
+ "svelte": "./dist/edges/dev/index.js"
51
+ },
52
+ "./edges/plugin": {
53
+ "types": "./dist/edges/plugin/index.d.ts",
54
+ "svelte": "./dist/edges/plugin/index.js"
55
+ },
48
56
  "./tools": {
49
57
  "types": "./dist/tools/index.d.ts",
50
58
  "svelte": "./dist/tools/index.js"
@@ -101,9 +109,9 @@
101
109
  ],
102
110
  "dependencies": {
103
111
  "azure-net-tools": "^1.1.2",
104
- "edges-svelte": "^1.1.0",
105
- "edges-svelte-translations": "^0.2.0",
106
- "ky": "^1.8.1"
112
+ "edges-svelte": "^2.0.3",
113
+ "edges-svelte-translations": "^2.0.3",
114
+ "ky": "^1.11.0"
107
115
  },
108
116
  "scripts": {
109
117
  "dev": "vite dev",