@pequity/squirrel 6.0.2 → 6.0.4

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.
Files changed (32) hide show
  1. package/dist/cjs/chunks/p-date-picker.js +1 -0
  2. package/dist/cjs/chunks/p-icon.js +24 -221
  3. package/dist/cjs/chunks/p-inline-date-picker.js +1 -0
  4. package/dist/cjs/p-icon.js +27 -2
  5. package/dist/cjs/p-loading.js +2 -2
  6. package/dist/cjs/p-modal.js +3 -3
  7. package/dist/es/chunks/p-date-picker.js +1 -0
  8. package/dist/es/chunks/p-icon.js +25 -222
  9. package/dist/es/chunks/p-inline-date-picker.js +1 -0
  10. package/dist/es/p-icon.js +27 -2
  11. package/dist/es/p-loading.js +2 -2
  12. package/dist/es/p-modal.js +3 -3
  13. package/dist/squirrel/components/p-checkbox/p-checkbox.vue.d.ts +1 -1
  14. package/dist/squirrel/components/p-date-picker/p-date-picker.vue.d.ts +1 -0
  15. package/dist/squirrel/components/p-drawer/p-drawer.vue.d.ts +1 -1
  16. package/dist/squirrel/components/p-dropdown-select/p-dropdown-select.vue.d.ts +192 -1
  17. package/dist/squirrel/components/p-file-upload/p-file-upload.vue.d.ts +3 -1
  18. package/dist/squirrel/components/p-icon/p-icon.types.d.ts +26 -1
  19. package/dist/squirrel/components/p-icon/p-icon.vue.d.ts +3 -3
  20. package/dist/squirrel/components/p-loading/p-loading.vue.d.ts +3 -1
  21. package/dist/squirrel/components/p-modal/p-modal.vue.d.ts +7 -4
  22. package/dist/squirrel/components/p-pagination-info/p-pagination-info.vue.d.ts +1 -1
  23. package/dist/squirrel/components/p-select-list/p-select-list.vue.d.ts +191 -1
  24. package/dist/squirrel/components/p-table/p-table.vue.d.ts +4 -1
  25. package/dist/squirrel.css +20 -20
  26. package/package.json +19 -19
  27. package/squirrel/components/p-dropdown/p-dropdown.vue +1 -0
  28. package/squirrel/components/p-icon/p-icon.stories.js +1 -1
  29. package/squirrel/components/p-icon/p-icon.types.ts +26 -1
  30. package/squirrel/components/p-icon/p-icon.vue +4 -4
  31. package/squirrel/components/p-loading/p-loading.vue +1 -1
  32. package/squirrel/components/p-modal/p-modal.vue +1 -1
@@ -42,6 +42,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
42
42
  hideInputIcon: { type: Boolean },
43
43
  state: { type: Boolean },
44
44
  clearable: { type: Boolean },
45
+ alwaysClearable: { type: Boolean },
45
46
  autoApply: { type: Boolean, default: true },
46
47
  filters: {},
47
48
  disableMonthYearSelect: { type: Boolean },
@@ -13,7 +13,7 @@ const pIcon = require("../p-icon.js");
13
13
  * Licensed under MIT.
14
14
  *
15
15
  * @license MIT
16
- * @version 2.2.0
16
+ * @version 2.3.0
17
17
  */
