@ai-table/state 0.0.65 → 0.0.67

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 (130) hide show
  1. package/action/field.d.ts +3 -4
  2. package/action/field.d.ts.map +1 -1
  3. package/action/general.d.ts +2 -1
  4. package/action/general.d.ts.map +1 -1
  5. package/action/index.d.ts +3 -4
  6. package/action/index.d.ts.map +1 -1
  7. package/action/position.d.ts +2 -2
  8. package/action/position.d.ts.map +1 -1
  9. package/action/record.d.ts +3 -5
  10. package/action/record.d.ts.map +1 -1
  11. package/action/view.d.ts +2 -1
  12. package/action/view.d.ts.map +1 -1
  13. package/constants/field-menu-item.d.ts +2 -1
  14. package/constants/field-menu-item.d.ts.map +1 -1
  15. package/constants/index.d.ts +0 -1
  16. package/constants/index.d.ts.map +1 -1
  17. package/constants/view.d.ts +1 -1
  18. package/constants/view.d.ts.map +1 -1
  19. package/esm2022/action/field.mjs +3 -4
  20. package/esm2022/action/general.mjs +12 -35
  21. package/esm2022/action/position.mjs +2 -2
  22. package/esm2022/action/record.mjs +4 -16
  23. package/esm2022/action/view.mjs +2 -2
  24. package/esm2022/constants/field-menu-item.mjs +2 -2
  25. package/esm2022/constants/index.mjs +1 -2
  26. package/esm2022/constants/view.mjs +2 -2
  27. package/esm2022/plugins/state.plugin.mjs +1 -1
  28. package/esm2022/shared/index.mjs +2 -1
  29. package/esm2022/shared/to-table/index.mjs +3 -3
  30. package/esm2022/shared/to-table/map-event.mjs +2 -3
  31. package/esm2022/shared/to-yjs/add-node.mjs +14 -8
  32. package/esm2022/shared/to-yjs/index.mjs +2 -2
  33. package/esm2022/shared/to-yjs/remove-node.mjs +3 -3
  34. package/esm2022/shared/to-yjs/set-node.mjs +3 -3
  35. package/esm2022/shared/to-yjs/update-field-value.mjs +10 -4
  36. package/esm2022/shared/undo-manager.service.mjs +60 -0
  37. package/esm2022/shared/utils/index.mjs +1 -2
  38. package/esm2022/shared/utils/initialize.mjs +5 -5
  39. package/esm2022/types/ai-table.mjs +1 -1
  40. package/esm2022/types/index.mjs +1 -5
  41. package/esm2022/utils/build.mjs +1 -1
  42. package/esm2022/utils/common.mjs +1 -1
  43. package/esm2022/utils/field/add-fields.mjs +21 -14
  44. package/esm2022/utils/field/move-fields.mjs +1 -1
  45. package/esm2022/utils/field/position-field.mjs +1 -1
  46. package/esm2022/utils/field/remove-field.mjs +1 -1
  47. package/esm2022/utils/field/sort-fields.mjs +2 -2
  48. package/esm2022/utils/record/add-records.mjs +4 -3
  49. package/esm2022/utils/record/filter.mjs +4 -3
  50. package/esm2022/utils/record/move-records.mjs +1 -1
  51. package/esm2022/utils/record/sort.mjs +2 -1
  52. package/esm2022/utils/record/update-field-value.mjs +1 -1
  53. package/esm2022/utils/record/update-system-field-value.mjs +1 -1
  54. package/esm2022/utils/view.mjs +1 -1
  55. package/fesm2022/ai-table-state.mjs +185 -507
  56. package/fesm2022/ai-table-state.mjs.map +1 -1
  57. package/package.json +2 -4
  58. package/plugins/state.plugin.d.ts.map +1 -1
  59. package/shared/index.d.ts +1 -0
  60. package/shared/index.d.ts.map +1 -1
  61. package/shared/to-table/index.d.ts +2 -1
  62. package/shared/to-table/index.d.ts.map +1 -1
  63. package/shared/to-table/map-event.d.ts +2 -1
  64. package/shared/to-table/map-event.d.ts.map +1 -1
  65. package/shared/to-yjs/add-node.d.ts +2 -1
  66. package/shared/to-yjs/add-node.d.ts.map +1 -1
  67. package/shared/to-yjs/index.d.ts +1 -1
  68. package/shared/to-yjs/index.d.ts.map +1 -1
  69. package/shared/to-yjs/remove-node.d.ts +2 -1
  70. package/shared/to-yjs/remove-node.d.ts.map +1 -1
  71. package/shared/to-yjs/set-node.d.ts +2 -1
  72. package/shared/to-yjs/set-node.d.ts.map +1 -1
  73. package/shared/to-yjs/update-field-value.d.ts +2 -1
  74. package/shared/to-yjs/update-field-value.d.ts.map +1 -1
  75. package/shared/undo-manager.service.d.ts +21 -0
  76. package/shared/undo-manager.service.d.ts.map +1 -0
  77. package/shared/utils/index.d.ts +0 -1
  78. package/shared/utils/index.d.ts.map +1 -1
  79. package/shared/utils/initialize.d.ts +1 -1
  80. package/shared/utils/initialize.d.ts.map +1 -1
  81. package/types/ai-table.d.ts +3 -4
  82. package/types/ai-table.d.ts.map +1 -1
  83. package/types/index.d.ts +0 -4
  84. package/types/index.d.ts.map +1 -1
  85. package/utils/build.d.ts +3 -3
  86. package/utils/build.d.ts.map +1 -1
  87. package/utils/common.d.ts +2 -3
  88. package/utils/common.d.ts.map +1 -1
  89. package/utils/field/add-fields.d.ts +1 -1
  90. package/utils/field/add-fields.d.ts.map +1 -1
  91. package/utils/field/move-fields.d.ts +1 -1
  92. package/utils/field/move-fields.d.ts.map +1 -1
  93. package/utils/field/position-field.d.ts +1 -2
  94. package/utils/field/position-field.d.ts.map +1 -1
  95. package/utils/field/remove-field.d.ts +2 -1
  96. package/utils/field/remove-field.d.ts.map +1 -1
  97. package/utils/field/sort-fields.d.ts +2 -2
  98. package/utils/field/sort-fields.d.ts.map +1 -1
  99. package/utils/record/add-records.d.ts +1 -1
  100. package/utils/record/add-records.d.ts.map +1 -1
  101. package/utils/record/filter.d.ts +3 -2
  102. package/utils/record/filter.d.ts.map +1 -1
  103. package/utils/record/move-records.d.ts +1 -1
  104. package/utils/record/move-records.d.ts.map +1 -1
  105. package/utils/record/sort.d.ts +4 -4
  106. package/utils/record/sort.d.ts.map +1 -1
  107. package/utils/record/update-field-value.d.ts +1 -1
  108. package/utils/record/update-field-value.d.ts.map +1 -1
  109. package/utils/record/update-system-field-value.d.ts +1 -1
  110. package/utils/record/update-system-field-value.d.ts.map +1 -1
  111. package/utils/view.d.ts +2 -1
  112. package/utils/view.d.ts.map +1 -1
  113. package/constants/default.d.ts +0 -2
  114. package/constants/default.d.ts.map +0 -1
  115. package/esm2022/constants/default.mjs +0 -2
  116. package/esm2022/shared/to-table/array-event.mjs +0 -189
  117. package/esm2022/shared/utils/translate.mjs +0 -142
  118. package/esm2022/types/action.mjs +0 -23
  119. package/esm2022/types/shared.mjs +0 -2
  120. package/esm2022/types/view.mjs +0 -16
  121. package/shared/to-table/array-event.d.ts +0 -10
  122. package/shared/to-table/array-event.d.ts.map +0 -1
  123. package/shared/utils/translate.d.ts +0 -33
  124. package/shared/utils/translate.d.ts.map +0 -1
  125. package/types/action.d.ts +0 -88
  126. package/types/action.d.ts.map +0 -1
  127. package/types/shared.d.ts +0 -13
  128. package/types/shared.d.ts.map +0 -1
  129. package/types/view.d.ts +0 -50
  130. package/types/view.d.ts.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../packages/state/src/types/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAEnC,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAExC,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAE5C,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;AAEtD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,GAAG,gBAAgB,GAAG,iBAAiB,CAAC,CAAC,CAAC;AAE/F,MAAM,MAAM,iBAAiB,GAAG,CAAC;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAErG,MAAM,MAAM,iBAAiB,GAAG,UAAU,EAAE,CAAC;AAE7C,MAAM,MAAM,oBAAoB,GAAG,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAC"}
