@vuu-ui/vuu-layout 0.8.14-debug → 0.8.15-debug
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/cjs/index.js +94 -16
- package/cjs/index.js.map +3 -3
- package/esm/index.js +97 -19
- package/esm/index.js.map +3 -3
- package/index.css +8 -6
- package/index.css.map +2 -2
- package/package.json +7 -7
- package/types/layout-reducer/layoutTypes.d.ts +9 -0
- package/types/toolbar/useToolbar.d.ts +1 -2
package/esm/index.js
CHANGED
|
@@ -3182,7 +3182,11 @@ function getStyledComponents(container, existingComponent, newComponent, targetR
|
|
|
3182
3182
|
} = getProps(newComponent);
|
|
3183
3183
|
return [
|
|
3184
3184
|
existingComponent,
|
|
3185
|
-
React7.cloneElement(newComponent, {
|
|
3185
|
+
React7.cloneElement(newComponent, {
|
|
3186
|
+
id,
|
|
3187
|
+
version,
|
|
3188
|
+
style: { ...style, flex: "1 1 0px" }
|
|
3189
|
+
})
|
|
3186
3190
|
];
|
|
3187
3191
|
}
|
|
3188
3192
|
}
|
|
@@ -4841,7 +4845,7 @@ var useViewActionDispatcher = (id, root, viewPath, dropTargets) => {
|
|
|
4841
4845
|
};
|
|
4842
4846
|
|
|
4843
4847
|
// src/layout-view/View.tsx
|
|
4844
|
-
import { useForkRef as useForkRef3
|
|
4848
|
+
import { useForkRef as useForkRef3 } from "@salt-ds/core";
|
|
4845
4849
|
import cx8 from "classnames";
|
|
4846
4850
|
import React14, {
|
|
4847
4851
|
forwardRef as forwardRef5,
|
|
@@ -5021,7 +5025,7 @@ var View = forwardRef5(function View2(props, forwardedRef) {
|
|
|
5021
5025
|
title: titleProp,
|
|
5022
5026
|
...restProps
|
|
5023
5027
|
} = props;
|
|
5024
|
-
const id =
|
|
5028
|
+
const id = useId(idProp);
|
|
5025
5029
|
const rootRef = useRef10(null);
|
|
5026
5030
|
const mainRef = useRef10(null);
|
|
5027
5031
|
const [componentProps, _setComponentProps] = useState7();
|
|
@@ -5314,7 +5318,7 @@ var LocalLayoutPersistenceManager = class {
|
|
|
5314
5318
|
const newMetadata = {
|
|
5315
5319
|
...metadata,
|
|
5316
5320
|
id,
|
|
5317
|
-
created: formatDate(/* @__PURE__ */ new Date()
|
|
5321
|
+
created: formatDate("dd.mm.yyyy")(/* @__PURE__ */ new Date())
|
|
5318
5322
|
};
|
|
5319
5323
|
this.saveLayoutsWithMetadata(
|
|
5320
5324
|
[...existingLayouts, { id, json: layout }],
|
|
@@ -5851,6 +5855,7 @@ import React18, {
|
|
|
5851
5855
|
import { NotificationLevel, useNotifications } from "@vuu-ui/vuu-popups";
|
|
5852
5856
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
5853
5857
|
var LayoutManagementContext = React18.createContext({
|
|
5858
|
+
getApplicationSettings: () => void 0,
|
|
5854
5859
|
layoutMetadata: [],
|
|
5855
5860
|
saveLayout: () => void 0,
|
|
5856
5861
|
// The default Application JSON will be served if no LayoutManagementProvider
|
|
@@ -6319,6 +6324,54 @@ var WindowRange = class {
|
|
|
6319
6324
|
// ../vuu-utils/src/DataWindow.ts
|
|
6320
6325
|
var { KEY } = metadataKeys;
|
|
6321
6326
|
|
|
6327
|
+
// ../vuu-utils/src/date/formatter.ts
|
|
6328
|
+
var baseTimeFormatOptions = {
|
|
6329
|
+
hour: "2-digit",
|
|
6330
|
+
minute: "2-digit",
|
|
6331
|
+
second: "2-digit"
|
|
6332
|
+
};
|
|
6333
|
+
var formatConfigByTimePatterns = {
|
|
6334
|
+
"hh:mm:ss": {
|
|
6335
|
+
locale: "en-GB",
|
|
6336
|
+
options: { ...baseTimeFormatOptions, hour12: false }
|
|
6337
|
+
},
|
|
6338
|
+
"hh:mm:ss a": {
|
|
6339
|
+
locale: "en-GB",
|
|
6340
|
+
options: { ...baseTimeFormatOptions, hour12: true }
|
|
6341
|
+
}
|
|
6342
|
+
};
|
|
6343
|
+
var baseDateFormatOptions = {
|
|
6344
|
+
day: "2-digit",
|
|
6345
|
+
month: "2-digit",
|
|
6346
|
+
year: "numeric"
|
|
6347
|
+
};
|
|
6348
|
+
var formatConfigByDatePatterns = {
|
|
6349
|
+
"dd.mm.yyyy": {
|
|
6350
|
+
locale: "en-GB",
|
|
6351
|
+
options: { ...baseDateFormatOptions },
|
|
6352
|
+
postProcessor: (s) => s.replaceAll("/", ".")
|
|
6353
|
+
},
|
|
6354
|
+
"dd/mm/yyyy": { locale: "en-GB", options: { ...baseDateFormatOptions } },
|
|
6355
|
+
"dd MMM yyyy": {
|
|
6356
|
+
locale: "en-GB",
|
|
6357
|
+
options: { ...baseDateFormatOptions, month: "short" }
|
|
6358
|
+
},
|
|
6359
|
+
"dd MMMM yyyy": {
|
|
6360
|
+
locale: "en-GB",
|
|
6361
|
+
options: { ...baseDateFormatOptions, month: "long" }
|
|
6362
|
+
},
|
|
6363
|
+
"mm/dd/yyyy": { locale: "en-US", options: { ...baseDateFormatOptions } },
|
|
6364
|
+
"MMM dd, yyyy": {
|
|
6365
|
+
locale: "en-US",
|
|
6366
|
+
options: { ...baseDateFormatOptions, month: "short" }
|
|
6367
|
+
},
|
|
6368
|
+
"MMMM dd, yyyy": {
|
|
6369
|
+
locale: "en-US",
|
|
6370
|
+
options: { ...baseDateFormatOptions, month: "long" }
|
|
6371
|
+
}
|
|
6372
|
+
};
|
|
6373
|
+
var formatConfigByDateTimePatterns = { ...formatConfigByDatePatterns, ...formatConfigByTimePatterns };
|
|
6374
|
+
|
|
6322
6375
|
// ../vuu-utils/src/logging-utils.ts
|
|
6323
6376
|
var logLevels = ["error", "warn", "info", "debug"];
|
|
6324
6377
|
var isValidLogLevel = (value) => typeof value === "string" && logLevels.includes(value);
|
|
@@ -12929,7 +12982,7 @@ var ArrayDataSource = class extends EventEmitter2 {
|
|
|
12929
12982
|
}
|
|
12930
12983
|
set config(config) {
|
|
12931
12984
|
var _a;
|
|
12932
|
-
if (
|
|
12985
|
+
if (this.applyConfig(config)) {
|
|
12933
12986
|
if (config) {
|
|
12934
12987
|
const originalConfig = __privateGet(this, _config);
|
|
12935
12988
|
const newConfig = ((_a = config == null ? void 0 : config.filter) == null ? void 0 : _a.filter) && (config == null ? void 0 : config.filter.filterStruct) === void 0 ? {
|
|
@@ -12997,6 +13050,22 @@ var ArrayDataSource = class extends EventEmitter2 {
|
|
|
12997
13050
|
this.emit("config", __privateGet(this, _config));
|
|
12998
13051
|
}
|
|
12999
13052
|
}
|
|
13053
|
+
applyConfig(config) {
|
|
13054
|
+
var _a;
|
|
13055
|
+
if (configChanged(__privateGet(this, _config), config)) {
|
|
13056
|
+
if (config) {
|
|
13057
|
+
const newConfig = ((_a = config == null ? void 0 : config.filter) == null ? void 0 : _a.filter) && (config == null ? void 0 : config.filter.filterStruct) === void 0 ? {
|
|
13058
|
+
...config,
|
|
13059
|
+
filter: {
|
|
13060
|
+
filter: config.filter.filter,
|
|
13061
|
+
filterStruct: parseFilter(config.filter.filter)
|
|
13062
|
+
}
|
|
13063
|
+
} : config;
|
|
13064
|
+
__privateSet(this, _config, withConfigDefaults(newConfig));
|
|
13065
|
+
return true;
|
|
13066
|
+
}
|
|
13067
|
+
}
|
|
13068
|
+
}
|
|
13000
13069
|
get selectedRowsCount() {
|
|
13001
13070
|
return __privateGet(this, _selectedRowsCount);
|
|
13002
13071
|
}
|
|
@@ -13393,6 +13462,9 @@ var JsonDataSource = class extends EventEmitter3 {
|
|
|
13393
13462
|
get config() {
|
|
13394
13463
|
return __privateGet(this, _config2);
|
|
13395
13464
|
}
|
|
13465
|
+
applyConfig() {
|
|
13466
|
+
return true;
|
|
13467
|
+
}
|
|
13396
13468
|
get selectedRowsCount() {
|
|
13397
13469
|
return __privateGet(this, _selectedRowsCount2);
|
|
13398
13470
|
}
|
|
@@ -13870,7 +13942,22 @@ var RemoteDataSource = class extends EventEmitter4 {
|
|
|
13870
13942
|
return __privateGet(this, _config3);
|
|
13871
13943
|
}
|
|
13872
13944
|
set config(config) {
|
|
13873
|
-
var _a
|
|
13945
|
+
var _a;
|
|
13946
|
+
if (this.applyConfig(config)) {
|
|
13947
|
+
if (__privateGet(this, _config3) && this.viewport && this.server) {
|
|
13948
|
+
if (config) {
|
|
13949
|
+
(_a = this.server) == null ? void 0 : _a.send({
|
|
13950
|
+
viewport: this.viewport,
|
|
13951
|
+
type: "config",
|
|
13952
|
+
config: __privateGet(this, _config3)
|
|
13953
|
+
});
|
|
13954
|
+
}
|
|
13955
|
+
}
|
|
13956
|
+
this.emit("config", __privateGet(this, _config3));
|
|
13957
|
+
}
|
|
13958
|
+
}
|
|
13959
|
+
applyConfig(config) {
|
|
13960
|
+
var _a;
|
|
13874
13961
|
if (configChanged(__privateGet(this, _config3), config)) {
|
|
13875
13962
|
if (config) {
|
|
13876
13963
|
const newConfig = ((_a = config == null ? void 0 : config.filter) == null ? void 0 : _a.filter) && (config == null ? void 0 : config.filter.filterStruct) === void 0 ? {
|
|
@@ -13881,16 +13968,7 @@ var RemoteDataSource = class extends EventEmitter4 {
|
|
|
13881
13968
|
}
|
|
13882
13969
|
} : config;
|
|
13883
13970
|
__privateSet(this, _config3, withConfigDefaults(newConfig));
|
|
13884
|
-
|
|
13885
|
-
if (config) {
|
|
13886
|
-
(_b = this.server) == null ? void 0 : _b.send({
|
|
13887
|
-
viewport: this.viewport,
|
|
13888
|
-
type: "config",
|
|
13889
|
-
config: __privateGet(this, _config3)
|
|
13890
|
-
});
|
|
13891
|
-
}
|
|
13892
|
-
}
|
|
13893
|
-
this.emit("config", __privateGet(this, _config3));
|
|
13971
|
+
return true;
|
|
13894
13972
|
}
|
|
13895
13973
|
}
|
|
13896
13974
|
}
|
|
@@ -15215,7 +15293,7 @@ import React21, {
|
|
|
15215
15293
|
useRef as useRef20
|
|
15216
15294
|
} from "react";
|
|
15217
15295
|
import { jsx as jsx44, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
15218
|
-
var classBase12 = "
|
|
15296
|
+
var classBase12 = "vuuTabs";
|
|
15219
15297
|
var getDefaultTabIcon = () => void 0;
|
|
15220
15298
|
var getChildElements = (children) => {
|
|
15221
15299
|
const elements = [];
|
|
@@ -15345,7 +15423,7 @@ var Stack = forwardRef8(function Stack3({
|
|
|
15345
15423
|
Stack.displayName = "Stack";
|
|
15346
15424
|
|
|
15347
15425
|
// src/stack/StackLayout.tsx
|
|
15348
|
-
import { useIdMemo as
|
|
15426
|
+
import { useIdMemo as useId2 } from "@salt-ds/core";
|
|
15349
15427
|
import React22, { useCallback as useCallback30, useRef as useRef21 } from "react";
|
|
15350
15428
|
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
15351
15429
|
var defaultCreateNewChild = () => /* @__PURE__ */ jsx45(
|
|
@@ -15368,7 +15446,7 @@ var StackLayout = (props) => {
|
|
|
15368
15446
|
...restProps
|
|
15369
15447
|
} = props;
|
|
15370
15448
|
const { children } = props;
|
|
15371
|
-
const id =
|
|
15449
|
+
const id = useId2(idProp);
|
|
15372
15450
|
const [dispatchViewAction] = useViewActionDispatcher(id, ref, path);
|
|
15373
15451
|
const createNewChildFromContext = useLayoutCreateNewChild();
|
|
15374
15452
|
const createNewChild = (_a = createNewChildProp != null ? createNewChildProp : createNewChildFromContext) != null ? _a : defaultCreateNewChild;
|