@docsvision/management-console 6.2.0-beta.25 → 6.2.0-beta.26

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/index.d.ts CHANGED
@@ -2176,12 +2176,16 @@ declare interface IServiceDescription {
2176
2176
  serviceId: string;
2177
2177
  serviceName: string;
2178
2178
  configurationLayoutId: string;
2179
+ serverName: string;
2180
+ serviceUrl: string;
2179
2181
  }
2180
2182
 
2181
2183
  declare interface IServiceDescription_2 {
2182
2184
  serviceId: string;
2183
2185
  serviceName: string;
2184
2186
  configurationLayoutId: string;
2187
+ serverName: string;
2188
+ serviceUrl: string;
2185
2189
  }
2186
2190
 
2187
2191
  declare interface IServiceInfo {
@@ -2578,7 +2582,7 @@ export declare interface IWidgetPeriodSelectorProps extends HtmlProps.div {
2578
2582
  selectedValue: string;
2579
2583
  options: IPeriodValue[];
2580
2584
  onChange: (newValue: any) => void;
2581
- services: $Resources_3 & $LocalStorage_2;
2585
+ services: $Resources_3 & $ApplicationSettings_2;
2582
2586
  isLoading?: boolean;
2583
2587
  onDatesChange?: (dates: any) => void;
2584
2588
  datesValue?: string[];
package/index.js CHANGED
@@ -38637,6 +38637,7 @@ const DEFAULT_PAGE_SIZE = 50;
38637
38637
  function PageTable(props) {
38638
38638
  const { services, extraPlugins, data, onRowClick, disabledFeatures } = props;
38639
38639
  const plugins2 = [...getTablePlugins(), ...extraPlugins || []];
38640
+ const tableDisabledFeatures = Array.from(/* @__PURE__ */ new Set([...disabledFeatures || [], VirtualizationFeature]));
38640
38641
  return /* @__PURE__ */ jsx(
38641
38642
  TableComposition,
38642
38643
  {
@@ -38650,7 +38651,7 @@ function PageTable(props) {
38650
38651
  }
38651
38652
  },
38652
38653
  plugins: plugins2,
38653
- disabledFeatures,
38654
+ disabledFeatures: tableDisabledFeatures,
38654
38655
  fixateOnMount: false
38655
38656
  }
38656
38657
  );
@@ -52545,112 +52546,6 @@ function DateRangePicker(props) {
52545
52546
  return React__default.createElement(view.toolbar, __assign$2({}, props2, { locale: locale2, rangeDate: selectedRangeDate, selectableStartDate, setOpenViewYear, selectCurrentDate, includeKeyboard, keyboardOptions, setDateInvalidity, selectInputDate, startInputDate, services }));
52546
52547
  } }) });
52547
52548
  }
