@scbt-ecom/ui 0.120.1 → 0.121.0

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/lib/exports/widget.js +1 -1
  2. package/dist/lib/shared/style.css +1 -1
  3. package/dist/lib/shared/ui/icon/allowedIcons.js +1 -1
  4. package/dist/lib/shared/ui/icon/allowedIcons.js.map +1 -1
  5. package/dist/lib/shared/ui/icon/iconsMap.js +1 -1
  6. package/dist/lib/shared/ui/icon/iconsMap.js.map +1 -1
  7. package/dist/lib/shared/ui/table/Desktop.js +1 -1
  8. package/dist/lib/shared/ui/table/Desktop.js.map +1 -1
  9. package/dist/lib/shared/ui/table/Horizontal.js +1 -1
  10. package/dist/lib/shared/ui/table/Horizontal.js.map +1 -1
  11. package/dist/lib/shared/ui/table/model/TableUtils.js +1 -1
  12. package/dist/lib/shared/ui/table/model/TableUtils.js.map +1 -1
  13. package/dist/lib/shared/ui/table/ui/editableCell/EditableCell.js +1 -1
  14. package/dist/lib/shared/ui/table/ui/editableCell/EditableCell.js.map +1 -1
  15. package/dist/lib/widgets/index.js +1 -1
  16. package/dist/lib/widgets/model/helpers.js +2 -2
  17. package/dist/lib/widgets/model/helpers.js.map +1 -1
  18. package/dist/lib/widgets/table/{Table.js → InfoTable.js} +2 -2
  19. package/dist/lib/widgets/table/InfoTable.js.map +1 -0
  20. package/dist/lib/widgets/table/index.js +1 -1
  21. package/dist/static/files/fileMultiple.svg.js +2 -0
  22. package/dist/static/files/fileMultiple.svg.js.map +1 -0
  23. package/dist/static/static/files/fileMultiple.svg +3 -0
  24. package/dist/stats.html +1 -1
  25. package/dist/types/lib/shared/ui/icon/allowedIcons.d.ts +2 -2
  26. package/dist/types/lib/shared/ui/icon/iconsMap.d.ts +6 -0
  27. package/dist/types/lib/shared/ui/table/ui/editableCell/EditableCell.d.ts +6 -1
  28. package/dist/types/lib/widgets/table/InfoTable.d.ts +3 -0
  29. package/dist/types/lib/widgets/table/index.d.ts +1 -1
  30. package/package.json +1 -1
  31. package/dist/lib/widgets/table/Table.js.map +0 -1
  32. package/dist/types/lib/widgets/table/Table.d.ts +0 -3
@@ -8,11 +8,11 @@ export declare const allowedIcons: {
8
8
  readonly logos: readonly ["logos/beeline", "logos/megafon", "logos/mts"];
9
9
  readonly info: readonly ["info/helpCircle", "info/warningCircle"];
10
10
  readonly general: readonly ["general/calendar", "general/check", "general/close", "general/edit", "general/heart", "general/hiddenEye", "general/loginFilled", "general/menu", "general/optionsHorizontal", "general/optionsVertical", "general/plus", "general/reorder", "general/search", "general/shield", "general/showEye"];
11
- readonly files: readonly ["files/border", "files/borderError", "files/documentFilled", "files/documentOutline", "files/upload"];
11
+ readonly files: readonly ["files/border", "files/borderError", "files/documentFilled", "files/documentOutline", "files/fileMultiple", "files/upload"];
12
12
  readonly editor: readonly ["editor/bold", "editor/fonts", "editor/heading", "editor/italic", "editor/link", "editor/list", "editor/palette", "editor/redo", "editor/removeFormatting", "editor/space", "editor/strikethrough", "editor/typography", "editor/underline", "editor/undo"];
13
13
  readonly communication: readonly ["communication/phone"];
14
14
  readonly brandLogos: readonly ["brandLogos/logoBlack", "brandLogos/logoBusiness", "brandLogos/logoGray", "brandLogos/logoInsurance", "brandLogos/logoMain", "brandLogos/logoWhite"];
15
15
  readonly arrows: readonly ["arrows/arrowCircle", "arrows/arrowDownRight", "arrows/arrowLink", "arrows/arrowRight", "arrows/arrowRotate", "arrows/arrowScroll"];
16
16
  };
