fennec-ui 1.1.310 → 1.1.311

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.
@@ -60,6 +60,149 @@ function getLocator(locator, obj) {
60
60
  return (locator || "") + obj;
61
61
  } else return locator || "";
62
62
  }
63
+ var LOCATOR_TYPES = {
64
+ BUTTON: 'button',
65
+ INPUT: 'input',
66
+ TEXTAREA: 'textarea',
67
+ SELECT: 'select',
68
+ CHECKBOX: 'checkbox',
69
+ RADIO: 'radio',
70
+ TOGGLE: 'toggle',
71
+ LINK: 'link',
72
+ FILE_INPUT: 'file-input',
73
+ DATE_PICKER: 'date-picker',
74
+ SLIDER: 'slider',
75
+ CONTAINER: 'container',
76
+ LIST_ITEM: 'list-item',
77
+ CARD: 'card',
78
+ TABLE: 'table',
79
+ TABLE_ROW: 'table-row',
80
+ TABLE_CELL: 'table-cell',
81
+ TABLE_HEADER: 'table-header',
82
+ NAVIGATION: 'navigation',
83
+ TAB: 'tab',
84
+ TAB_PANEL: 'tab-panel',
85
+ MODAL: 'modal',
86
+ DIALOG: 'dialog',
87
+ POPUP: 'popup',
88
+ TOOLTIP: 'tooltip',
89
+ DROPDOWN: 'dropdown',
90
+ DROPDOWN_ITEM: 'dropdown-item',
91
+ MENU: 'menu',
92
+ MENU_ITEM: 'menu-item',
93
+ STATUS: 'status',
94
+ NOTIFICATION: 'notification',
95
+ ALERT: 'alert',
96
+ BADGE: 'badge',
97
+ PROGRESS: 'progress',
98
+ LOADING: 'loading',
99
+ TEXT: 'text',
100
+ TITLE: 'title',
101
+ LABEL: 'label',
102
+ HEADING: 'heading',
103
+ PARAGRAPH: 'paragraph',
104
+ IMAGE: 'image',
105
+ VIDEO: 'video',
106
+ AUDIO: 'audio',
107
+ ICON: 'icon',
108
+ FORM: 'form',
109
+ FORM_GROUP: 'form-group',
110
+ FORM_FIELD: 'form-field',
111
+ SEARCHBAR: 'searchbar',
112
+ PAGINATION: 'pagination',
113
+ BREADCRUMBS: 'breadcrumbs',
114
+ SIDEBAR: 'sidebar',
115
+ HEADER: 'header',
116
+ FOOTER: 'footer'
117
+ };
118
+ var LOCATOR_ACTIONS = {
119
+ CLICK: 'click',
120
+ DOUBLE_CLICK: 'double-click',
121
+ RIGHT_CLICK: 'right-click',
122
+ HOVER: 'hover',
123
+ FOCUS: 'focus',
124
+ BLUR: 'blur',
125
+ INPUT: 'input',
126
+ TYPE: 'type',
127
+ CLEAR: 'clear',
128
+ PASTE: 'paste',
129
+ SELECT: 'select',
130
+ DESELECT: 'deselect',
131
+ CHECK: 'check',
132
+ UNCHECK: 'uncheck',
133
+ TOGGLE: 'toggle',
134
+ DRAG: 'drag',
135
+ DROP: 'drop',
136
+ DRAG_AND_DROP: 'drag-and-drop',
137
+ UPLOAD: 'upload',
138
+ DOWNLOAD: 'download',
139
+ SUBMIT: 'submit',
140
+ RESET: 'reset',
141
+ VALIDATE: 'validate',
142
+ OPEN: 'open',
143
+ CLOSE: 'close',
144
+ CONFIRM: 'confirm',
145
+ CANCEL: 'cancel',
146
+ DISMISS: 'dismiss',
147
+ SORT: 'sort',
148
+ FILTER: 'filter',
149
+ SEARCH: 'search',
150
+ PAGINATE: 'paginate',
151
+ CREATE: 'create',
152
+ READ: 'read',
153
+ UPDATE: 'update',
154
+ DELETE: 'delete',
155
+ ADD_ITEM: 'add-item',
156
+ REMOVE_ITEM: 'remove-item',
157
+ EDIT_ITEM: 'edit-item',
158
+ MOVE_ITEM: 'move-item',
159
+ EXPAND: 'expand',
160
+ COLLAPSE: 'collapse',
161
+ ZOOM: 'zoom',
162
+ SCROLL: 'scroll',
163
+ COPY: 'copy',
164
+ PRINT: 'print',
165
+ SHARE: 'share',
166
+ REFRESH: 'refresh'
167
+ };
168
+ function getAILocator(id, value, options) {
169
+ if (value === void 0) {
170
+ value = null;
171
+ }
172
+ if (options === void 0) {
173
+ options = {};
174
+ }
175
+ if (!id || typeof id !== 'string') {
176
+ console.warn('getLocator: id должен быть непустой строкой');
177
+ return '';
178
+ }
179
+ var parts = [id];
180
+ if (options.type) {
181
+ parts.push("type-" + options.type);
182
+ }
183
+ if (options.action) {
184
+ parts.push("action-" + options.action);
185
+ }
186
+ if (options.index !== undefined) {
187
+ parts.push("index-" + options.index);
188
+ }
189
+ if (value !== null && value !== undefined) {
190
+ if (typeof value === 'object' && value !== null) {
191
+ var identifier = value.id || value.ID || value.key || value.uuid || value._id;
192
+ if (identifier) {
193
+ parts.push("id-" + identifier);
194
+ }
195
+ } else if (['string', 'number', 'boolean'].includes(typeof value)) {
196
+ if (typeof value === 'boolean') {
197
+ parts.push("value-" + (value ? 'true' : 'false'));
198
+ } else {
199
+ var valueStr = String(value).substring(0, 30);
200
+ parts.push("value-" + valueStr);
201
+ }
202
+ }
203
+ }
204
+ return parts.join('::');
205
+ }
63
206
  var publish = function publish(msg, data) {
64
207
  PubSub.publish(msg, data);
65
208
  };