package/types/view.d.ts DELETED
@@ -1,50 +0,0 @@
1
- import { AITableField, AITableFilterCondition, AITableRecord } from '@ai-table/grid';
2
- import { Id } from 'ngx-tethys/types';
3
- export declare class Positions {
4
- [view_id: string]: number;
5
- }
6
- export declare class RemovePositions {
7
- [view_id: string]: undefined;
8
- }
9
- export interface AITableViewRecord extends AITableRecord {
10
- positions: Positions;
11
- }
12
- export interface AITableViewField extends AITableField {
13
- positions: Positions;
14
- widths?: Positions;
15
- }
16
- export type AITableViewRecords = AITableViewRecord[];
17
- export type AITableViewFields = AITableViewField[];
18
- export declare enum Direction {
19
- default = 0,
20
- ascending = 1,
21
- descending = -1
22
- }
23
- export declare enum AITableFilterLogical {
24
- and = "and",
25
- or = "or"
26
- }
27
- export type ViewSettings = AITableSearchOptions & AITableFilterConditions & AITableSortOptions;
28
- export interface AITableView {
29
- _id: string;
30
- short_id: string;
31
- name: string;
32
- emoji_icon?: string;
33
- settings?: ViewSettings;
34
- }
35
- export interface AITableFilterConditions<TValue = unknown> {
36
- condition_logical?: AITableFilterLogical;
37
- conditions?: AITableFilterCondition<TValue>[];
38
- }
39
- export interface AITableSortOptions {
40
- is_keep_sort?: boolean;
41
- sorts?: {
42
- sort_by: Id;
43
- direction: Direction;
44
- }[];
45
- }
46
- export interface AITableSearchOptions {
47
- keywords?: string;
48
- }
49
- export type AITableViews = AITableView[];
50
- //# sourceMappingURL=view.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../packages/state/src/types/view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACrF,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAEtC,qBAAa,SAAS;IAClB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;CAC7B;AAED,qBAAa,eAAe;IACxB,CAAC,OAAO,EAAE,M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