17
- readonly flatten: readonly ["status/badSmile", "status/iconMark", "status/iconRetry", "status/iconUser", "status/succesCircle", "social/classmates", "social/telegram", "social/vk", "media/desktop", "media/mobile", "logos/beeline", "logos/megafon", "logos/mts", "info/helpCircle", "info/warningCircle", "general/calendar", "general/check", "general/close", "general/edit", "general/heart", "general/hiddenEye", "general/loginFilled", "general/menu", "general/optionsHorizontal", "general/optionsVertical", "general/plus", "general/reorder", "general/search", "general/shield", "general/showEye", "files/border", "files/borderError", "files/documentFilled", "files/documentOutline", "files/upload", "editor/bold", "editor/fonts", "editor/heading", "editor/italic", "editor/link", "editor/list", "editor/palette", "editor/redo", "editor/removeFormatting", "editor/space", "editor/strikethrough", "editor/typography", "editor/underline", "editor/undo", "communication/phone", "brandLogos/logoBlack", "brandLogos/logoBusiness", "brandLogos/logoGray", "brandLogos/logoInsurance", "brandLogos/logoMain", "brandLogos/logoWhite", "arrows/arrowCircle", "arrows/arrowDownRight", "arrows/arrowLink", "arrows/arrowRight", "arrows/arrowRotate", "arrows/arrowScroll"];
17
+ readonly flatten: readonly ["status/badSmile", "status/iconMark", "status/iconRetry", "status/iconUser", "status/succesCircle", "social/classmates", "social/telegram", "social/vk", "media/desktop", "media/mobile", "logos/beeline", "logos/megafon", "logos/mts", "info/helpCircle", "info/warningCircle", "general/calendar", "general/check", "general/close", "general/edit", "general/heart", "general/hiddenEye", "general/loginFilled", "general/menu", "general/optionsHorizontal", "general/optionsVertical", "general/plus", "general/reorder", "general/search", "general/shield", "general/showEye", "files/border", "files/borderError", "files/documentFilled", "files/documentOutline", "files/fileMultiple", "files/upload", "editor/bold", "editor/fonts", "editor/heading", "editor/italic", "editor/link", "editor/list", "editor/palette", "editor/redo", "editor/removeFormatting", "editor/space", "editor/strikethrough", "editor/typography", "editor/underline", "editor/undo", "communication/phone", "brandLogos/logoBlack", "brandLogos/logoBusiness", "brandLogos/logoGray", "brandLogos/logoInsurance", "brandLogos/logoMain", "brandLogos/logoWhite", "arrows/arrowCircle", "arrows/arrowDownRight", "arrows/arrowLink", "arrows/arrowRight", "arrows/arrowRotate", "arrows/arrowScroll"];
18
18
  };
@@ -203,6 +203,12 @@ export declare const iconsMap: {
203
203
  desc?: string;
204
204
  descId?: string;
205
205
  }>;
206
+ 'files/fileMultiple': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
207
+ title?: string;
208
+ titleId?: string;
209
+ desc?: string;
210
+ descId?: string;
211
+ }>;
206
212
  'files/upload': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
207
213
  title?: string;
208
214
  titleId?: string;
@@ -1,10 +1,15 @@
1
1
  import { CellContext } from '@tanstack/react-table';
2
+ import { AllowedIcons } from '../../..';
2
3
  type Cell<TData, TValue> = CellContext<TData, TValue> & {
3
4
  rowIndex?: number;
4
5
  };
5
6
  interface EditableCellProps<TData, TValue> extends Cell<TData, TValue> {
6
7
  target: keyof TData;
7
8
  update: (target: number, values: TData) => void;
9
+ attachment?: {
10
+ icon: AllowedIcons;
11
+ handler?: (value: TValue | string, event: React.MouseEvent<HTMLButtonElement>) => void;
12
+ };
8
13
  }
9
- export declare const EditableCell: <TData, TValue extends string | undefined>({ row, getValue, update, target, rowIndex }: EditableCellProps<TData, TValue>) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const EditableCell: <TData, TValue extends string | undefined>({ row, getValue, update, target, rowIndex, attachment }: EditableCellProps<TData, TValue>) => import("react/jsx-runtime").JSX.Element;
10
15
  export {};
@@ -0,0 +1,3 @@
1
+ import { TableProps } from './model';
2
+ export declare const InfoTable: <Key extends string, TData extends Record<Key, unknown>>(props: TableProps<Key, TData>) => import("react/jsx-runtime").JSX.Element;
3
+ export default InfoTable;
@@ -1,2 +1,2 @@
1
- export { Table } from './Table';
1
+ export { InfoTable } from './InfoTable';
2
2
  export type { TableProps } from './model';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scbt-ecom/ui",