@@ -13017,7 +13160,7 @@ function Frm$1(props) {
13017
13160
  hidden: item.hidden,
13018
13161
  className: classes.FormItem,
13019
13162
  key: idx,
13020
- name: uncapitalize(item.name),
13163
+ name: item.type !== "object" && item.type !== "document" ? uncapitalize(item === null || item === void 0 ? void 0 : item.name) : uncapitalize(item === null || item === void 0 ? void 0 : item.name) + "ID",
13021
13164
  rules: formItemRules(item)
13022
13165
  }, /*#__PURE__*/React__default.createElement(FieldMobile, {
13023
13166
  className: classes.Field,
@@ -14627,5 +14770,5 @@ var ExampleComponent = function ExampleComponent(_ref) {
14627
14770
  }, "Component: ", text);
14628
14771
  };
14629
14772
 
14630
- export { Action, ActionPickerItem, And, AuthProvider, AuthService, BlockHeaderMobile, CREATE, CREATEP, CalendarItem, ClipboardContext, CollectionByProperty, CollectionFullReplacement, CollectionFullReplacementProvider, CollectionPartialReplacement, CollectionPartialReplacementProvider, CollectionServer, CollectionServerMobile, ContextFiltersToQueryFilters, DELETE, DELETEP, DropdownAction, DropdownMobile, ExampleComponent, FennecError, Field, FieldFullReplacement, FieldFullReplacementProvider, FieldMobile, FieldPartialReplacement, FieldPartialReplacementProvider, FilterToQueryParameters, FilteringUIMobile, FiltersFieldsUI, FiltersFieldsUIMobile, FooterButton, FormObserverContext, GET$1 as GET, GETP, GETWITH, GETWITHP, GetMeta, GetMetaProperties, GetMetaPropertyByPath, HasRole, HasRoleID, If, IfElse, JSX, JSXIndex, JSXMap, JSXPathMap, MetaColumns, MetaContext, MetaProvider, Model, ModelFullReplacement, ModelFullReplacementProvider, ModelMobile, ModelPartialReplacement, ModelPartialReplacementProvider, ObjectToContextFilters, ObjectToQueryParam, Or, Overlay, POST, POSTFormData, POSTFormDataP, POSTP, QueryDetail, QueryFiltersToContextFilters, QueryFunc, QueryOrder, QueryParam, QueryParametersToFilters, QueryParams, READ, READP, READWITH, READWITHP, Request, RequireAuth, SetMetaProperties, SortingFieldsUI, SortingFieldsUIMobile, TranslateContext, TranslateProvider, UPDATE, UPDATEP, UserConfigContext, UserConfigProvider, UserContext, arrayUnpack, clean, contextFilterToObject, contextFilterToQueryFilters, createArrayInArray, createInArray, deleteArrayInArray, deleteInArray, deleteInProperties, deleteInPropertiesUUID, deletePropertiesInProperties, detectMutation, emptyInArray, _equals as equals, errorAlert, errorCatch, eventExecution, filterByItem, foreachInProperties, formItemRules, getDisplay, getFieldDisplay, getFormatFieldValueTableView, getLocator, getObjectDisplay, getObjectValue, getObjectValueOrDefault, getSortingDisplayFields, isRequired, makeFormData, messageError, metaGetCloneObject, metaGetFieldByName, preventDefault, priceFormat, publish, pushStateHistoryModal, queryFilterByItem, _queryFiltersToContextFilter as queryFiltersToContextFilter, subscribe, triggerArrayInArray, triggerInArray, triggerInProperties, triggerInPropertiesUUID, triggerPropertiesInProperties, typeIsNumber, uncapitalize, undefinedInArray, unpackFormFields, unsubscribe, _unwrap as unwrap, updateArrayInArray, updateInArray, updateInProperties, updateInPropertiesUUID, updatePropertiesInProperties, upgradeInArray, useActionRef, useAuth, useClipboardContext, useCollectionFullReplacement, useCollectionFullReplacementHelper, useCollectionPartialReplacement, useCollectionPartialReplacementHelper, useCollectionRef, useFieldFullReplacement, useFieldFullReplacementHelper, useFieldPartialReplacement, useFieldPartialReplacementHelper, useFormObserverContext, useMetaContext, useModelFullReplacement, useModelFullReplacementHelper, useModelPartialReplacement, useModelPartialReplacementHelper, useNavigation, useTranslateContext, useUserConfigContext, useUserContext, validator, ycStorage };
14773
+ export { Action, ActionPickerItem, And, AuthProvider, AuthService, BlockHeaderMobile, CREATE, CREATEP, CalendarItem, ClipboardContext, CollectionByProperty, CollectionFullReplacement, CollectionFullReplacementProvider, CollectionPartialReplacement, CollectionPartialReplacementProvider, CollectionServer, CollectionServerMobile, ContextFiltersToQueryFilters, DELETE, DELETEP, DropdownAction, DropdownMobile, ExampleComponent, FennecError, Field, FieldFullReplacement, FieldFullReplacementProvider, FieldMobile, FieldPartialReplacement, FieldPartialReplacementProvider, FilterToQueryParameters, FilteringUIMobile, FiltersFieldsUI, FiltersFieldsUIMobile, FooterButton, FormObserverContext, GET$1 as GET, GETP, GETWITH, GETWITHP, GetMeta, GetMetaProperties, GetMetaPropertyByPath, HasRole, HasRoleID, If, IfElse, JSX, JSXIndex, JSXMap, JSXPathMap, LOCATOR_ACTIONS, LOCATOR_TYPES, MetaColumns, MetaContext, MetaProvider, Model, ModelFullReplacement, ModelFullReplacementProvider, ModelMobile, ModelPartialReplacement, ModelPartialReplacementProvider, ObjectToContextFilters, ObjectToQueryParam, Or, Overlay, POST, POSTFormData, POSTFormDataP, POSTP, QueryDetail, QueryFiltersToContextFilters, QueryFunc, QueryOrder, QueryParam, QueryParametersToFilters, QueryParams, READ, READP, READWITH, READWITHP, Request, RequireAuth, SetMetaProperties, SortingFieldsUI, SortingFieldsUIMobile, TranslateContext, TranslateProvider, UPDATE, UPDATEP, UserConfigContext, UserConfigProvider, UserContext, arrayUnpack, clean, contextFilterToObject, contextFilterToQueryFilters, createArrayInArray, createInArray, deleteArrayInArray, deleteInArray, deleteInProperties, deleteInPropertiesUUID, deletePropertiesInProperties, detectMutation, emptyInArray, _equals as equals, errorAlert, errorCatch, eventExecution, filterByItem, foreachInProperties, formItemRules, getAILocator, getDisplay, getFieldDisplay, getFormatFieldValueTableView, getLocator, getObjectDisplay, getObjectValue, getObjectValueOrDefault, getSortingDisplayFields, isRequired, makeFormData, messageError, metaGetCloneObject, metaGetFieldByName, preventDefault, priceFormat, publish, pushStateHistoryModal, queryFilterByItem, _queryFiltersToContextFilter as queryFiltersToContextFilter, subscribe, triggerArrayInArray, triggerInArray, triggerInProperties, triggerInPropertiesUUID, triggerPropertiesInProperties, typeIsNumber, uncapitalize, undefinedInArray, unpackFormFields, unsubscribe, _unwrap as unwrap, updateArrayInArray, updateInArray, updateInProperties, updateInPropertiesUUID, updatePropertiesInProperties, upgradeInArray, useActionRef, useAuth, useClipboardContext, useCollectionFullReplacement, useCollectionFullReplacementHelper, useCollectionPartialReplacement, useCollectionPartialReplacementHelper, useCollectionRef, useFieldFullReplacement, useFieldFullReplacementHelper, useFieldPartialReplacement, useFieldPartialReplacementHelper, useFormObserverContext, useMetaContext, useModelFullReplacement, useModelFullReplacementHelper, useModelPartialReplacement, useModelPartialReplacementHelper, useNavigation, useTranslateContext, useUserConfigContext, useUserContext, validator, ycStorage };
14631
14774
  //# sourceMappingURL=fennec-ui.modern.js.map