18
18
  const defaultIconDimensions = Object.freeze(
19
19
  {
@@ -889,193 +889,6 @@ function sendAPIQuery(target, query, callback) {
889
889
  }
890
890
  return redundancy.query(query, send2, callback)().abort;
891
891
  }
892
- const browserCacheVersion = "iconify2";
893
- const browserCachePrefix = "iconify";
894
- const browserCacheCountKey = browserCachePrefix + "-count";
895
- const browserCacheVersionKey = browserCachePrefix + "-version";
896
- const browserStorageHour = 36e5;
897
- const browserStorageCacheExpiration = 168;
898
- const browserStorageLimit = 50;
899
- function getStoredItem(func, key) {
900
- try {
901
- return func.getItem(key);
902
- } catch (err) {
903
- }
904
- }
905
- function setStoredItem(func, key, value) {
906
- try {
907
- func.setItem(key, value);
908
- return true;
909
- } catch (err) {
910
- }
911
- }
912
- function removeStoredItem(func, key) {
913
- try {
914
- func.removeItem(key);
915
- } catch (err) {
916
- }
917
- }
918
- function setBrowserStorageItemsCount(storage2, value) {
919
- return setStoredItem(storage2, browserCacheCountKey, value.toString());
920
- }
921
- function getBrowserStorageItemsCount(storage2) {
922
- return parseInt(getStoredItem(storage2, browserCacheCountKey)) || 0;
923
- }
924
- const browserStorageConfig = {
925
- local: true,
926
- session: true
927
- };
928
- const browserStorageEmptyItems = {
929
- local: /* @__PURE__ */ new Set(),
930
- session: /* @__PURE__ */ new Set()
931
- };
932
- let browserStorageStatus = false;
933
- function setBrowserStorageStatus(status) {
934
- browserStorageStatus = status;
935
- }
936
- let _window = typeof window === "undefined" ? {} : window;
937
- function getBrowserStorage(key) {
938
- const attr = key + "Storage";
939
- try {
940
- if (_window && _window[attr] && typeof _window[attr].length === "number") {
941
- return _window[attr];
942
- }
943
- } catch (err) {
944
- }
945
- browserStorageConfig[key] = false;
946
- }
947
- function iterateBrowserStorage(key, callback) {
948
- const func = getBrowserStorage(key);
949
- if (!func) {
950
- return;
951
- }
952
- const version = getStoredItem(func, browserCacheVersionKey);
953
- if (version !== browserCacheVersion) {
954
- if (version) {
955
- const total2 = getBrowserStorageItemsCount(func);
956
- for (let i = 0; i < total2; i++) {
957
- removeStoredItem(func, browserCachePrefix + i.toString());
958
- }
959
- }
960
- setStoredItem(func, browserCacheVersionKey, browserCacheVersion);
961
- setBrowserStorageItemsCount(func, 0);
962
- return;
963
- }
964
- const minTime = Math.floor(Date.now() / browserStorageHour) - browserStorageCacheExpiration;
965
- const parseItem = (index) => {
966
- const name = browserCachePrefix + index.toString();
967
- const item = getStoredItem(func, name);
968
- if (typeof item !== "string") {
969
- return;
970
- }
971
- try {
972
- const data = JSON.parse(item);
973
- if (typeof data === "object" && typeof data.cached === "number" && data.cached > minTime && typeof data.provider === "string" && typeof data.data === "object" && typeof data.data.prefix === "string" && // Valid item: run callback
974
- callback(data, index)) {
975
- return true;
976
- }
977
- } catch (err) {
978
- }
979
- removeStoredItem(func, name);
980
- };
981
- let total = getBrowserStorageItemsCount(func);
982
- for (let i = total - 1; i >= 0; i--) {
983
- if (!parseItem(i)) {
984
- if (i === total - 1) {
985
- total--;
986
- setBrowserStorageItemsCount(func, total);
987
- } else {
988
- browserStorageEmptyItems[key].add(i);
989
- }
990
- }
991
- }
992
- }
993
- function initBrowserStorage() {
994
- if (browserStorageStatus) {
995
- return;
996
- }
997
- setBrowserStorageStatus(true);
998
- for (const key in browserStorageConfig) {
999
- iterateBrowserStorage(key, (item) => {
1000
- const iconSet = item.data;
1001
- const provider = item.provider;
1002
- const prefix = iconSet.prefix;
1003
- const storage2 = getStorage(
1004
- provider,
1005
- prefix
1006
- );
1007
- if (!addIconSet(storage2, iconSet).length) {
1008
- return false;
1009
- }
1010
- const lastModified = iconSet.lastModified || -1;
1011
- storage2.lastModifiedCached = storage2.lastModifiedCached ? Math.min(storage2.lastModifiedCached, lastModified) : lastModified;
1012
- return true;
1013
- });
1014
- }
1015
- }
1016
- function updateLastModified(storage2, lastModified) {
1017
- const lastValue = storage2.lastModifiedCached;
1018
- if (
1019
- // Matches or newer
1020
- lastValue && lastValue >= lastModified
1021
- ) {
1022
- return lastValue === lastModified;
1023
- }
1024
- storage2.lastModifiedCached = lastModified;
1025
- if (lastValue) {
1026
- for (const key in browserStorageConfig) {
1027
- iterateBrowserStorage(key, (item) => {
1028
- const iconSet = item.data;
1029
- return item.provider !== storage2.provider || iconSet.prefix !== storage2.prefix || iconSet.lastModified === lastModified;
1030
- });
1031
- }
1032
- }
1033
- return true;
1034
- }
1035
- function storeInBrowserStorage(storage2, data) {
1036
- if (!browserStorageStatus) {
1037
- initBrowserStorage();
1038
- }
1039
- function store(key) {
1040
- let func;
1041
- if (!browserStorageConfig[key] || !(func = getBrowserStorage(key))) {
1042
- return;
1043
- }
1044
- const set = browserStorageEmptyItems[key];
1045
- let index;
1046
- if (set.size) {
1047
- set.delete(index = Array.from(set).shift());
1048
- } else {
1049
- index = getBrowserStorageItemsCount(func);
1050
- if (index >= browserStorageLimit || !setBrowserStorageItemsCount(func, index + 1)) {
1051
- return;
1052
- }
1053
- }
1054
- const item = {
1055
- cached: Math.floor(Date.now() / browserStorageHour),
1056
- provider: storage2.provider,
1057
- data
1058
- };
1059
- return setStoredItem(
1060
- func,
1061
- browserCachePrefix + index.toString(),
1062
- JSON.stringify(item)
1063
- );
1064
- }
1065
- if (data.lastModified && !updateLastModified(storage2, data.lastModified)) {
1066
- return;
1067
- }
1068
- if (!Object.keys(data.icons).length) {
1069
- return;
1070
- }
1071
- if (data.not_found) {
1072
- data = Object.assign({}, data);
1073
- delete data.not_found;
1074
- }
1075
- if (!store("local")) {
1076
- store("session");
1077
- }
1078
- }
1079
892
  function emptyCallback() {
1080
893
  }
1081
894
  function loadedNewIcons(storage2) {
@@ -1098,7 +911,7 @@ function checkIconNamesForAPI(icons) {
1098
911
  invalid
1099
912
  };
1100
913
  }
1101
- function parseLoaderResponse(storage2, icons, data, isAPIResponse) {
914
+ function parseLoaderResponse(storage2, icons, data) {
1102
915
  function checkMissing() {
1103
916
  const pending = storage2.pendingIcons;
1104
917
  icons.forEach((name) => {
@@ -1117,9 +930,6 @@ function parseLoaderResponse(storage2, icons, data, isAPIResponse) {
1117
930
  checkMissing();
1118
931
  return;
1119
932
  }
1120
- if (isAPIResponse) {
1121
- storeInBrowserStorage(storage2, data);
1122
- }
1123
933
  } catch (err) {
1124
934
  console.error(err);
1125
935
  }
@@ -1159,7 +969,7 @@ function loadNewIcons(storage2, icons) {
1159
969
  parsePossiblyAsyncResponse(
1160
970
  storage2.loadIcons(icons2, prefix, provider),
1161
971
  (data) => {
1162
- parseLoaderResponse(storage2, icons2, data, false);
972
+ parseLoaderResponse(storage2, icons2, data);
1163
973
  }
1164
974
  );
1165
975
  return;
@@ -1174,27 +984,27 @@ function loadNewIcons(storage2, icons) {
1174
984
  [name]: data
1175
985
  }
1176
986
  } : null;
1177
- parseLoaderResponse(storage2, [name], iconSet, false);
987
+ parseLoaderResponse(storage2, [name], iconSet);
1178
988
  });
1179
989
  });
1180
990
  return;
1181
991
  }
