@appcorp/app-corp-vista 0.0.30 → 0.0.32

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.
@@ -68,14 +68,18 @@ var VistaDashboardSidebarV1 = function (_a) {
68
68
  react_1.default.createElement("li", null,
69
69
  filteredApps.length > 1 && (react_1.default.createElement("div", { className: "text-xs/6 font-semibold text-gray-400" }, "Your Apps")),
70
70
  react_1.default.createElement("ul", { role: "list", className: "-mx-2 mt-2 space-y-1" }, filteredApps
71
+ .filter(function (_a) {
72
+ var enabled = _a.enabled;
73
+ return enabled;
74
+ })
75
+ .sort(function (a, b) { return a.order - b.order; })
71
76
  .map(function (_a) {
72
- var initial = _a.initial, isActive = _a.isActive, label = _a.label;
73
- return (react_1.default.createElement("li", { key: label },
74
- react_1.default.createElement("a", { href: "", className: (0, class_names_1.classNames)(isActive
75
- ? 'text-gray-700 bg-gray-300 dark:bg-gray-700 dark:text-white'
76
- : 'text-gray-700 hover:bg-gray-300 dark:text-gray-400 dark:hover:bg-gray-800', 'group flex gap-x-3 rounded-md p-2 text-sm/6 font-semibold') },
77
- react_1.default.createElement("span", { className: "flex size-6 shrink-0 items-center justify-center rounded-lg border border-gray-700 bg-gray-800 text-[0.625rem] font-medium text-gray-400 group-hover:text-white" }, initial),
78
- react_1.default.createElement("span", { className: "truncate" }, label))));
77
+ var initial = _a.initial, isActive = _a.isActive, label = _a.label, handleOnClick = _a.handleOnClick;
78
+ return (react_1.default.createElement("li", { onClick: handleOnClick, key: label, className: (0, class_names_1.classNames)(isActive
79
+ ? 'text-gray-700 bg-gray-300 dark:bg-gray-700 dark:text-white'
80
+ : 'text-gray-700 hover:bg-gray-300 dark:text-gray-400 dark:hover:bg-gray-800', 'group flex gap-x-3 rounded-md p-2 text-sm/6 font-semibold') },
81
+ react_1.default.createElement("span", { className: "flex size-6 shrink-0 items-center justify-center rounded-lg border border-gray-700 bg-gray-800 text-[0.625rem] font-medium text-gray-400 group-hover:text-white" }, initial),
82
+ react_1.default.createElement("span", { className: "truncate" }, label)));
79
83
  }))),
80
84
  react_1.default.createElement("li", { className: "-mx-6 mt-auto" },
81
85
  react_1.default.createElement("div", { className: 'flex justify-center items-center text-gray-900 dark:text-white w-full p-4 text-xs ' },
@@ -9,13 +9,13 @@ var vista_button_v1_1 = require("./vista-button-v1/vista-button-v1");
9
9
  var vista_button_type_1 = require("../type/vista-button-type");
10
10
  var vista_text_input_v1_1 = require("./vista-text-input-v1");
11
11
  var VistaTableHeaderV1 = function (_a) {
12
- var handleSearchInput = _a.handleSearchInput, headerActions = _a.headerActions, inputDisabled = _a.inputDisabled, inputId = _a.inputId, inputPlaceholder = _a.inputPlaceholder, inputValue = _a.inputValue, tableDescription = _a.tableDescription, tableHeading = _a.tableHeading;
12
+ var handleSearchInput = _a.handleSearchInput, headerActions = _a.headerActions, searchDisabled = _a.searchDisabled, searchEnabled = _a.searchEnabled, searchId = _a.searchId, searchPlaceholder = _a.searchPlaceholder, searchValue = _a.searchValue, tableDescription = _a.tableDescription, tableHeading = _a.tableHeading;
13
13
  return (react_1.default.createElement("div", { className: "sm:flex sm:items-center" },
14
14
  react_1.default.createElement("div", { className: "sm:flex-auto" },
15
15
  react_1.default.createElement("h1", { className: "text-base font-semibold text-gray-900 dark:text-white" }, tableHeading),
16
16
  react_1.default.createElement("p", { className: "mt-2 text-sm text-gray-900 dark:text-white" }, tableDescription)),
17
17
  react_1.default.createElement("div", { className: "mt-4 flex gap-4 sm:ml-16 sm:mt-0 sm:flex-none" },
18
- react_1.default.createElement(vista_text_input_v1_1.VistaTextInputV1, { disabled: inputDisabled, handleOnChange: handleSearchInput, id: inputId, placeholder: inputPlaceholder, value: inputValue }),
18
+ searchEnabled && (react_1.default.createElement(vista_text_input_v1_1.VistaTextInputV1, { disabled: searchDisabled, handleOnChange: handleSearchInput, id: searchId, placeholder: searchPlaceholder, value: searchValue })),
19
19
  headerActions
20
20
  .filter(function (_a) {
21
21
  var enabled = _a.enabled;
@@ -8,9 +8,9 @@ var react_1 = __importDefault(require("react"));
8
8
  var vista_table_header_v1_1 = require("../../molecules/vista-table-header-v1");
9
9
  var vista_table_footer_v1_1 = require("../../molecules/vista-table-footer-v1");
10
10
  var VistaTableV1 = function (_a) {
11
- var currentPage = _a.currentPage, handleNextOnClick = _a.handleNextOnClick, handleOnSelect = _a.handleOnSelect, handlePreviousOnClick = _a.handlePreviousOnClick, headerActions = _a.headerActions, isNextDisabled = _a.isNextDisabled, isPreviousDisabled = _a.isPreviousDisabled, listOptions = _a.listOptions, nodeSelectedKey = _a.nodeSelectedKey, selectKey1 = _a.selectKey1, selectKey2 = _a.selectKey2, selectedItem = _a.selectedItem, tableBody = _a.tableBody, tableDescription = _a.tableDescription, tableHead = _a.tableHead, tableHeading = _a.tableHeading, totalPages = _a.totalPages, inputPlaceholder = _a.inputPlaceholder, inputId = _a.inputId, inputValue = _a.inputValue, inputDisabled = _a.inputDisabled, handleSearchInput = _a.handleSearchInput;
11
+ var currentPage = _a.currentPage, handleNextOnClick = _a.handleNextOnClick, handleOnSelect = _a.handleOnSelect, handlePreviousOnClick = _a.handlePreviousOnClick, handleSearchInput = _a.handleSearchInput, headerActions = _a.headerActions, isNextDisabled = _a.isNextDisabled, isPreviousDisabled = _a.isPreviousDisabled, listOptions = _a.listOptions, nodeSelectedKey = _a.nodeSelectedKey, searchDisabled = _a.searchDisabled, _b = _a.searchEnabled, searchEnabled = _b === void 0 ? false : _b, searchId = _a.searchId, searchPlaceholder = _a.searchPlaceholder, searchValue = _a.searchValue, selectKey1 = _a.selectKey1, selectKey2 = _a.selectKey2, selectedItem = _a.selectedItem, tableBody = _a.tableBody, tableDescription = _a.tableDescription, tableHead = _a.tableHead, tableHeading = _a.tableHeading, totalPages = _a.totalPages;
12
12
  return (react_1.default.createElement("div", { className: "px-4" },
13
- react_1.default.createElement(vista_table_header_v1_1.VistaTableHeaderV1, { handleSearchInput: handleSearchInput, headerActions: headerActions, inputDisabled: inputDisabled, inputId: inputId, inputPlaceholder: inputPlaceholder, inputValue: inputValue, tableDescription: tableDescription, tableHeading: tableHeading }),
13
+ react_1.default.createElement(vista_table_header_v1_1.VistaTableHeaderV1, { handleSearchInput: handleSearchInput, headerActions: headerActions, searchDisabled: searchDisabled, searchEnabled: searchEnabled, searchId: searchId, searchPlaceholder: searchPlaceholder, searchValue: searchValue, tableDescription: tableDescription, tableHeading: tableHeading }),
14
14
  react_1.default.createElement("div", { className: "mt-8 flow-root" },
15
15
  react_1.default.createElement("div", { className: "" },
16
16
  react_1.default.createElement("div", { className: "inline-block min-w-full py-2 align-middle" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appcorp/app-corp-vista",
3
- "version": "0.0.30",
3
+ "version": "0.0.32",
4
4
  "scripts": {
5
5
  "build": "yarn clean && yarn build:ts && cp package.json lib && cp README.md lib",
6
6
  "build:next": "next build",
@@ -1,11 +1,12 @@
1
1
  import { VistaTableHeaderActionItem } from "./vista-table-type";
2
2
  export interface VistaTableHeaderV1Props {
3
+ handleSearchInput: () => void;
3
4
  headerActions: VistaTableHeaderActionItem[];
5
+ searchDisabled: boolean;
6
+ searchEnabled?: boolean;
7
+ searchId: string;
8
+ searchPlaceholder: string;
9
+ searchValue: string;
4
10
  tableDescription: string;
5
11
  tableHeading: string;
6
- inputPlaceholder: string;
7
- inputId: string;
8
- inputValue: string;
9
- inputDisabled: boolean;
10
- handleSearchInput: () => void;
11
12
  }
@@ -13,10 +13,11 @@ export interface VistaTableV1Props {
13
13
  handlePreviousOnClick: () => void;
14
14
  handleSearchInput: () => void;
15
15
  headerActions: VistaTableHeaderActionItem[];
16
- inputDisabled: boolean;
17
- inputId: string;
18
- inputPlaceholder: string;
19
- inputValue: string;
16
+ searchEnabled?: boolean;
17
+ searchDisabled: boolean;
18
+ searchId: string;
19
+ searchPlaceholder: string;
20
+ searchValue: string;
20
21
  isNextDisabled: boolean;
21
22
  isPreviousDisabled: boolean;
22
23
  listOptions: Object[];