@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 CHANGED
@@ -3319,7 +3319,11 @@ function getStyledComponents(container, existingComponent, newComponent, targetR
3319
3319
  } = getProps(newComponent);
3320
3320
  return [
3321
3321
  existingComponent,
3322
- import_react13.default.cloneElement(newComponent, { id, version, style })
3322
+ import_react13.default.cloneElement(newComponent, {
3323
+ id,
3324
+ version,
3325
+ style: { ...style, flex: "1 1 0px" }
3326
+ })
3323
3327
  ];
3324
3328
  }
3325
3329
  }
@@ -5139,7 +5143,7 @@ var View = (0, import_react32.forwardRef)(function View2(props, forwardedRef) {
5139
5143
  title: titleProp,
5140
5144
  ...restProps
5141
5145
  } = props;
5142
- const id = (0, import_core5.useIdMemo)(idProp);
5146
+ const id = useId(idProp);
5143
5147
  const rootRef = (0, import_react32.useRef)(null);
5144
5148
  const mainRef = (0, import_react32.useRef)(null);
5145
5149
  const [componentProps, _setComponentProps] = (0, import_react32.useState)();
@@ -5432,7 +5436,7 @@ var LocalLayoutPersistenceManager = class {
5432
5436
  const newMetadata = {
5433
5437
  ...metadata,
5434
5438
  id,
5435
- created: (0, import_vuu_utils9.formatDate)(/* @__PURE__ */ new Date(), "dd.mm.yyyy")
5439
+ created: (0, import_vuu_utils9.formatDate)("dd.mm.yyyy")(/* @__PURE__ */ new Date())
5436
5440
  };
5437
5441
  this.saveLayoutsWithMetadata(
5438
5442
  [...existingLayouts, { id, json: layout }],
@@ -5958,6 +5962,7 @@ var import_react42 = __toESM(require("react"));
5958
5962
  var import_vuu_popups2 = require("@vuu-ui/vuu-popups");
5959
5963
  var import_jsx_runtime26 = require("react/jsx-runtime");
5960
5964
  var LayoutManagementContext = import_react42.default.createContext({
5965
+ getApplicationSettings: () => void 0,
5961
5966
  layoutMetadata: [],
5962
5967
  saveLayout: () => void 0,
5963
5968
  // The default Application JSON will be served if no LayoutManagementProvider
@@ -6411,6 +6416,54 @@ var WindowRange = class {
6411
6416
  // ../vuu-utils/src/DataWindow.ts
6412
6417
  var { KEY } = metadataKeys;
6413
6418
 
6419
+ // ../vuu-utils/src/date/formatter.ts
6420
+ var baseTimeFormatOptions = {
6421
+ hour: "2-digit",
6422
+ minute: "2-digit",
6423
+ second: "2-digit"
6424
+ };
6425
+ var formatConfigByTimePatterns = {
6426
+ "hh:mm:ss": {
6427
+ locale: "en-GB",
6428
+ options: { ...baseTimeFormatOptions, hour12: false }
6429
+ },
6430
+ "hh:mm:ss a": {
6431
+ locale: "en-GB",
6432
+ options: { ...baseTimeFormatOptions, hour12: true }
6433
+ }
6434
+ };
6435
+ var baseDateFormatOptions = {
6436
+ day: "2-digit",
6437
+ month: "2-digit",
6438
+ year: "numeric"
6439
+ };
6440
+ var formatConfigByDatePatterns = {
6441
+ "dd.mm.yyyy": {
6442
+ locale: "en-GB",
6443
+ options: { ...baseDateFormatOptions },
6444
+ postProcessor: (s) => s.replaceAll("/", ".")
6445
+ },
6446
+ "dd/mm/yyyy": { locale: "en-GB", options: { ...baseDateFormatOptions } },
6447
+ "dd MMM yyyy": {
6448
+ locale: "en-GB",
6449
+ options: { ...baseDateFormatOptions, month: "short" }
6450
+ },
6451
+ "dd MMMM yyyy": {
6452
+ locale: "en-GB",
6453
+ options: { ...baseDateFormatOptions, month: "long" }
6454
+ },
6455
+ "mm/dd/yyyy": { locale: "en-US", options: { ...baseDateFormatOptions } },
6456
+ "MMM dd, yyyy": {
6457
+ locale: "en-US",
6458
+ options: { ...baseDateFormatOptions, month: "short" }
6459
+ },
6460
+ "MMMM dd, yyyy": {
6461
+ locale: "en-US",
6462
+ options: { ...baseDateFormatOptions, month: "long" }
6463
+ }
6464
+ };
6465
+ var formatConfigByDateTimePatterns = { ...formatConfigByDatePatterns, ...formatConfigByTimePatterns };
6466
+
6414
6467
  // ../vuu-utils/src/logging-utils.ts
6415
6468
  var logLevels = ["error", "warn", "info", "debug"];
6416
6469
  var isValidLogLevel = (value) => typeof value === "string" && logLevels.includes(value);
@@ -13002,7 +13055,7 @@ var ArrayDataSource = class extends import_vuu_utils16.EventEmitter {
13002
13055
  }
13003
13056
  set config(config) {
13004
13057
  var _a;
13005
- if (configChanged(__privateGet(this, _config), config)) {
13058
+ if (this.applyConfig(config)) {
13006
13059
  if (config) {
13007
13060
  const originalConfig = __privateGet(this, _config);
13008
13061
  const newConfig = ((_a = config == null ? void 0 : config.filter) == null ? void 0 : _a.filter) && (config == null ? void 0 : config.filter.filterStruct) === void 0 ? {
@@ -13070,6 +13123,22 @@ var ArrayDataSource = class extends import_vuu_utils16.EventEmitter {
13070
13123
  this.emit("config", __privateGet(this, _config));
13071
13124
  }
13072
13125
  }
13126
+ applyConfig(config) {
13127
+ var _a;
13128
+ if (configChanged(__privateGet(this, _config), config)) {
13129
+ if (config) {
13130
+ const newConfig = ((_a = config == null ? void 0 : config.filter) == null ? void 0 : _a.filter) && (config == null ? void 0 : config.filter.filterStruct) === void 0 ? {
13131
+ ...config,
13132
+ filter: {
13133
+ filter: config.filter.filter,
13134
+ filterStruct: parseFilter(config.filter.filter)
13135
+ }
13136
+ } : config;
13137
+ __privateSet(this, _config, withConfigDefaults(newConfig));
13138
+ return true;
13139
+ }
13140
+ }
13141
+ }
13073
13142
  get selectedRowsCount() {
13074
13143
  return __privateGet(this, _selectedRowsCount);
13075
13144
  }
@@ -13459,6 +13528,9 @@ var JsonDataSource = class extends import_vuu_utils17.EventEmitter {
13459
13528
  get config() {
13460
13529
  return __privateGet(this, _config2);
13461
13530
  }
13531
+ applyConfig() {
13532
+ return true;
13533
+ }
13462
13534
  get selectedRowsCount() {
13463
13535
  return __privateGet(this, _selectedRowsCount2);
13464
13536
  }
@@ -13928,7 +14000,22 @@ var RemoteDataSource = class extends import_vuu_utils18.EventEmitter {
13928
14000
  return __privateGet(this, _config3);
13929
14001
  }
13930
14002
  set config(config) {
13931
- var _a, _b;
14003
+ var _a;
14004
+ if (this.applyConfig(config)) {
14005
+ if (__privateGet(this, _config3) && this.viewport && this.server) {
14006
+ if (config) {
14007
+ (_a = this.server) == null ? void 0 : _a.send({
14008
+ viewport: this.viewport,
14009
+ type: "config",
14010
+ config: __privateGet(this, _config3)
14011
+ });
14012
+ }
14013
+ }
14014
+ this.emit("config", __privateGet(this, _config3));
14015
+ }
14016
+ }
14017
+ applyConfig(config) {
14018
+ var _a;
13932
14019
  if (configChanged(__privateGet(this, _config3), config)) {
13933
14020
  if (config) {
13934
14021
  const newConfig = ((_a = config == null ? void 0 : config.filter) == null ? void 0 : _a.filter) && (config == null ? void 0 : config.filter.filterStruct) === void 0 ? {
@@ -13939,16 +14026,7 @@ var RemoteDataSource = class extends import_vuu_utils18.EventEmitter {
13939
14026
  }
13940
14027
  } : config;
13941
14028
  __privateSet(this, _config3, withConfigDefaults(newConfig));
13942
- if (__privateGet(this, _config3) && this.viewport && this.server) {
13943
- if (config) {
13944
- (_b = this.server) == null ? void 0 : _b.send({
13945
- viewport: this.viewport,
13946
- type: "config",
13947
- config: __privateGet(this, _config3)
13948
- });
13949
- }
13950
- }
13951
- this.emit("config", __privateGet(this, _config3));
14029
+ return true;
13952
14030
  }
13953
14031
  }
13954
14032
  }
@@ -15247,7 +15325,7 @@ var import_vuu_ui_controls8 = require("@vuu-ui/vuu-ui-controls");
15247
15325
  var import_classnames25 = __toESM(require("classnames"));
15248
15326
  var import_react60 = __toESM(require("react"));
15249
15327
  var import_jsx_runtime44 = require("react/jsx-runtime");
15250
- var classBase12 = "Tabs";
15328
+ var classBase12 = "vuuTabs";
15251
15329
  var getDefaultTabIcon = () => void 0;
15252
15330
  var getChildElements = (children) => {
15253
15331
  const elements = [];