52548
- const dateFormatData = {
52549
- dateFormat: "DD.MM.YYYY"
52550
- };
52551
- const INPUT_FORMAT = "DD.MM.YYYY";
52552
- function DateRangeContainer(props) {
52553
- const { value, onChange, locale: locale2, onAccept, collapsedCalendar, services } = props;
52554
- const [datesValues, setDates] = useState([]);
52555
- const { resources } = services;
52556
- const acceptButtonRef = React__default.useRef(null);
52557
- const setDateInvalidity = (error) => {
52558
- acceptButtonRef.current.disabled = error;
52559
- };
52560
- const onChangeDates = (rangeDate) => {
52561
- const dates = [];
52562
- const currentMoment = hooks(rangeDate.start);
52563
- while (currentMoment.isSameOrBefore(rangeDate.end)) {
52564
- dates.push(hooks(currentMoment));
52565
- currentMoment.add(1, "days");
52566
- }
52567
- onChange(dates);
52568
- setDates(dates);
52569
- setDateInvalidity(false);
52570
- };
52571
- const formatValue = (value2) => {
52572
- const dates = value2?.map((x2) => hooks(x2, dateFormatData.dateFormat));
52573
- let start2;
52574
- let end2;
52575
- for (let i2 = 0; i2 < dates.length; i2++) {
52576
- if (!start2 || dates[i2].isBefore(start2)) {
52577
- start2 = dates[i2];
52578
- }
52579
- if (!end2 || dates[i2].isAfter(end2)) {
52580
- end2 = dates[i2];
52581
- }
52582
- }
52583
- return { start: start2, end: end2 };
52584
- };
52585
- const getInputMask = (date) => {
52586
- return date.replace(new RegExp(/[a-zA-Z]/, "g"), (x2) => x2 === "a" ? "aa" : "9");
52587
- };
52588
- const handleCancel = (e2) => {
52589
- e2.stopPropagation();
52590
- collapsedCalendar();
52591
- };
52592
- const handleAccept = (e2) => {
52593
- e2.stopPropagation();
52594
- let dates = datesValues;
52595
- if (datesValues?.length === 0 && value) {
52596
- dates = value?.map((x2) => hooks(x2, dateFormatData.dateFormat));
52597
- }
52598
- onAccept(dates);
52599
- collapsedCalendar();
52600
- };
52601
- const handleKeyDown2 = (e2) => {
52602
- if (e2.key === "Enter") {
52603
- e2.target.blur();
52604
- }
52605
- };
52606
- const dateRangeProps = {
52607
- value: formatValue(value),
52608
- onChange: onChangeDates,
52609
- locale: locale2,
52610
- services,
52611
- setDateInvalidity,
52612
- options: { variant: "static" },
52613
- includeKeyboard: true,
52614
- keyboardOptions: {
52615
- variant: "inline",
52616
- inputVariant: "outlined",
52617
- format: INPUT_FORMAT,
52618
- InputProps: {
52619
- inputComponent: ReactInputMask,
52620
- inputProps: {
52621
- mask: getInputMask(INPUT_FORMAT),
52622
- onKeyDown: handleKeyDown2
52623
- }
52624
- },
52625
- helperText: "",
52626
- InputAdornmentProps: { position: "start" }
52627
- }
52628
- };
52629
- return /* @__PURE__ */ jsxs("div", { className: "date-range__container", "data-testid": "date-range__container", children: [
52630
- /* @__PURE__ */ jsx(DateRangePicker, { ...dateRangeProps }),
52631
- /* @__PURE__ */ jsxs("div", { className: "date-range__buttons-panel", children: [
52632
- /* @__PURE__ */ jsx(
52633
- "button",
52634
- {
52635
- "data-testid": "date-range__button-cancel",
52636
- className: "date-range__button-cancel",
52637
- onClick: (e2) => handleCancel(e2),
52638
- children: resources.DateRangePicker__Cancel
52639
- }
52640
- ),
52641
- /* @__PURE__ */ jsx(
52642
- "button",
52643
- {
52644
- ref: acceptButtonRef,
52645
- "data-testid": "date-range__button-ok",
52646
- className: classNames("date-range__button-ok"),
52647
- onClick: (e2) => handleAccept(e2),
52648
- children: resources.DateRangePicker__Accept
52649
- }
52650
- )
52651
- ] })
52652
- ] });
52653
- }
52654
52549
  function commonjsRequire(path) {
52655
52550
  throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
52656
52551
  }
@@ -56785,6 +56680,117 @@ function requireRu() {
56785
56680
  return ru$1.exports;
56786
56681
  }
56787
56682
  requireRu();