3
- "version": "0.120.1",
3
+ "version": "0.121.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1 +0,0 @@
1
- {"version":3,"file":"Table.js","sources":["../../../../lib/widgets/table/Table.tsx"],"sourcesContent":["import { TableUtils } from '../../shared/ui/table/model'\nimport { cn } from '../../shared/utils'\nimport { getHeaderAccessors, isHorizontalTable, type TableProps } from './model'\nimport { DataTable, ResponsiveContainer } from '$/shared/ui'\n\nexport const Table = <Key extends string, TData extends Record<Key, unknown>>(props: TableProps<Key, TData>) => {\n const { title, subtitle, helperText, pagination = false, columns, data, horizontal, ...restTableProps } = props\n\n const { accessors, sortingColumns, sortingFn } = getHeaderAccessors(columns)\n\n const cols = TableUtils.getColumns(data[0], {\n headerAccessor: accessors,\n enableSorting: sortingColumns,\n sortingFn\n })\n\n const isHorizontal = isHorizontalTable(horizontal)\n\n return (\n <section className='w-full'>\n <ResponsiveContainer className={cn('flex flex-col gap-12 mobile:max-w-[360px]')}>\n <div className='flex flex-col gap-[16px]'>\n <div className='mob-headline-bold-s desktop:desk-headline-bold-m' dangerouslySetInnerHTML={{ __html: title }} />\n <div className='desktop:desk-body-regular-l' dangerouslySetInnerHTML={{ __html: subtitle }} />\n </div>\n\n <div className='flex flex-col gap-4'>\n <DataTable\n {...restTableProps}\n horizontal={isHorizontal}\n data={data}\n columns={cols}\n mode='odd'\n pagination={pagination}\n />\n {helperText && (\n <div className='desk-body-regular-m text-color-tetriary' dangerouslySetInnerHTML={{ __html: helperText }} />\n )}\n </div>\n </ResponsiveContainer>\n </section>\n )\n}\n\nexport default Table\n"],"names":["Table","props","title","subtitle","helperText","pagination","columns","data","horizontal","restTableProps","accessors","sortingColumns","sortingFn","getHeaderAccessors","cols","TableUtils","isHorizontal","isHorizontalTable","jsx","ResponsiveContainer","cn","jsxs","DataTable"],"mappings":"4oEAKO,MAAMA,GAAiEC,GAAkC,CAC9G,KAAM,CAAE,MAAAC,EAAO,SAAAC,EAAU,WAAAC,EAAY,WAAAC,EAAa,GAAO,QAAAC,EAAS,KAAAC,EAAM,WAAAC,EAAY,GAAGC,CAAA,EAAmBR,EAEpG,CAAE,UAAAS,EAAW,eAAAC,EAAgB,UAAAC,CAAA,EAAcC,EAAmBP,CAAO,EAErEQ,EAAOC,EAAW,WAAWR,EAAK,CAAC,EAAG,CAC1C,eAAgBG,EAChB,cAAeC,EACf,UAAAC,CAAA,CACD,EAEKI,EAAeC,EAAkBT,CAAU,EAEjD,OACEU,EAAC,WAAQ,UAAU,SACjB,WAACC,EAAA,CAAoB,UAAWC,EAAG,2CAA2C,EAC5E,SAAA,CAAAC,EAAC,MAAA,CAAI,UAAU,2BACb,SAAA,CAAAH,EAAC,OAAI,UAAU,mDAAmD,wBAAyB,CAAE,OAAQhB,GAAS,EAC9GgB,EAAC,OAAI,UAAU,8BAA8B,wBAAyB,CAAE,OAAQf,EAAS,CAAG,CAAA,EAC9F,EAEAkB,EAAC,MAAA,CAAI,UAAU,sBACb,SAAA,CAAAH,EAACI,EAAA,CACE,GAAGb,EACJ,WAAYO,EACZ,KAAAT,EACA,QAASO,EACT,KAAK,MACL,WAAAT,CAAA,CAAA,EAEDD,KACE,MAAA,CAAI,UAAU,0CAA0C,wBAAyB,CAAE,OAAQA,EAAW,CAAG,CAAA,CAAA,CAE9G,CAAA,CAAA,CACF,CAAA,CACF,CAEJ"}
@@ -1,3 +0,0 @@
1
- import { TableProps } from './model';
2
- export declare const Table: <Key extends string, TData extends Record<Key, unknown>>(props: TableProps<Key, TData>) => import("react/jsx-runtime").JSX.Element;
3
- export default Table;