@gisce/react-ooui 1.2.0-rc.35 → 1.2.0-rc.36

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 +1 @@
1
- {"version":3,"file":"TreeActionBar.d.ts","sourceRoot":"","sources":["TreeActionBar.tsx"],"names":[],"mappings":";AAiCA,aAAK,KAAK,GAAG;IACX,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,GAAG,CAAC;CACd,CAAC;AAEF,iBAAS,aAAa,CAAC,KAAK,EAAE,KAAK,eAkUlC;AAMD,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"TreeActionBar.d.ts","sourceRoot":"","sources":["TreeActionBar.tsx"],"names":[],"mappings":";AAiCA,aAAK,KAAK,GAAG;IACX,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,GAAG,CAAC;CACd,CAAC;AAEF,iBAAS,aAAa,CAAC,KAAK,EAAE,KAAK,eAiUlC;AAMD,eAAe,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"iconMapper.d.ts","sourceRoot":"","sources":["iconMapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;8BAqGzB,MAAM;AAA3B,wBAYE"}
1
+ {"version":3,"file":"iconMapper.d.ts","sourceRoot":"","sources":["iconMapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;8BAqGzB,MAAM;AAA3B,wBAWE"}
@@ -542,20 +542,19 @@ const {
542
542
  STOCK_CLEAR: "CloseSquare",
543
543
  STOCK_UNINDENT: "AlignLeft",
544
544
  STOCK_PREFERENCES: "Setting"
545
- }, iconMapper = (e) => {
546
- if (e.indexOf("gtk-") !== -1) {
547
- const a = `STOCK_${e.replace("gtk-", "").replace("-", "_").toUpperCase()}`;
548
- return getIconForKey(iconMapping[a]);
549
- }
550
- return iconMapping.hasOwnProperty(e) ? getIconForKey(iconMapping[e]) : getIconForKey(e);
551
- };
552
- function getIconForKey(e) {
553
- const r = `${e.split("-").map(
554
- (s) => s.replace(
545
+ }, iconMapper = (e) => (e.indexOf("gtk-") !== -1 && (e = `STOCK_${e.replace("gtk-", "").replace(/\-/g, "_").toUpperCase()}`), iconMapping.hasOwnProperty(e) ? getIconForKey(iconMapping[e]) : getIconForKey(e));
546
+ function toCamelCase(e) {
547
+ return `${e.split("-").map(
548
+ (r) => r.replace(
555
549
  /\w\S*/g,
556
- (l) => l.charAt(0).toUpperCase() + l.slice(1).toLowerCase()
550
+ (a) => a.charAt(0).toUpperCase() + a.slice(1).toLowerCase()
557
551
  )
558
- ).join("")}`, a = `${r}Outlined`;
552
+ ).join("")}`;
553
+ }
554
+ function getIconForKey(e) {
555
+ let r = e.charAt(0).toUpperCase() + e.slice(1);
556
+ r.indexOf("-") !== -1 && (r = toCamelCase(r));
557
+ const a = `${r}Outlined`;
559
558
  if (AntIcons[a])
560
559
  return AntIcons[a];
561
560
  const o = `Icon${r}`;
@@ -27185,9 +27184,22 @@ function TreeActionBar(e) {
27185
27184
  onSearch: (oe) => {
27186
27185
  oe && oe.trim().length > 0 ? S == null || S(oe) : S == null || S(void 0);
27187
27186
  }
27187
+ }), !M && /* @__PURE__ */ jsx(ButtonWithBadge, {
27188
+ icon: /* @__PURE__ */ jsx(FilterOutlined, {
27189
+ style: {
27190
+ color: v ? "white" : void 0
27191
+ }
27192
+ }),
27193
+ tooltip: W("advanced_search"),
27194
+ type: v ? "primary" : "default",
27195
+ onClick: () => {
27196
+ C == null || C(!v);
27197
+ },
27198
+ disabled: c || u || x,
27199
+ badgeNumber: g == null ? void 0 : g.length
27188
27200
  }), separator$1(), /* @__PURE__ */ jsx(NewButton, {
27189
27201
  disabled: x
27190
- }), separator$1(), /* @__PURE__ */ jsx(ActionButton, {
27202
+ }), /* @__PURE__ */ jsx(ActionButton, {
27191
27203
  icon: /* @__PURE__ */ jsx(CopyOutlined$4, {}),
27192
27204
  tooltip: W("duplicate"),
27193
27205
  disabled: !s || (s == null ? void 0 : s.length) !== 1 || c || x,
@@ -27200,19 +27212,6 @@ function TreeActionBar(e) {
27200
27212
  loading: u,
27201
27213
  onClick: re
27202
27214
  }), separator$1()]
27203
- }), !M && /* @__PURE__ */ jsx(ButtonWithBadge, {
27204
- icon: /* @__PURE__ */ jsx(FilterOutlined, {
27205
- style: {
27206
- color: v ? "white" : void 0
27207
- }
27208
- }),
27209
- tooltip: W("advanced_search"),
27210
- type: v ? "primary" : "default",
27211
- onClick: () => {
27212
- C == null || C(!v);
27213
- },
27214
- disabled: c || u || x,
27215
- badgeNumber: g == null ? void 0 : g.length
27216
27215
  }), /* @__PURE__ */ jsx(ActionButton, {
27217
27216
  icon: /* @__PURE__ */ jsx(InfoCircleOutlined$4, {}),
27218
27217
  tooltip: W("showLogs"),