56683
+ const dateFormatData = {
56684
+ dateFormat: "DD.MM.YYYY"
56685
+ };
56686
+ const INPUT_FORMAT = "DD.MM.YYYY";
56687
+ function DateRangeContainer(props) {
56688
+ const { value, onChange, locale: locale2, onAccept, collapsedCalendar, services } = props;
56689
+ const [datesValues, setDates] = useState([]);
56690
+ const { resources } = services;
56691
+ const acceptButtonRef = React__default.useRef(null);
56692
+ useEffect(() => {
56693
+ if (!locale2) return;
56694
+ const localeCode = locale2.split("-")[0].toLowerCase();
56695
+ hooks.locale(localeCode);
56696
+ }, [locale2]);
56697
+ const setDateInvalidity = (error) => {
56698
+ acceptButtonRef.current.disabled = error;
56699
+ };
56700
+ const onChangeDates = (rangeDate) => {
56701
+ const dates = [];
56702
+ const currentMoment = hooks(rangeDate.start);
56703
+ while (currentMoment.isSameOrBefore(rangeDate.end)) {
56704
+ dates.push(hooks(currentMoment));
56705
+ currentMoment.add(1, "days");
56706
+ }
56707
+ onChange(dates);
56708
+ setDates(dates);
56709
+ setDateInvalidity(false);
56710
+ };
56711
+ const formatValue = (value2) => {
56712
+ const dates = value2?.map((x2) => hooks(x2, dateFormatData.dateFormat));
56713
+ let start2;
56714
+ let end2;
56715
+ for (let i2 = 0; i2 < dates.length; i2++) {
56716
+ if (!start2 || dates[i2].isBefore(start2)) {
56717
+ start2 = dates[i2];
56718
+ }
56719
+ if (!end2 || dates[i2].isAfter(end2)) {
56720
+ end2 = dates[i2];
56721
+ }
56722
+ }
56723
+ return { start: start2, end: end2 };
56724
+ };
56725
+ const getInputMask = (date) => {
56726
+ return date.replace(new RegExp(/[a-zA-Z]/, "g"), (x2) => x2 === "a" ? "aa" : "9");
56727
+ };
56728
+ const handleCancel = (e2) => {
56729
+ e2.stopPropagation();
56730
+ collapsedCalendar();
56731
+ };
56732
+ const handleAccept = (e2) => {
56733
+ e2.stopPropagation();
56734
+ let dates = datesValues;
56735
+ if (datesValues?.length === 0 && value) {
56736
+ dates = value?.map((x2) => hooks(x2, dateFormatData.dateFormat));
56737
+ }
56738
+ onAccept(dates);
56739
+ collapsedCalendar();
56740
+ };
56741
+ const handleKeyDown2 = (e2) => {
56742
+ if (e2.key === "Enter") {
56743
+ e2.target.blur();
56744
+ }
56745
+ };
56746
+ const dateRangeProps = {
56747
+ value: formatValue(value),
56748
+ onChange: onChangeDates,
56749
+ locale: locale2,
56750
+ services,
56751
+ setDateInvalidity,
56752
+ options: { variant: "static" },
56753
+ includeKeyboard: true,
56754
+ keyboardOptions: {
56755
+ variant: "inline",
56756
+ inputVariant: "outlined",
56757
+ format: INPUT_FORMAT,
56758
+ InputProps: {
56759
+ inputComponent: ReactInputMask,
56760
+ inputProps: {
56761
+ mask: getInputMask(INPUT_FORMAT),
56762
+ onKeyDown: handleKeyDown2
56763
+ }
56764
+ },
56765
+ helperText: "",
56766
+ InputAdornmentProps: { position: "start" }
56767
+ }
56768
+ };
56769
+ return /* @__PURE__ */ jsxs("div", { className: "date-range__container", "data-testid": "date-range__container", children: [
56770
+ /* @__PURE__ */ jsx(DateRangePicker, { ...dateRangeProps }),
56771
+ /* @__PURE__ */ jsxs("div", { className: "date-range__buttons-panel", children: [
56772
+ /* @__PURE__ */ jsx(
56773
+ "button",
56774
+ {
56775
+ "data-testid": "date-range__button-cancel",
56776
+ className: "date-range__button-cancel",
56777
+ onClick: (e2) => handleCancel(e2),
56778
+ children: resources.DateRangePicker__Cancel
56779
+ }
56780
+ ),
56781
+ /* @__PURE__ */ jsx(
56782
+ "button",
56783
+ {
56784
+ ref: acceptButtonRef,
56785
+ "data-testid": "date-range__button-ok",
56786
+ className: classNames("date-range__button-ok"),
56787
+ onClick: (e2) => handleAccept(e2),
56788
+ children: resources.DateRangePicker__Accept
56789
+ }
56790
+ )
56791
+ ] })
56792
+ ] });
56793
+ }
56788
56794
  const DateRangeCalendarIcon = React__default.memo((props) => {
56789
56795
  const calendar2 = useRef(null);
56790
56796
  const [isExpanded, setExpanded] = useState(false);
@@ -56814,10 +56820,11 @@ var PeriodType = /* @__PURE__ */ ((PeriodType2) => {
56814
56820
  })(PeriodType || {});
56815
56821
  function WidgetPeriodSelector(props) {
56816
56822
  const { services, className, dataTestIdPostfix, options, onChange, onDatesChange, onAccept, selectedValue, datesValue, isLoading } = props;
56817
- const { resources, localStorage: localStorage2 } = services;
56823
+ const { resources, applicationSettings } = services;
56818
56824
  const defaultOption = { key: PeriodType.DateRange, value: resources.Period };
56819
56825
  const selectorDataTestId = className ? `${className}-selector` : "widget-period-selector";
56820
- const locale2 = localStorage2.getData("currentLocale_") === "en-US" ? "en" : "ru";
56826
+ const browserLocale = typeof navigator !== "undefined" ? navigator.language?.split("-")?.[0] : void 0;
56827
+ const locale2 = applicationSettings?.culture?.twoLetterISOLanguageName || applicationSettings?.culture?.name?.split("-")?.[0] || browserLocale;
56821
56828
  const selectedDisplayValue = options.find((option) => option.key.toString() === selectedValue)?.value ?? "";
56822
56829
  const handleSelectOption = (option) => {
56823
56830
  onChange(option.key.toString());
@@ -62246,7 +62253,10 @@ function NumberComponent(props) {
62246
62253
  }
62247
62254
  function handleBlur(event) {
62248
62255
  if (valueRef.current) {
62249
- onChange(clampValue(valueRef.current));
62256
+ const clampedValue = clampValue(valueRef.current);
62257
+ if (clampedValue !== valueRef.current.toString()) {
62258
+ onChange(clampValue(valueRef.current));
62259
+ }
62250
62260
  }
62251
62261
  onBlur?.(event);
62252
62262
  }
@@ -71802,7 +71812,7 @@ class SettingsNavigationService {
71802
71812
  const breadcrumbsItems = [];
71803
71813
  if (data.serverId) {
71804
71814
  breadcrumbsItems.push({
71805
- label: `${this.application.resources.Server}: ${data.serverId}`,
71815
+ label: `${this.application.resources.Server}: ${data.serverId.toUpperCase()}`,
71806
71816
  path: this.getServerPageUrl(serverId)
71807
71817
  });
71808
71818
  }