@wise/dynamic-flow-client 5.26.0 → 5.28.0-experimental-a2135d6
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/build/main.js +15 -3
- package/build/main.mjs +15 -3
- package/build/tsconfig.types.tsbuildinfo +1 -1
- package/build/types/domain/components/RootDomainComponent.d.ts.map +1 -1
- package/build/types/domain/components/UpdatableComponent.d.ts +1 -0
- package/build/types/domain/components/UpdatableComponent.d.ts.map +1 -1
- package/build/types/domain/mappers/schema/dateSchemaToComponent.d.ts.map +1 -1
- package/build/types/domain/types.d.ts +3 -0
- package/build/types/domain/types.d.ts.map +1 -1
- package/package.json +2 -2
package/build/main.js
CHANGED
|
@@ -1174,7 +1174,9 @@ var createRootDomainComponent = (onComponentUpdate, scrollToTop, backConfig, req
|
|
|
1174
1174
|
});
|
|
1175
1175
|
if (previousStep != null) {
|
|
1176
1176
|
(_a = component.getStep()) == null ? void 0 : _a.start();
|
|
1177
|
-
|
|
1177
|
+
if (stepComponent.stackBehavior !== "replace-current" || shouldScrollOnStepUpdate(stepComponent, previousStep)) {
|
|
1178
|
+
scrollToTop == null ? void 0 : scrollToTop("instant");
|
|
1179
|
+
}
|
|
1178
1180
|
}
|
|
1179
1181
|
},
|
|
1180
1182
|
clearStack() {
|
|
@@ -3103,14 +3105,24 @@ var createUpdatableComponent = (props, query, onComponentUpdate, subscribe, unsu
|
|
|
3103
3105
|
abortController.abort();
|
|
3104
3106
|
abortController = new AbortController();
|
|
3105
3107
|
const { signal } = abortController;
|
|
3108
|
+
updateComponent(component, (draft) => {
|
|
3109
|
+
draft.isLoading = true;
|
|
3110
|
+
});
|
|
3106
3111
|
query({ data, signal }).then((state) => {
|
|
3107
3112
|
component.update(state);
|
|
3108
3113
|
}).catch(() => {
|
|
3114
|
+
}).finally(() => {
|
|
3115
|
+
if (!signal.aborted) {
|
|
3116
|
+
updateComponent(component, (draft) => {
|
|
3117
|
+
draft.isLoading = false;
|
|
3118
|
+
});
|
|
3119
|
+
}
|
|
3109
3120
|
});
|
|
3110
3121
|
};
|
|
3111
3122
|
const component = __spreadProps(__spreadValues({}, props), {
|
|
3112
3123
|
type: "updatable",
|
|
3113
3124
|
kind: "layout",
|
|
3125
|
+
isLoading: false,
|
|
3114
3126
|
getChildren() {
|
|
3115
3127
|
return component.state.components;
|
|
3116
3128
|
},
|
|
@@ -6181,7 +6193,7 @@ var normaliseDateValue = (value) => {
|
|
|
6181
6193
|
if (!isString(value)) {
|
|
6182
6194
|
return null;
|
|
6183
6195
|
}
|
|
6184
|
-
if (/^\d{4}
|
|
6196
|
+
if (/^\d{4}(?:-\d{2})?$/.test(value)) {
|
|
6185
6197
|
return value;
|
|
6186
6198
|
}
|
|
6187
6199
|
try {
|
|
@@ -9591,7 +9603,7 @@ var updatableComponentToProps = (component, rendererMapperProps) => {
|
|
|
9591
9603
|
const childrenProps = component.state.components.map(
|
|
9592
9604
|
(c) => componentToRendererProps(c, rendererMapperProps)
|
|
9593
9605
|
);
|
|
9594
|
-
return __spreadProps(__spreadValues(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "control", "margin", "tags")), rendererMapperProps), {
|
|
9606
|
+
return __spreadProps(__spreadValues(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "control", "isLoading", "margin", "tags")), rendererMapperProps), {
|
|
9595
9607
|
children: childrenProps.map(rendererMapperProps.render),
|
|
9596
9608
|
childrenProps
|
|
9597
9609
|
});
|
package/build/main.mjs
CHANGED
|
@@ -1143,7 +1143,9 @@ var createRootDomainComponent = (onComponentUpdate, scrollToTop, backConfig, req
|
|
|
1143
1143
|
});
|
|
1144
1144
|
if (previousStep != null) {
|
|
1145
1145
|
(_a = component.getStep()) == null ? void 0 : _a.start();
|
|
1146
|
-
|
|
1146
|
+
if (stepComponent.stackBehavior !== "replace-current" || shouldScrollOnStepUpdate(stepComponent, previousStep)) {
|
|
1147
|
+
scrollToTop == null ? void 0 : scrollToTop("instant");
|
|
1148
|
+
}
|
|
1147
1149
|
}
|
|
1148
1150
|
},
|
|
1149
1151
|
clearStack() {
|
|
@@ -3072,14 +3074,24 @@ var createUpdatableComponent = (props, query, onComponentUpdate, subscribe, unsu
|
|
|
3072
3074
|
abortController.abort();
|
|
3073
3075
|
abortController = new AbortController();
|
|
3074
3076
|
const { signal } = abortController;
|
|
3077
|
+
updateComponent(component, (draft) => {
|
|
3078
|
+
draft.isLoading = true;
|
|
3079
|
+
});
|
|
3075
3080
|
query({ data, signal }).then((state) => {
|
|
3076
3081
|
component.update(state);
|
|
3077
3082
|
}).catch(() => {
|
|
3083
|
+
}).finally(() => {
|
|
3084
|
+
if (!signal.aborted) {
|
|
3085
|
+
updateComponent(component, (draft) => {
|
|
3086
|
+
draft.isLoading = false;
|
|
3087
|
+
});
|
|
3088
|
+
}
|
|
3078
3089
|
});
|
|
3079
3090
|
};
|
|
3080
3091
|
const component = __spreadProps(__spreadValues({}, props), {
|
|
3081
3092
|
type: "updatable",
|
|
3082
3093
|
kind: "layout",
|
|
3094
|
+
isLoading: false,
|
|
3083
3095
|
getChildren() {
|
|
3084
3096
|
return component.state.components;
|
|
3085
3097
|
},
|
|
@@ -6152,7 +6164,7 @@ var normaliseDateValue = (value) => {
|
|
|
6152
6164
|
if (!isString(value)) {
|
|
6153
6165
|
return null;
|
|
6154
6166
|
}
|
|
6155
|
-
if (/^\d{4}
|
|
6167
|
+
if (/^\d{4}(?:-\d{2})?$/.test(value)) {
|
|
6156
6168
|
return value;
|
|
6157
6169
|
}
|
|
6158
6170
|
try {
|
|
@@ -9562,7 +9574,7 @@ var updatableComponentToProps = (component, rendererMapperProps) => {
|
|
|
9562
9574
|
const childrenProps = component.state.components.map(
|
|
9563
9575
|
(c) => componentToRendererProps(c, rendererMapperProps)
|
|
9564
9576
|
);
|
|
9565
|
-
return __spreadProps(__spreadValues(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "control", "margin", "tags")), rendererMapperProps), {
|
|
9577
|
+
return __spreadProps(__spreadValues(__spreadValues({}, pick(component, "uid", "analyticsId", "type", "control", "isLoading", "margin", "tags")), rendererMapperProps), {
|
|
9566
9578
|
children: childrenProps.map(rendererMapperProps.render),
|
|
9567
9579
|
childrenProps
|
|
9568
9580
|
});
|