1182
992
  const { valid, invalid } = checkIconNamesForAPI(icons2);
1183
993
  if (invalid.length) {
1184
- parseLoaderResponse(storage2, invalid, null, false);
994
+ parseLoaderResponse(storage2, invalid, null);
1185
995
  }
1186
996
  if (!valid.length) {
1187
997
  return;
1188
998
  }
1189
999
  const api = prefix.match(matchIconName) ? getAPIModule(provider) : null;
1190
1000
  if (!api) {
1191
- parseLoaderResponse(storage2, valid, null, false);
1001
+ parseLoaderResponse(storage2, valid, null);
1192
1002
  return;
1193
1003
  }
1194
1004
  const params = api.prepare(provider, prefix, valid);
1195
1005
  params.forEach((item) => {
1196
1006
  sendAPIQuery(provider, item, (data) => {
1197
- parseLoaderResponse(storage2, item.icons, data, true);
1007
+ parseLoaderResponse(storage2, item.icons, data);
1198
1008
  });
1199
1009
  });
1200
1010
  });
@@ -1684,19 +1494,6 @@ function setCustomIconsLoader$1(loader, prefix, provider) {
1684
1494
  function setCustomIconLoader$1(loader, prefix, provider) {
1685
1495
  getStorage(provider || "", prefix).loadIcon = loader;
1686
1496
  }
1687
- function toggleBrowserCache(storage2, value) {
1688
- switch (storage2) {
1689
- case "local":
1690
- case "session":
1691
- browserStorageConfig[storage2] = value;
1692
- break;
1693
- case "all":
1694
- for (const key in browserStorageConfig) {
1695
- browserStorageConfig[key] = value;
1696
- }
1697
- break;
1698
- }
1699
- }
1700
1497
  const nodeAttr = "data-style";
1701
1498
  let customStyle = "";
1702
1499
  function appendCustomStyle(style) {
@@ -1714,15 +1511,14 @@ function updateStyle(parent, inline) {
1714
1511
  function exportFunctions() {
1715
1512
  setAPIModule("", fetchAPIModule);
1716
1513
  allowSimpleNames(true);
1717
- let _window2;
1514
+ let _window;
1718
1515
  try {
1719
- _window2 = window;
1516
+ _window = window;
1720
1517
  } catch (err) {
1721
1518
  }
1722
- if (_window2) {
1723
- initBrowserStorage();
1724
- if (_window2.IconifyPreload !== void 0) {
1725
- const preload = _window2.IconifyPreload;
1519
+ if (_window) {
1520
+ if (_window.IconifyPreload !== void 0) {
1521
+ const preload = _window.IconifyPreload;
1726
1522
  const err = "Invalid IconifyPreload syntax.";
1727
1523
  if (typeof preload === "object" && preload !== null) {
1728
1524
  (preload instanceof Array ? preload : [preload]).forEach((item) => {
@@ -1741,8 +1537,8 @@ function exportFunctions() {
1741
1537
  });
1742
1538
  }
1743
1539
  }
1744
- if (_window2.IconifyProviders !== void 0) {
1745
- const providers = _window2.IconifyProviders;
1540
+ if (_window.IconifyProviders !== void 0) {
1541
+ const providers = _window.IconifyProviders;
1746
1542
  if (typeof providers === "object" && providers !== null) {
1747
1543
  for (const key in providers) {
1748
1544
  const err = "IconifyProviders[" + key + "] is invalid.";
@@ -1770,8 +1566,12 @@ function exportFunctions() {
1770
1566
  listAPIProviders
1771
1567
  };
1772
1568
  return {
1773
- enableCache: (storage2) => toggleBrowserCache(storage2, true),
1774
- disableCache: (storage2) => toggleBrowserCache(storage2, false),
1569
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1570
+ enableCache: (storage2) => {
1571
+ },
1572
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1573
+ disableCache: (storage2) => {
1574
+ },
1775
1575
  iconLoaded: iconLoaded$1,
1776
1576
  iconExists: iconLoaded$1,
1777
1577
  // deprecated, kept to avoid breaking changes
@@ -2270,6 +2070,7 @@ function defineIconifyIcon(name = "iconify-icon") {
2270
2070
  return IconifyIcon;
2271
2071
  }
2272
2072
  defineIconifyIcon() || exportFunctions();
2073
+ const _hoisted_1 = ["icon"];
2273
2074
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
2274
2075
  ...{
2275
2076
  name: "PIcon"
@@ -2281,7 +2082,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
2281
2082
  setup(__props) {
2282
2083
  const isPIcon = (icon) => !!pIcon.P_ICON_ALIASES[icon];
2283
2084
  return (_ctx, _cache) => {
2284
- return vue.openBlock(), vue.createElementBlock("iconify-icon", vue.normalizeProps(vue.guardReactiveProps({ ..._ctx.$props, icon: isPIcon(_ctx.icon) ? vue.unref(pIcon.P_ICON_ALIASES)[_ctx.icon] : _ctx.icon })), null, 16);
2085
+ return vue.openBlock(), vue.createElementBlock("iconify-icon", {
2086
+ icon: isPIcon(_ctx.icon) ? vue.unref(pIcon.P_ICON_ALIASES)[_ctx.icon] : _ctx.icon
2087
+ }, null, 8, _hoisted_1);
2285
2088
  };
2286
2089
  }
2287
2090
  });
@@ -43,6 +43,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
43
43
  hideInputIcon: { type: Boolean },
44
44
  state: { type: Boolean },
45
45
  clearable: { type: Boolean },
46
+ alwaysClearable: { type: Boolean },
46
47
  autoApply: { type: Boolean, default: true },
47
48
  filters: {},
48
49
  disableMonthYearSelect: { type: Boolean },
@@ -3,7 +3,32 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const P_ICON_ALIASES = {
4
4
  delete: "octicon:trash-24",
5
5
  edit: "simple-line-icons:pencil",
6
- send: "fa:paper-plane",
7
- settings: "heroicons:cog-8-tooth-20-solid"
6
+ send: "mingcute:send-plane-fill",
7
+ settings: "heroicons:cog-8-tooth-20-solid",
8
+ empty: "ph:empty",
9
+ "chevron-left": "material-symbols:chevron-left-rounded",
10
+ "chevron-right": "material-symbols:chevron-right-rounded",
11
+ "chevron-up": "ph:caret-up",
12
+ "chevron-down": "ph:caret-down",
13
+ "ok-circle": "material-symbols:check-circle",
14
+ "cancel-circle": "material-symbols:cancel",
15
+ ok: "material-symbols:check",
16
+ cancel: "material-symbols:close",
17
+ "ok-bold": "fa:check",
18
+ "cancel-bold": "fa:close",
19
+ archive: "solar:archive-outline",
20
+ lock: "material-symbols:lock",
21
+ "drag-horizontal": "ci:drag-horizontal",
22
+ email: "tabler:mail-filled",
23
+ location: "gridicons:location",
24
+ calendar: "mdi:calendar-today",
25
+ save: "material-symbols:save-rounded",
26
+ copy: "ph:copy",
27
+ plus: "ic:outline-plus",
28
+ add: "ic:outline-plus",
29
+ more: "lineicons:more-alt",
30
+ filters: "mage:filter",
31
+ "bar-chart": "material-symbols:bar-chart-4-bars-rounded",
32
+ list: "material-symbols:format-list-bulleted"
8
33
  };
9
34
  exports.P_ICON_ALIASES = P_ICON_ALIASES;
@@ -5,7 +5,7 @@ const component = require("./component.js");
5
5
  const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
6
6
  const _hoisted_1 = {
7
7
  key: 0,
8
- class: "fixed left-0 top-0 z-[120] flex w-full justify-center",
8
+ class: "fixed left-0 top-0 z-[9999] flex w-full justify-center",
9
9
  "aria-live": "polite",
10
10
  "aria-busy": "true"
11
11
  };
@@ -82,5 +82,5 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
82
82
  };
83
83
  }
84
84
  });
85
- const pLoading = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-b4ee3729"]]);
85
+ const pLoading = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-245e3308"]]);
86
86
  module.exports = pLoading;
@@ -114,7 +114,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
114
114
  ],
115
115
  setup(__props, { emit: __emit }) {
116
116
  vue.useCssVars((_ctx) => ({
117
- "4895a587": __props.maxWidth
117
+ "9a05239e": __props.maxWidth
118
118
  }));
119
119
  let animatingZIndex = 0;
120
120
  const emit = __emit;
@@ -356,7 +356,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
356
356
  ], 10, _hoisted_8)
357
357
  ], true),
358
358
  vue.renderSlot(_ctx.$slots, "footer-wrapper", {}, () => [
359
- _ctx.$slots["footer"] ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, [
359
+ _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, [
360
360
  vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true)
361
361
  ])) : vue.createCommentVNode("", true)
362
362
  ], true)
@@ -371,5 +371,5 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
371
371
  };
372
372
  }
373
373
  });
374
- const pModal = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-5fd440a3"]]);
374
+ const pModal = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-c3379c94"]]);
375
375
  module.exports = pModal;
@@ -41,6 +41,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
41
41
  hideInputIcon: { type: Boolean },
42
42
  state: { type: Boolean },
43
43
  clearable: { type: Boolean },
44
+ alwaysClearable: { type: Boolean },
44
45
  autoApply: { type: Boolean, default: true },
45
46
  filters: {},
46
47
  disableMonthYearSelect: { type: Boolean },