@kaspernj/api-maker 1.0.2053 → 1.0.2055
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.
- package/build/api.d.ts +19 -0
- package/build/api.d.ts.map +1 -0
- package/build/api.js +77 -109
- package/build/api.js.map +1 -0
- package/build/attribute-not-loaded-error.d.ts +3 -0
- package/build/attribute-not-loaded-error.d.ts.map +1 -0
- package/build/attribute-not-loaded-error.js +3 -2
- package/build/attribute-not-loaded-error.js.map +1 -0
- package/build/base-component.d.ts +4 -0
- package/build/base-component.d.ts.map +1 -0
- package/build/base-component.js +2 -3
- package/build/base-component.js.map +1 -0
- package/build/base-error.d.ts +31 -0
- package/build/base-error.d.ts.map +1 -0
- package/build/base-error.js +44 -26
- package/build/base-error.js.map +1 -0
- package/build/base-model/attribute.d.ts +45 -0
- package/build/base-model/attribute.d.ts.map +1 -0
- package/build/base-model/attribute.js +49 -22
- package/build/base-model/attribute.js.map +1 -0
- package/build/base-model/column.d.ts +17 -0
- package/build/base-model/column.d.ts.map +1 -0
- package/build/base-model/column.js +15 -8
- package/build/base-model/column.js.map +1 -0
- package/build/base-model/reflection.d.ts +22 -0
- package/build/base-model/reflection.d.ts.map +1 -0
- package/build/base-model/reflection.js +22 -10
- package/build/base-model/reflection.js.map +1 -0
- package/build/base-model/scope.d.ts +9 -0
- package/build/base-model/scope.d.ts.map +1 -0
- package/build/base-model/scope.js +10 -7
- package/build/base-model/scope.js.map +1 -0
- package/build/base-model.js +1020 -812
- package/build/base-model.js.map +1 -0
- package/build/bootstrap/attribute-row.d.ts +3 -0
- package/build/bootstrap/attribute-row.d.ts.map +1 -0
- package/build/bootstrap/attribute-row.js +84 -123
- package/build/bootstrap/attribute-row.js.map +1 -0
- package/build/bootstrap/attribute-rows.d.ts +3 -0
- package/build/bootstrap/attribute-rows.d.ts.map +1 -0
- package/build/bootstrap/attribute-rows.js +17 -25
- package/build/bootstrap/attribute-rows.js.map +1 -0
- package/build/bootstrap/card.d.ts +3 -0
- package/build/bootstrap/card.d.ts.map +1 -0
- package/build/bootstrap/card.js +74 -129
- package/build/bootstrap/card.js.map +1 -0
- package/build/bootstrap/checkbox.d.ts +3 -0
- package/build/bootstrap/checkbox.d.ts.map +1 -0
- package/build/bootstrap/checkbox.js +49 -90
- package/build/bootstrap/checkbox.js.map +1 -0
- package/build/bootstrap/checkboxes.d.ts +3 -0
- package/build/bootstrap/checkboxes.d.ts.map +1 -0
- package/build/bootstrap/checkboxes.js +107 -167
- package/build/bootstrap/checkboxes.js.map +1 -0
- package/build/bootstrap/index.d.ts +1 -0
- package/build/bootstrap/index.d.ts.map +1 -0
- package/build/bootstrap/index.js +1 -2
- package/build/bootstrap/index.js.map +1 -0
- package/build/bootstrap/input.d.ts +3 -0
- package/build/bootstrap/input.d.ts.map +1 -0
- package/build/bootstrap/input.js +73 -118
- package/build/bootstrap/input.js.map +1 -0
- package/build/bootstrap/invalid-feedback.d.ts +6 -0
- package/build/bootstrap/invalid-feedback.d.ts.map +1 -0
- package/build/bootstrap/invalid-feedback.js +17 -20
- package/build/bootstrap/invalid-feedback.js.map +1 -0
- package/build/bootstrap/paginate.d.ts +3 -0
- package/build/bootstrap/paginate.d.ts.map +1 -0
- package/build/bootstrap/paginate.js +88 -136
- package/build/bootstrap/paginate.js.map +1 -0
- package/build/bootstrap/radio-buttons.d.ts +3 -0
- package/build/bootstrap/radio-buttons.d.ts.map +1 -0
- package/build/bootstrap/radio-buttons.js +44 -64
- package/build/bootstrap/radio-buttons.js.map +1 -0
- package/build/bootstrap/select.d.ts +3 -0
- package/build/bootstrap/select.d.ts.map +1 -0
- package/build/bootstrap/select.js +49 -81
- package/build/bootstrap/select.js.map +1 -0
- package/build/bootstrap/sort-link.d.ts +3 -0
- package/build/bootstrap/sort-link.d.ts.map +1 -0
- package/build/bootstrap/sort-link.js +62 -121
- package/build/bootstrap/sort-link.js.map +1 -0
- package/build/cable-connection-pool.d.ts +27 -0
- package/build/cable-connection-pool.d.ts.map +1 -0
- package/build/cable-connection-pool.js +90 -117
- package/build/cable-connection-pool.js.map +1 -0
- package/build/cable-subscription-pool.d.ts +16 -0
- package/build/cable-subscription-pool.d.ts.map +1 -0
- package/build/cable-subscription-pool.js +146 -191
- package/build/cable-subscription-pool.js.map +1 -0
- package/build/cable-subscription.d.ts +7 -0
- package/build/cable-subscription.d.ts.map +1 -0
- package/build/cable-subscription.js +15 -17
- package/build/cable-subscription.js.map +1 -0
- package/build/cache-key-generator.d.ts +15 -0
- package/build/cache-key-generator.d.ts.map +1 -0
- package/build/cache-key-generator.js +69 -70
- package/build/cache-key-generator.js.map +1 -0
- package/build/can-can.d.ts +19 -0
- package/build/can-can.d.ts.map +1 -0
- package/build/can-can.js +113 -119
- package/build/can-can.js.map +1 -0
- package/build/channels-consumer.d.ts +3 -0
- package/build/channels-consumer.d.ts.map +1 -0
- package/build/channels-consumer.js +6 -6
- package/build/channels-consumer.js.map +1 -0
- package/build/collection-loader.d.ts +3 -0
- package/build/collection-loader.d.ts.map +1 -0
- package/build/collection-loader.js +46 -40
- package/build/collection-loader.js.map +1 -0
- package/build/collection.d.ts +213 -0
- package/build/collection.d.ts.map +1 -0
- package/build/collection.js +442 -303
- package/build/collection.js.map +1 -0
- package/build/command-submit-data.d.ts +54 -0
- package/build/command-submit-data.d.ts.map +1 -0
- package/build/command-submit-data.js +108 -71
- package/build/command-submit-data.js.map +1 -0
- package/build/commands-pool.d.ts +63 -0
- package/build/commands-pool.d.ts.map +1 -0
- package/build/commands-pool.js +197 -181
- package/build/commands-pool.js.map +1 -0
- package/build/compose.d.ts +2 -0
- package/build/compose.d.ts.map +1 -0
- package/build/compose.js +8 -7
- package/build/compose.js.map +1 -0
- package/build/config.d.ts +9 -0
- package/build/config.d.ts.map +1 -0
- package/build/config.js +51 -63
- package/build/config.js.map +1 -0
- package/build/custom-error.d.ts +8 -0
- package/build/custom-error.d.ts.map +1 -0
- package/build/custom-error.js +4 -3
- package/build/custom-error.js.map +1 -0
- package/build/data-set-to-attributes.d.ts +2 -0
- package/build/data-set-to-attributes.d.ts.map +1 -0
- package/build/data-set-to-attributes.js +7 -7
- package/build/data-set-to-attributes.js.map +1 -0
- package/build/deserializer.d.ts +4 -0
- package/build/deserializer.d.ts.map +1 -0
- package/build/deserializer.js +51 -49
- package/build/deserializer.js.map +1 -0
- package/build/destroy-error.d.ts +8 -0
- package/build/destroy-error.d.ts.map +1 -0
- package/build/destroy-error.js +4 -3
- package/build/destroy-error.js.map +1 -0
- package/build/devise.d.ts +20 -0
- package/build/devise.d.ts.map +1 -0
- package/build/devise.js +104 -117
- package/build/devise.js.map +1 -0
- package/build/draggable-sort/controller.d.ts +41 -0
- package/build/draggable-sort/controller.d.ts.map +1 -0
- package/build/draggable-sort/controller.js +102 -128
- package/build/draggable-sort/controller.js.map +1 -0
- package/build/draggable-sort/index.d.ts +3 -0
- package/build/draggable-sort/index.d.ts.map +1 -0
- package/build/draggable-sort/index.js +61 -102
- package/build/draggable-sort/index.js.map +1 -0
- package/build/draggable-sort/item.d.ts +3 -0
- package/build/draggable-sort/item.d.ts.map +1 -0
- package/build/draggable-sort/item.js +122 -172
- package/build/draggable-sort/item.js.map +1 -0
- package/build/error-logger.d.ts +20 -0
- package/build/error-logger.d.ts.map +1 -0
- package/build/error-logger.js +95 -88
- package/build/error-logger.js.map +1 -0
- package/build/error-messages.d.ts +18 -0
- package/build/error-messages.d.ts.map +1 -0
- package/build/error-messages.js +22 -12
- package/build/error-messages.js.map +1 -0
- package/build/event-connection.d.ts +12 -0
- package/build/event-connection.d.ts.map +1 -0
- package/build/event-connection.js +25 -25
- package/build/event-connection.js.map +1 -0
- package/build/event-emitter-listener.d.ts +8 -0
- package/build/event-emitter-listener.d.ts.map +1 -0
- package/build/event-emitter-listener.js +8 -13
- package/build/event-emitter-listener.js.map +1 -0
- package/build/event-model-class.d.ts +9 -0
- package/build/event-model-class.d.ts.map +1 -0
- package/build/event-model-class.js +18 -18
- package/build/event-model-class.js.map +1 -0
- package/build/events.d.ts +4 -0
- package/build/events.d.ts.map +1 -0
- package/build/events.js +1 -1
- package/build/events.js.map +1 -0
- package/build/form.d.ts +14 -0
- package/build/form.d.ts.map +1 -0
- package/build/form.js +70 -86
- package/build/form.js.map +1 -0
- package/build/history-expo.d.ts +6 -0
- package/build/history-expo.d.ts.map +1 -0
- package/build/history-expo.js +10 -13
- package/build/history-expo.js.map +1 -0
- package/build/history-react-native.d.ts +6 -0
- package/build/history-react-native.d.ts.map +1 -0
- package/build/history-react-native.js +11 -13
- package/build/history-react-native.js.map +1 -0
- package/build/history.d.ts +3 -0
- package/build/history.d.ts.map +1 -0
- package/build/history.js +1 -1
- package/build/history.js.map +1 -0
- package/build/index.d.ts +2 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +1 -1
- package/build/index.js.map +1 -0
- package/build/inputs/attachment.d.ts +3 -0
- package/build/inputs/attachment.d.ts.map +1 -0
- package/build/inputs/attachment.js +67 -126
- package/build/inputs/attachment.js.map +1 -0
- package/build/inputs/auto-submit.d.ts +9 -0
- package/build/inputs/auto-submit.d.ts.map +1 -0
- package/build/inputs/auto-submit.js +27 -30
- package/build/inputs/auto-submit.js.map +1 -0
- package/build/inputs/checkbox.d.ts +3 -0
- package/build/inputs/checkbox.d.ts.map +1 -0
- package/build/inputs/checkbox.js +76 -130
- package/build/inputs/checkbox.js.map +1 -0
- package/build/inputs/checkboxes.d.ts +3 -0
- package/build/inputs/checkboxes.d.ts.map +1 -0
- package/build/inputs/checkboxes.js +67 -99
- package/build/inputs/checkboxes.js.map +1 -0
- package/build/inputs/id-for-component.d.ts +2 -0
- package/build/inputs/id-for-component.d.ts.map +1 -0
- package/build/inputs/id-for-component.js +15 -12
- package/build/inputs/id-for-component.js.map +1 -0
- package/build/inputs/input-wrapper.d.ts +3 -0
- package/build/inputs/input-wrapper.d.ts.map +1 -0
- package/build/inputs/input-wrapper.js +6 -16
- package/build/inputs/input-wrapper.js.map +1 -0
- package/build/inputs/input.d.ts +5 -0
- package/build/inputs/input.d.ts.map +1 -0
- package/build/inputs/input.js +147 -223
- package/build/inputs/input.js.map +1 -0
- package/build/inputs/money.d.ts +3 -0
- package/build/inputs/money.d.ts.map +1 -0
- package/build/inputs/money.js +116 -160
- package/build/inputs/money.js.map +1 -0
- package/build/inputs/name-for-component.d.ts +2 -0
- package/build/inputs/name-for-component.d.ts.map +1 -0
- package/build/inputs/name-for-component.js +10 -9
- package/build/inputs/name-for-component.js.map +1 -0
- package/build/inputs/select.d.ts +5 -0
- package/build/inputs/select.d.ts.map +1 -0
- package/build/inputs/select.js +62 -81
- package/build/inputs/select.js.map +1 -0
- package/build/instance-of-class-name.d.ts +3 -0
- package/build/instance-of-class-name.d.ts.map +1 -0
- package/build/instance-of-class-name.js +15 -17
- package/build/instance-of-class-name.js.map +1 -0
- package/build/is-expo.d.ts +3 -0
- package/build/is-expo.d.ts.map +1 -0
- package/build/is-expo.js +11 -17
- package/build/is-expo.js.map +1 -0
- package/build/key-value-store.d.ts +11 -0
- package/build/key-value-store.d.ts.map +1 -0
- package/build/key-value-store.js +56 -50
- package/build/key-value-store.js.map +1 -0
- package/build/link.d.ts +3 -0
- package/build/link.d.ts.map +1 -0
- package/build/link.js +49 -74
- package/build/link.js.map +1 -0
- package/build/logger.d.ts +13 -0
- package/build/logger.d.ts.map +1 -0
- package/build/logger.js +30 -26
- package/build/logger.js.map +1 -0
- package/build/merge-styles.d.ts +2 -0
- package/build/merge-styles.d.ts.map +1 -0
- package/build/merge-styles.js +10 -9
- package/build/merge-styles.js.map +1 -0
- package/build/modal.d.ts +3 -0
- package/build/modal.d.ts.map +1 -0
- package/build/modal.js +20 -34
- package/build/modal.js.map +1 -0
- package/build/model-class-require.d.ts +3 -0
- package/build/model-class-require.d.ts.map +1 -0
- package/build/model-class-require.js +10 -10
- package/build/model-class-require.js.map +1 -0
- package/build/model-events.d.ts +8 -0
- package/build/model-events.d.ts.map +1 -0
- package/build/model-events.js +27 -27
- package/build/model-events.js.map +1 -0
- package/build/model-name.d.ts +8 -0
- package/build/model-name.d.ts.map +1 -0
- package/build/model-name.js +23 -24
- package/build/model-name.js.map +1 -0
- package/build/model-prop-type.d.ts +21 -0
- package/build/model-prop-type.d.ts.map +1 -0
- package/build/model-prop-type.js +89 -91
- package/build/model-prop-type.js.map +1 -0
- package/build/model-recipes-loader.d.ts +10 -0
- package/build/model-recipes-loader.d.ts.map +1 -0
- package/build/model-recipes-loader.js +19 -28
- package/build/model-recipes-loader.js.map +1 -0
- package/build/model-recipes-model-loader.d.ts +202 -0
- package/build/model-recipes-model-loader.d.ts.map +1 -0
- package/build/model-recipes-model-loader.js +226 -344
- package/build/model-recipes-model-loader.js.map +1 -0
- package/build/models-response-reader.d.ts +9 -0
- package/build/models-response-reader.d.ts.map +1 -0
- package/build/models-response-reader.js +35 -36
- package/build/models-response-reader.js.map +1 -0
- package/build/models.d.ts +3 -0
- package/build/models.d.ts.map +1 -0
- package/build/models.js +3 -5
- package/build/models.js.map +1 -0
- package/build/money-formatter.d.ts +17 -0
- package/build/money-formatter.d.ts.map +1 -0
- package/build/money-formatter.js +74 -67
- package/build/money-formatter.js.map +1 -0
- package/build/not-loaded-error.d.ts +3 -0
- package/build/not-loaded-error.d.ts.map +1 -0
- package/build/not-loaded-error.js +3 -2
- package/build/not-loaded-error.js.map +1 -0
- package/build/params.d.ts +16 -0
- package/build/params.d.ts.map +1 -0
- package/build/params.js +58 -55
- package/build/params.js.map +1 -0
- package/build/preloaded.d.ts +8 -0
- package/build/preloaded.d.ts.map +1 -0
- package/build/preloaded.js +29 -32
- package/build/preloaded.js.map +1 -0
- package/build/resize-observer.d.ts +3 -0
- package/build/resize-observer.d.ts.map +1 -0
- package/build/resize-observer.js +6 -9
- package/build/resize-observer.js.map +1 -0
- package/build/rest-props-validator.d.ts +3 -0
- package/build/rest-props-validator.d.ts.map +1 -0
- package/build/rest-props-validator.js +6 -6
- package/build/rest-props-validator.js.map +1 -0
- package/build/result.d.ts +38 -0
- package/build/result.d.ts.map +1 -0
- package/build/result.js +37 -11
- package/build/result.js.map +1 -0
- package/build/router/route.d.ts +8 -0
- package/build/router/route.d.ts.map +1 -0
- package/build/router/route.js +174 -251
- package/build/router/route.js.map +1 -0
- package/build/router/switch.d.ts +4 -0
- package/build/router/switch.d.ts.map +1 -0
- package/build/router/switch.js +50 -62
- package/build/router/switch.js.map +1 -0
- package/build/router.d.ts +3 -0
- package/build/router.d.ts.map +1 -0
- package/build/router.js +30 -53
- package/build/router.js.map +1 -0
- package/build/routes-native.d.ts +24 -0
- package/build/routes-native.d.ts.map +1 -0
- package/build/routes-native.js +140 -189
- package/build/routes-native.js.map +1 -0
- package/build/routes.d.ts +10 -0
- package/build/routes.d.ts.map +1 -0
- package/build/routes.js +44 -44
- package/build/routes.js.map +1 -0
- package/build/run-last.d.ts +12 -0
- package/build/run-last.d.ts.map +1 -0
- package/build/run-last.js +32 -31
- package/build/run-last.js.map +1 -0
- package/build/serializer.d.ts +10 -0
- package/build/serializer.d.ts.map +1 -0
- package/build/serializer.js +64 -58
- package/build/serializer.js.map +1 -0
- package/build/services.d.ts +5 -0
- package/build/services.d.ts.map +1 -0
- package/build/services.js +18 -17
- package/build/services.js.map +1 -0
- package/build/session-status-updater.d.ts +21 -0
- package/build/session-status-updater.d.ts.map +1 -0
- package/build/session-status-updater.js +116 -118
- package/build/session-status-updater.js.map +1 -0
- package/build/source-maps-loader.d.ts +37 -0
- package/build/source-maps-loader.d.ts.map +1 -0
- package/build/source-maps-loader.js +146 -165
- package/build/source-maps-loader.js.map +1 -0
- package/build/super-admin/config-reader.d.ts +23 -0
- package/build/super-admin/config-reader.d.ts.map +1 -0
- package/build/super-admin/config-reader.js +68 -75
- package/build/super-admin/config-reader.js.map +1 -0
- package/build/super-admin/edit-page/edit-attribute-checkbox.d.ts +3 -0
- package/build/super-admin/edit-page/edit-attribute-checkbox.d.ts.map +1 -0
- package/build/super-admin/edit-page/edit-attribute-checkbox.js +45 -72
- package/build/super-admin/edit-page/edit-attribute-checkbox.js.map +1 -0
- package/build/super-admin/edit-page/edit-attribute-content.d.ts +3 -0
- package/build/super-admin/edit-page/edit-attribute-content.d.ts.map +1 -0
- package/build/super-admin/edit-page/edit-attribute-content.js +40 -46
- package/build/super-admin/edit-page/edit-attribute-content.js.map +1 -0
- package/build/super-admin/edit-page/edit-attribute-input.d.ts +3 -0
- package/build/super-admin/edit-page/edit-attribute-input.d.ts.map +1 -0
- package/build/super-admin/edit-page/edit-attribute-input.js +48 -68
- package/build/super-admin/edit-page/edit-attribute-input.js.map +1 -0
- package/build/super-admin/edit-page/edit-attribute.d.ts +3 -0
- package/build/super-admin/edit-page/edit-attribute.d.ts.map +1 -0
- package/build/super-admin/edit-page/edit-attribute.js +30 -65
- package/build/super-admin/edit-page/edit-attribute.js.map +1 -0
- package/build/super-admin/edit-page.d.ts +3 -0
- package/build/super-admin/edit-page.d.ts.map +1 -0
- package/build/super-admin/edit-page.js +75 -106
- package/build/super-admin/edit-page.js.map +1 -0
- package/build/super-admin/has-edit-config.d.ts +3 -0
- package/build/super-admin/has-edit-config.d.ts.map +1 -0
- package/build/super-admin/has-edit-config.js +10 -10
- package/build/super-admin/has-edit-config.js.map +1 -0
- package/build/super-admin/index-page.d.ts +3 -0
- package/build/super-admin/index-page.d.ts.map +1 -0
- package/build/super-admin/index-page.js +12 -19
- package/build/super-admin/index-page.js.map +1 -0
- package/build/super-admin/index.d.ts +3 -0
- package/build/super-admin/index.d.ts.map +1 -0
- package/build/super-admin/index.js +120 -173
- package/build/super-admin/index.js.map +1 -0
- package/build/super-admin/layout/header/index.d.ts +3 -0
- package/build/super-admin/layout/header/index.d.ts.map +1 -0
- package/build/super-admin/layout/header/index.js +84 -146
- package/build/super-admin/layout/header/index.js.map +1 -0
- package/build/super-admin/layout/index.d.ts +3 -0
- package/build/super-admin/layout/index.d.ts.map +1 -0
- package/build/super-admin/layout/index.js +87 -147
- package/build/super-admin/layout/index.js.map +1 -0
- package/build/super-admin/layout/menu/index.d.ts +3 -0
- package/build/super-admin/layout/menu/index.d.ts.map +1 -0
- package/build/super-admin/layout/menu/index.js +98 -186
- package/build/super-admin/layout/menu/index.js.map +1 -0
- package/build/super-admin/layout/menu/menu-content.d.ts +3 -0
- package/build/super-admin/layout/menu/menu-content.d.ts.map +1 -0
- package/build/super-admin/layout/menu/menu-content.js +19 -38
- package/build/super-admin/layout/menu/menu-content.js.map +1 -0
- package/build/super-admin/layout/menu/menu-item.d.ts +3 -0
- package/build/super-admin/layout/menu/menu-item.d.ts.map +1 -0
- package/build/super-admin/layout/menu/menu-item.js +46 -75
- package/build/super-admin/layout/menu/menu-item.js.map +1 -0
- package/build/super-admin/layout/no-access.d.ts +3 -0
- package/build/super-admin/layout/no-access.d.ts.map +1 -0
- package/build/super-admin/layout/no-access.js +15 -22
- package/build/super-admin/layout/no-access.js.map +1 -0
- package/build/super-admin/model-class-table.d.ts +3 -0
- package/build/super-admin/model-class-table.d.ts.map +1 -0
- package/build/super-admin/model-class-table.js +42 -54
- package/build/super-admin/model-class-table.js.map +1 -0
- package/build/super-admin/models.d.ts +3 -0
- package/build/super-admin/models.d.ts.map +1 -0
- package/build/super-admin/models.js +4 -4
- package/build/super-admin/models.js.map +1 -0
- package/build/super-admin/show-nav.d.ts +3 -0
- package/build/super-admin/show-nav.d.ts.map +1 -0
- package/build/super-admin/show-nav.js +19 -42
- package/build/super-admin/show-nav.js.map +1 -0
- package/build/super-admin/show-page/belongs-to-attribute-row.d.ts +3 -0
- package/build/super-admin/show-page/belongs-to-attribute-row.d.ts.map +1 -0
- package/build/super-admin/show-page/belongs-to-attribute-row.js +13 -22
- package/build/super-admin/show-page/belongs-to-attribute-row.js.map +1 -0
- package/build/super-admin/show-page/index.d.ts +3 -0
- package/build/super-admin/show-page/index.d.ts.map +1 -0
- package/build/super-admin/show-page/index.js +105 -126
- package/build/super-admin/show-page/index.js.map +1 -0
- package/build/super-admin/show-reflection-actions.d.ts +3 -0
- package/build/super-admin/show-reflection-actions.d.ts.map +1 -0
- package/build/super-admin/show-reflection-actions.js +33 -44
- package/build/super-admin/show-reflection-actions.js.map +1 -0
- package/build/super-admin/show-reflection-link.d.ts +3 -0
- package/build/super-admin/show-reflection-link.d.ts.map +1 -0
- package/build/super-admin/show-reflection-link.js +23 -41
- package/build/super-admin/show-reflection-link.js.map +1 -0
- package/build/super-admin/show-reflection-page.d.ts +3 -0
- package/build/super-admin/show-reflection-page.d.ts.map +1 -0
- package/build/super-admin/show-reflection-page.js +26 -40
- package/build/super-admin/show-reflection-page.js.map +1 -0
- package/build/table/column-content.d.ts +25 -0
- package/build/table/column-content.d.ts.map +1 -0
- package/build/table/column-content.js +101 -107
- package/build/table/column-content.js.map +1 -0
- package/build/table/column-identifier.d.ts +2 -0
- package/build/table/column-identifier.d.ts.map +1 -0
- package/build/table/column-identifier.js +17 -15
- package/build/table/column-identifier.js.map +1 -0
- package/build/table/column-visible.d.ts +2 -0
- package/build/table/column-visible.d.ts.map +1 -0
- package/build/table/column-visible.js +8 -5
- package/build/table/column-visible.js.map +1 -0
- package/build/table/components/column.d.ts +3 -0
- package/build/table/components/column.d.ts.map +1 -0
- package/build/table/components/column.js +11 -18
- package/build/table/components/column.js.map +1 -0
- package/build/table/components/flat-list.d.ts +3 -0
- package/build/table/components/flat-list.d.ts.map +1 -0
- package/build/table/components/flat-list.js +10 -17
- package/build/table/components/flat-list.js.map +1 -0
- package/build/table/components/header.d.ts +3 -0
- package/build/table/components/header.d.ts.map +1 -0
- package/build/table/components/header.js +11 -21
- package/build/table/components/header.js.map +1 -0
- package/build/table/components/row.d.ts +3 -0
- package/build/table/components/row.d.ts.map +1 -0
- package/build/table/components/row.js +14 -22
- package/build/table/components/row.js.map +1 -0
- package/build/table/filters/attribute-element.d.ts +3 -0
- package/build/table/filters/attribute-element.d.ts.map +1 -0
- package/build/table/filters/attribute-element.js +26 -35
- package/build/table/filters/attribute-element.js.map +1 -0
- package/build/table/filters/filter-form.d.ts +3 -0
- package/build/table/filters/filter-form.d.ts.map +1 -0
- package/build/table/filters/filter-form.js +261 -428
- package/build/table/filters/filter-form.js.map +1 -0
- package/build/table/filters/filter.d.ts +3 -0
- package/build/table/filters/filter.d.ts.map +1 -0
- package/build/table/filters/filter.js +38 -81
- package/build/table/filters/filter.js.map +1 -0
- package/build/table/filters/index.d.ts +3 -0
- package/build/table/filters/index.d.ts.map +1 -0
- package/build/table/filters/index.js +87 -176
- package/build/table/filters/index.js.map +1 -0
- package/build/table/filters/load-search-modal.d.ts +3 -0
- package/build/table/filters/load-search-modal.d.ts.map +1 -0
- package/build/table/filters/load-search-modal.js +79 -162
- package/build/table/filters/load-search-modal.js.map +1 -0
- package/build/table/filters/reflection-element.d.ts +3 -0
- package/build/table/filters/reflection-element.d.ts.map +1 -0
- package/build/table/filters/reflection-element.js +20 -30
- package/build/table/filters/reflection-element.js.map +1 -0
- package/build/table/filters/save-search-modal.d.ts +3 -0
- package/build/table/filters/save-search-modal.d.ts.map +1 -0
- package/build/table/filters/save-search-modal.js +36 -77
- package/build/table/filters/save-search-modal.js.map +1 -0
- package/build/table/filters/scope-element.d.ts +3 -0
- package/build/table/filters/scope-element.d.ts.map +1 -0
- package/build/table/filters/scope-element.js +24 -36
- package/build/table/filters/scope-element.js.map +1 -0
- package/build/table/header-column-content.d.ts +3 -0
- package/build/table/header-column-content.d.ts.map +1 -0
- package/build/table/header-column-content.js +24 -59
- package/build/table/header-column-content.js.map +1 -0
- package/build/table/header-column.d.ts +3 -0
- package/build/table/header-column.d.ts.map +1 -0
- package/build/table/header-column.js +80 -132
- package/build/table/header-column.js.map +1 -0
- package/build/table/header-select.d.ts +3 -0
- package/build/table/header-select.d.ts.map +1 -0
- package/build/table/header-select.js +35 -95
- package/build/table/header-select.js.map +1 -0
- package/build/table/model-callback-args.d.ts +4 -0
- package/build/table/model-callback-args.d.ts.map +1 -0
- package/build/table/model-callback-args.js +5 -7
- package/build/table/model-callback-args.js.map +1 -0
- package/build/table/model-column.d.ts +3 -0
- package/build/table/model-column.d.ts.map +1 -0
- package/build/table/model-column.js +49 -88
- package/build/table/model-column.js.map +1 -0
- package/build/table/model-row.d.ts +3 -0
- package/build/table/model-row.d.ts.map +1 -0
- package/build/table/model-row.js +60 -174
- package/build/table/model-row.js.map +1 -0
- package/build/table/select-calculator.d.ts +2 -0
- package/build/table/select-calculator.d.ts.map +1 -0
- package/build/table/select-calculator.js +46 -54
- package/build/table/select-calculator.js.map +1 -0
- package/build/table/settings/column-row.d.ts +3 -0
- package/build/table/settings/column-row.d.ts.map +1 -0
- package/build/table/settings/column-row.js +60 -87
- package/build/table/settings/column-row.js.map +1 -0
- package/build/table/settings/download-action.d.ts +3 -0
- package/build/table/settings/download-action.d.ts.map +1 -0
- package/build/table/settings/download-action.js +27 -73
- package/build/table/settings/download-action.js.map +1 -0
- package/build/table/settings/index.d.ts +3 -0
- package/build/table/settings/index.d.ts.map +1 -0
- package/build/table/settings/index.js +29 -85
- package/build/table/settings/index.js.map +1 -0
- package/build/table/table-settings.d.ts +35 -0
- package/build/table/table-settings.d.ts.map +1 -0
- package/build/table/table-settings.js +187 -195
- package/build/table/table-settings.js.map +1 -0
- package/build/table/table.d.ts +3 -0
- package/build/table/table.d.ts.map +1 -0
- package/build/table/table.js +557 -918
- package/build/table/table.js.map +1 -0
- package/build/table/use-sorting.d.ts +21 -0
- package/build/table/use-sorting.d.ts.map +1 -0
- package/build/table/use-sorting.js +40 -31
- package/build/table/use-sorting.js.map +1 -0
- package/build/table/widths.d.ts +18 -0
- package/build/table/widths.d.ts.map +1 -0
- package/build/table/widths.js +63 -68
- package/build/table/widths.js.map +1 -0
- package/build/table/worker-plugins-check-all-checkbox.d.ts +3 -0
- package/build/table/worker-plugins-check-all-checkbox.d.ts.map +1 -0
- package/build/table/worker-plugins-check-all-checkbox.js +73 -112
- package/build/table/worker-plugins-check-all-checkbox.js.map +1 -0
- package/build/table/worker-plugins-checkbox.d.ts +3 -0
- package/build/table/worker-plugins-checkbox.d.ts.map +1 -0
- package/build/table/worker-plugins-checkbox.js +66 -103
- package/build/table/worker-plugins-checkbox.js.map +1 -0
- package/build/translated-attributes.d.ts +2 -0
- package/build/translated-attributes.d.ts.map +1 -0
- package/build/translated-attributes.js +7 -7
- package/build/translated-attributes.js.map +1 -0
- package/build/translated-collections.d.ts +4 -0
- package/build/translated-collections.d.ts.map +1 -0
- package/build/translated-collections.js +8 -7
- package/build/translated-collections.js.map +1 -0
- package/build/updated-attribute.d.ts +15 -0
- package/build/updated-attribute.d.ts.map +1 -0
- package/build/updated-attribute.js +66 -67
- package/build/updated-attribute.js.map +1 -0
- package/build/url-encode.d.ts +6 -0
- package/build/url-encode.d.ts.map +1 -0
- package/build/url-encode.js +14 -11
- package/build/url-encode.js.map +1 -0
- package/build/use-breakpoint.d.ts +3 -0
- package/build/use-breakpoint.d.ts.map +1 -0
- package/build/use-breakpoint.js +71 -72
- package/build/use-breakpoint.js.map +1 -0
- package/build/use-can-can.d.ts +8 -0
- package/build/use-can-can.d.ts.map +1 -0
- package/build/use-can-can.js +45 -52
- package/build/use-can-can.js.map +1 -0
- package/build/use-collection.d.ts +73 -0
- package/build/use-collection.d.ts.map +1 -0
- package/build/use-collection.js +253 -212
- package/build/use-collection.js.map +1 -0
- package/build/use-created-event.d.ts +19 -0
- package/build/use-created-event.d.ts.map +1 -0
- package/build/use-created-event.js +50 -44
- package/build/use-created-event.js.map +1 -0
- package/build/use-current-user-context.d.ts +12 -0
- package/build/use-current-user-context.d.ts.map +1 -0
- package/build/use-current-user-context.js +94 -0
- package/build/use-current-user-context.js.map +1 -0
- package/build/use-current-user.d.ts +14 -0
- package/build/use-current-user.d.ts.map +1 -0
- package/build/use-current-user.js +21 -115
- package/build/use-current-user.js.map +1 -0
- package/build/use-destroyed-event.d.ts +16 -0
- package/build/use-destroyed-event.d.ts.map +1 -0
- package/build/use-destroyed-event.js +53 -54
- package/build/use-destroyed-event.js.map +1 -0
- package/build/use-event-emitter.d.ts +9 -0
- package/build/use-event-emitter.d.ts.map +1 -0
- package/build/use-event-emitter.js +24 -22
- package/build/use-event-emitter.js.map +1 -0
- package/build/use-event-listener.d.ts +9 -0
- package/build/use-event-listener.d.ts.map +1 -0
- package/build/use-event-listener.js +24 -18
- package/build/use-event-listener.js.map +1 -0
- package/build/use-input.d.ts +31 -0
- package/build/use-input.d.ts.map +1 -0
- package/build/use-input.js +142 -130
- package/build/use-input.js.map +1 -0
- package/build/use-model-event.d.ts +17 -0
- package/build/use-model-event.d.ts.map +1 -0
- package/build/use-model-event.js +54 -54
- package/build/use-model-event.js.map +1 -0
- package/build/use-model.d.ts +30 -0
- package/build/use-model.d.ts.map +1 -0
- package/build/use-model.js +153 -156
- package/build/use-model.js.map +1 -0
- package/build/use-resize-observer.d.ts +8 -0
- package/build/use-resize-observer.d.ts.map +1 -0
- package/build/use-resize-observer.js +22 -19
- package/build/use-resize-observer.js.map +1 -0
- package/build/use-router.d.ts +8 -0
- package/build/use-router.d.ts.map +1 -0
- package/build/use-router.js +84 -93
- package/build/use-router.js.map +1 -0
- package/build/use-screen-layout.d.ts +3 -0
- package/build/use-screen-layout.d.ts.map +1 -0
- package/build/use-screen-layout.js +41 -34
- package/build/use-screen-layout.js.map +1 -0
- package/build/use-styles.d.ts +2 -0
- package/build/use-styles.d.ts.map +1 -0
- package/build/use-styles.js +48 -47
- package/build/use-styles.js.map +1 -0
- package/build/use-updated-event.d.ts +16 -0
- package/build/use-updated-event.d.ts.map +1 -0
- package/build/use-updated-event.js +53 -54
- package/build/use-updated-event.js.map +1 -0
- package/build/use-validation-errors.d.ts +7 -0
- package/build/use-validation-errors.d.ts.map +1 -0
- package/build/use-validation-errors.js +27 -27
- package/build/use-validation-errors.js.map +1 -0
- package/build/utils/button.d.ts +3 -0
- package/build/utils/button.d.ts.map +1 -0
- package/build/utils/button.js +83 -113
- package/build/utils/button.js.map +1 -0
- package/build/utils/card.d.ts +3 -0
- package/build/utils/card.d.ts.map +1 -0
- package/build/utils/card.js +25 -48
- package/build/utils/card.js.map +1 -0
- package/build/utils/checkbox.d.ts +3 -0
- package/build/utils/checkbox.d.ts.map +1 -0
- package/build/utils/checkbox.js +44 -69
- package/build/utils/checkbox.js.map +1 -0
- package/build/utils/checkboxes.d.ts +3 -0
- package/build/utils/checkboxes.d.ts.map +1 -0
- package/build/utils/checkboxes.js +95 -143
- package/build/utils/checkboxes.js.map +1 -0
- package/build/utils/default-style.d.ts +7 -0
- package/build/utils/default-style.d.ts.map +1 -0
- package/build/utils/default-style.js +51 -58
- package/build/utils/default-style.js.map +1 -0
- package/build/utils/header.d.ts +3 -0
- package/build/utils/header.d.ts.map +1 -0
- package/build/utils/header.js +8 -17
- package/build/utils/header.js.map +1 -0
- package/build/utils/icon.d.ts +3 -0
- package/build/utils/icon.d.ts.map +1 -0
- package/build/utils/icon.js +68 -87
- package/build/utils/icon.js.map +1 -0
- package/build/utils/invalid-feedback.d.ts +3 -0
- package/build/utils/invalid-feedback.d.ts.map +1 -0
- package/build/utils/invalid-feedback.js +10 -13
- package/build/utils/invalid-feedback.js.map +1 -0
- package/build/utils/modal.d.ts +3 -0
- package/build/utils/modal.d.ts.map +1 -0
- package/build/utils/modal.js +30 -56
- package/build/utils/modal.js.map +1 -0
- package/build/utils/text.d.ts +3 -0
- package/build/utils/text.d.ts.map +1 -0
- package/build/utils/text.js +7 -17
- package/build/utils/text.js.map +1 -0
- package/build/validation-error.d.ts +18 -0
- package/build/validation-error.d.ts.map +1 -0
- package/build/validation-error.js +34 -25
- package/build/validation-error.js.map +1 -0
- package/build/validation-errors.d.ts +58 -0
- package/build/validation-errors.d.ts.map +1 -0
- package/build/validation-errors.js +107 -87
- package/build/validation-errors.js.map +1 -0
- package/build/with-api-maker.d.ts +3 -0
- package/build/with-api-maker.d.ts.map +1 -0
- package/build/with-api-maker.js +18 -24
- package/build/with-api-maker.js.map +1 -0
- package/build/with-collection.d.ts +3 -0
- package/build/with-collection.d.ts.map +1 -0
- package/build/with-collection.js +11 -10
- package/build/with-collection.js.map +1 -0
- package/build/with-current-user.d.ts +3 -0
- package/build/with-current-user.d.ts.map +1 -0
- package/build/with-current-user.js +6 -8
- package/build/with-current-user.js.map +1 -0
- package/build/with-model.d.ts +3 -0
- package/build/with-model.d.ts.map +1 -0
- package/build/with-model.js +10 -12
- package/build/with-model.js.map +1 -0
- package/build/with-router.d.ts +3 -0
- package/build/with-router.d.ts.map +1 -0
- package/build/with-router.js +7 -20
- package/build/with-router.js.map +1 -0
- package/package.json +14 -8
- package/.eslintrc.js +0 -357
- package/android/build.gradle +0 -43
- package/android/src/main/AndroidManifest.xml +0 -2
- package/android/src/main/java/expo/modules/api_maker/ApiMakerModule.kt +0 -50
- package/android/src/main/java/expo/modules/api_maker/ApiMakerView.kt +0 -30
- package/expo-module.config.json +0 -17
- package/ios/ApiMaker.podspec +0 -29
- package/ios/ApiMakerModule.swift +0 -48
- package/ios/ApiMakerView.swift +0 -38
- package/src/api.js +0 -109
- package/src/attribute-not-loaded-error.js +0 -1
- package/src/base-component.jsx +0 -5
- package/src/base-error.js +0 -38
- package/src/base-model/attribute.js +0 -33
- package/src/base-model/column.js +0 -13
- package/src/base-model/reflection.js +0 -15
- package/src/base-model/scope.js +0 -12
- package/src/base-model.js +0 -1001
- package/src/bootstrap/attribute-row.jsx +0 -134
- package/src/bootstrap/attribute-rows.jsx +0 -27
- package/src/bootstrap/card.jsx +0 -149
- package/src/bootstrap/checkbox.jsx +0 -86
- package/src/bootstrap/checkboxes.jsx +0 -185
- package/src/bootstrap/index.js +0 -0
- package/src/bootstrap/input.jsx +0 -173
- package/src/bootstrap/invalid-feedback.jsx +0 -31
- package/src/bootstrap/paginate.jsx +0 -187
- package/src/bootstrap/radio-buttons.jsx +0 -87
- package/src/bootstrap/select.jsx +0 -110
- package/src/bootstrap/sort-link.jsx +0 -106
- package/src/cable-connection-pool.js +0 -127
- package/src/cable-subscription-pool.js +0 -189
- package/src/cable-subscription.js +0 -23
- package/src/cache-key-generator.js +0 -100
- package/src/can-can.js +0 -158
- package/src/channels-consumer.js +0 -10
- package/src/collection-loader.jsx +0 -60
- package/src/collection.js +0 -346
- package/src/command-submit-data.js +0 -103
- package/src/commands-pool.js +0 -212
- package/src/compose.js +0 -11
- package/src/config.js +0 -71
- package/src/custom-error.js +0 -7
- package/src/data-set-to-attributes.js +0 -13
- package/src/deserializer.js +0 -60
- package/src/destroy-error.js +0 -7
- package/src/devise.js +0 -151
- package/src/draggable-sort/controller.js +0 -137
- package/src/draggable-sort/index.jsx +0 -107
- package/src/draggable-sort/item.jsx +0 -171
- package/src/error-logger.js +0 -111
- package/src/error-messages.js +0 -15
- package/src/event-connection.jsx +0 -37
- package/src/event-emitter-listener.jsx +0 -13
- package/src/event-model-class.jsx +0 -28
- package/src/events.js +0 -7
- package/src/form.jsx +0 -110
- package/src/history-expo.js +0 -23
- package/src/history-react-native.js +0 -25
- package/src/history.js +0 -3
- package/src/index.js +0 -3
- package/src/inputs/attachment.jsx +0 -108
- package/src/inputs/auto-submit.js +0 -37
- package/src/inputs/checkbox.jsx +0 -125
- package/src/inputs/checkboxes.jsx +0 -116
- package/src/inputs/id-for-component.js +0 -15
- package/src/inputs/input-wrapper.jsx +0 -16
- package/src/inputs/input.jsx +0 -260
- package/src/inputs/money.jsx +0 -179
- package/src/inputs/name-for-component.js +0 -15
- package/src/inputs/select.jsx +0 -104
- package/src/instance-of-class-name.js +0 -29
- package/src/is-expo.js +0 -18
- package/src/key-value-store.js +0 -68
- package/src/link.jsx +0 -77
- package/src/logger.js +0 -38
- package/src/merge-styles.js +0 -15
- package/src/modal.jsx +0 -37
- package/src/model-class-require.js +0 -17
- package/src/model-events.js +0 -39
- package/src/model-name.js +0 -33
- package/src/model-prop-type.js +0 -124
- package/src/model-recipes-loader.js +0 -28
- package/src/model-recipes-model-loader.js +0 -350
- package/src/models-response-reader.js +0 -48
- package/src/models.js +0 -7
- package/src/models.js.erb +0 -19
- package/src/money-formatter.js +0 -100
- package/src/not-loaded-error.js +0 -1
- package/src/params.js +0 -66
- package/src/preloaded.js +0 -43
- package/src/resize-observer.jsx +0 -10
- package/src/rest-props-validator.js +0 -9
- package/src/result.js +0 -13
- package/src/router/route.jsx +0 -246
- package/src/router/switch.jsx +0 -76
- package/src/router.jsx +0 -47
- package/src/routes-native.js +0 -173
- package/src/routes.js +0 -58
- package/src/run-last.js +0 -39
- package/src/serializer.js +0 -76
- package/src/services.js +0 -23
- package/src/session-status-updater.js +0 -172
- package/src/source-maps-loader.js +0 -203
- package/src/super-admin/config-reader.jsx +0 -93
- package/src/super-admin/edit-page/edit-attribute-checkbox.jsx +0 -84
- package/src/super-admin/edit-page/edit-attribute-content.jsx +0 -57
- package/src/super-admin/edit-page/edit-attribute-input.jsx +0 -79
- package/src/super-admin/edit-page/edit-attribute.jsx +0 -84
- package/src/super-admin/edit-page.jsx +0 -117
- package/src/super-admin/has-edit-config.js +0 -15
- package/src/super-admin/index-page.jsx +0 -23
- package/src/super-admin/index.jsx +0 -219
- package/src/super-admin/layout/header/index.jsx +0 -144
- package/src/super-admin/layout/header/style.scss +0 -45
- package/src/super-admin/layout/index.jsx +0 -154
- package/src/super-admin/layout/menu/index.jsx +0 -173
- package/src/super-admin/layout/menu/menu-content.jsx +0 -43
- package/src/super-admin/layout/menu/menu-item.jsx +0 -70
- package/src/super-admin/layout/menu/style.scss +0 -11
- package/src/super-admin/layout/no-access.jsx +0 -26
- package/src/super-admin/model-class-table.jsx +0 -66
- package/src/super-admin/models.js +0 -11
- package/src/super-admin/show-nav.jsx +0 -45
- package/src/super-admin/show-page/belongs-to-attribute-row.jsx +0 -30
- package/src/super-admin/show-page/index.jsx +0 -141
- package/src/super-admin/show-reflection-actions.jsx +0 -55
- package/src/super-admin/show-reflection-link.jsx +0 -40
- package/src/super-admin/show-reflection-page.jsx +0 -50
- package/src/super-admin/stylesheets/variables.scss +0 -11
- package/src/table/column-content.jsx +0 -122
- package/src/table/column-identifier.js +0 -23
- package/src/table/column-visible.js +0 -7
- package/src/table/components/column.jsx +0 -19
- package/src/table/components/flat-list.jsx +0 -19
- package/src/table/components/header.jsx +0 -21
- package/src/table/components/row.jsx +0 -23
- package/src/table/filters/attribute-element.jsx +0 -47
- package/src/table/filters/filter-form.jsx +0 -448
- package/src/table/filters/filter.jsx +0 -74
- package/src/table/filters/index.jsx +0 -171
- package/src/table/filters/load-search-modal.jsx +0 -157
- package/src/table/filters/reflection-element.jsx +0 -38
- package/src/table/filters/save-search-modal.jsx +0 -74
- package/src/table/filters/scope-element.jsx +0 -44
- package/src/table/header-column-content.jsx +0 -55
- package/src/table/header-column.jsx +0 -129
- package/src/table/header-select.jsx +0 -78
- package/src/table/model-callback-args.js +0 -10
- package/src/table/model-column.jsx +0 -86
- package/src/table/model-row.jsx +0 -140
- package/src/table/select-calculator.js +0 -65
- package/src/table/settings/column-row.jsx +0 -93
- package/src/table/settings/download-action.jsx +0 -73
- package/src/table/settings/index.jsx +0 -66
- package/src/table/table-settings.js +0 -262
- package/src/table/table.jsx +0 -957
- package/src/table/use-sorting.js +0 -35
- package/src/table/variables.scss +0 -11
- package/src/table/widths.jsx +0 -87
- package/src/table/worker-plugins-check-all-checkbox.jsx +0 -112
- package/src/table/worker-plugins-checkbox.jsx +0 -104
- package/src/translated-attributes.js +0 -11
- package/src/translated-collections-data.js.erb +0 -5
- package/src/translated-collections.js +0 -13
- package/src/updated-attribute.jsx +0 -93
- package/src/url-encode.js +0 -18
- package/src/use-breakpoint.js +0 -100
- package/src/use-can-can.js +0 -55
- package/src/use-collection.js +0 -280
- package/src/use-created-event.js +0 -55
- package/src/use-current-user.js +0 -133
- package/src/use-destroyed-event.js +0 -60
- package/src/use-event-emitter.js +0 -25
- package/src/use-event-listener.js +0 -23
- package/src/use-input.js +0 -159
- package/src/use-model-event.js +0 -60
- package/src/use-model.js +0 -189
- package/src/use-resize-observer.js +0 -24
- package/src/use-router.jsx +0 -128
- package/src/use-screen-layout.js +0 -49
- package/src/use-styles.js +0 -66
- package/src/use-updated-event.js +0 -60
- package/src/use-validation-errors.js +0 -33
- package/src/utils/button.jsx +0 -127
- package/src/utils/card.jsx +0 -58
- package/src/utils/checkbox.jsx +0 -73
- package/src/utils/checkboxes.jsx +0 -157
- package/src/utils/default-style.jsx +0 -80
- package/src/utils/header.jsx +0 -14
- package/src/utils/icon.jsx +0 -81
- package/src/utils/invalid-feedback.jsx +0 -20
- package/src/utils/modal.jsx +0 -64
- package/src/utils/text.jsx +0 -15
- package/src/validation-error.js +0 -35
- package/src/validation-errors.js +0 -121
- package/src/with-api-maker.jsx +0 -31
- package/src/with-collection.jsx +0 -17
- package/src/with-current-user.jsx +0 -10
- package/src/with-model.jsx +0 -16
- package/src/with-router.jsx +0 -11
package/src/collection.js
DELETED
|
@@ -1,346 +0,0 @@
|
|
|
1
|
-
import cloneDeep from "clone-deep"
|
|
2
|
-
import CommandsPool from "./commands-pool"
|
|
3
|
-
import {digg} from "diggerize"
|
|
4
|
-
import * as inflection from "inflection"
|
|
5
|
-
import {incorporate} from "incorporator"
|
|
6
|
-
import modelClassRequire from "./model-class-require"
|
|
7
|
-
import Result from "./result"
|
|
8
|
-
import uniqunize from "uniqunize"
|
|
9
|
-
|
|
10
|
-
export default class ApiMakerCollection {
|
|
11
|
-
static apiMakerType = "Collection"
|
|
12
|
-
|
|
13
|
-
constructor(args, queryArgs = {}) {
|
|
14
|
-
this.queryArgs = queryArgs
|
|
15
|
-
this.args = args
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
abilities(originalAbilities) {
|
|
19
|
-
const newAbilities = {}
|
|
20
|
-
|
|
21
|
-
for (const originalAbilityName in originalAbilities) {
|
|
22
|
-
const newModelName = inflection.underscore(originalAbilityName)
|
|
23
|
-
const newValues = []
|
|
24
|
-
const originalValues = originalAbilities[originalAbilityName]
|
|
25
|
-
|
|
26
|
-
for (const originalAbilityName of originalValues) {
|
|
27
|
-
const newAbilityName = inflection.underscore(originalAbilityName)
|
|
28
|
-
newValues.push(newAbilityName)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
newAbilities[newModelName] = newValues
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return this._merge({abilities: newAbilities})
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
accessibleBy(abilityName) {
|
|
38
|
-
return this._merge({accessibleBy: inflection.underscore(abilityName)})
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
async count() {
|
|
42
|
-
const response = await this.clone()._merge({count: true})._response()
|
|
43
|
-
|
|
44
|
-
return digg(response, "count")
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
distinct() {
|
|
48
|
-
return this._merge({distinct: true})
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
async each(callback) {
|
|
52
|
-
const array = await this.toArray()
|
|
53
|
-
|
|
54
|
-
for (const model in array) {
|
|
55
|
-
callback.call(model)
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
except(...keys) {
|
|
60
|
-
for (const key of keys) {
|
|
61
|
-
if (key == "page") {
|
|
62
|
-
delete this.queryArgs[key]
|
|
63
|
-
} else {
|
|
64
|
-
throw new Error(`Unhandled key: ${key}`)
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
return this
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
async first() {
|
|
72
|
-
const models = await this.toArray()
|
|
73
|
-
return models[0]
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
groupBy(...arrayOfTablesAndColumns) {
|
|
77
|
-
const arrayOfTablesAndColumnsWithLowercaseColumns = arrayOfTablesAndColumns.map((tableAndColumn) => {
|
|
78
|
-
if (Array.isArray(tableAndColumn)) {
|
|
79
|
-
return [tableAndColumn[0], tableAndColumn[1].toLowerCase()]
|
|
80
|
-
} else {
|
|
81
|
-
return tableAndColumn.toLowerCase()
|
|
82
|
-
}
|
|
83
|
-
})
|
|
84
|
-
const currentGroupBy = this.queryArgs.groupBy || []
|
|
85
|
-
const newGroupBy = currentGroupBy.concat(arrayOfTablesAndColumnsWithLowercaseColumns)
|
|
86
|
-
|
|
87
|
-
return this._merge({
|
|
88
|
-
groupBy: newGroupBy
|
|
89
|
-
})
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
async ensureLoaded() {
|
|
93
|
-
if (!this.isLoaded()) {
|
|
94
|
-
const models = await this.toArray()
|
|
95
|
-
|
|
96
|
-
this.set(models)
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return this.loaded()
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
isLoaded() {
|
|
103
|
-
const {model, reflectionName} = this.args
|
|
104
|
-
|
|
105
|
-
if (reflectionName in model.relationshipsCache) {
|
|
106
|
-
return true
|
|
107
|
-
} else if (reflectionName in model.relationships) {
|
|
108
|
-
return true
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
return false
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
limit(amount) {
|
|
115
|
-
return this._merge({limit: amount})
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
preloaded() {
|
|
119
|
-
if (!(this.args.reflectionName in this.args.model.relationshipsCache)) {
|
|
120
|
-
throw new Error(`${this.args.reflectionName} hasnt been loaded yet`)
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return this.args.model.relationshipsCache[this.args.reflectionName]
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
loaded() {
|
|
127
|
-
const {model, reflectionName} = this.args
|
|
128
|
-
|
|
129
|
-
if (reflectionName in model.relationships) {
|
|
130
|
-
return model.relationships[reflectionName]
|
|
131
|
-
} else if (reflectionName in model.relationshipsCache) {
|
|
132
|
-
return model.relationshipsCache[reflectionName]
|
|
133
|
-
} else if (model.isNewRecord()) {
|
|
134
|
-
const reflectionNameUnderscore = inflection.underscore(reflectionName)
|
|
135
|
-
|
|
136
|
-
// Initialize as empty and try again to return the empty result
|
|
137
|
-
this.set([])
|
|
138
|
-
|
|
139
|
-
return digg(model.relationships, reflectionNameUnderscore)
|
|
140
|
-
} else {
|
|
141
|
-
const relationshipsLoaded = uniqunize(Object.keys(model.relationships).concat(Object.keys(model.relationshipsCache)))
|
|
142
|
-
|
|
143
|
-
throw new Error(`${reflectionName} hasnt been loaded yet on ${model.modelClassData().name}. Loaded was: ${relationshipsLoaded.join(", ")}`)
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// Replaces the relationships with the given new collection.
|
|
148
|
-
set(newCollection) {
|
|
149
|
-
this.args.model.relationships[this.args.reflectionName] = newCollection
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// Pushes another model onto the given collection.
|
|
153
|
-
push(newModel) {
|
|
154
|
-
const {model, reflectionName} = this.args
|
|
155
|
-
|
|
156
|
-
if (!(reflectionName in model.relationships)) {
|
|
157
|
-
model.relationships[reflectionName] = []
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
if (!model.relationships[reflectionName].includes(newModel)) {
|
|
161
|
-
model.relationships[reflectionName].push(newModel)
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
// Array shortcuts
|
|
166
|
-
find = (...args) => this.loaded().find(...args)
|
|
167
|
-
forEach = (...args) => this.loaded().forEach(...args)
|
|
168
|
-
map = (...args) => this.loaded().map(...args)
|
|
169
|
-
|
|
170
|
-
preload(preloadValue) {
|
|
171
|
-
return this._merge({preload: preloadValue})
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
page(page) {
|
|
175
|
-
if (!page) page = 1
|
|
176
|
-
|
|
177
|
-
return this._merge({page})
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
pageKey(pageKey) {
|
|
181
|
-
return this._merge({pageKey})
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
isFiltered() {
|
|
185
|
-
const {queryArgs} = this
|
|
186
|
-
|
|
187
|
-
if (
|
|
188
|
-
queryArgs.accessibleBy ||
|
|
189
|
-
queryArgs.count ||
|
|
190
|
-
queryArgs.limit ||
|
|
191
|
-
queryArgs.page ||
|
|
192
|
-
queryArgs.params ||
|
|
193
|
-
queryArgs.per ||
|
|
194
|
-
queryArgs.ransack ||
|
|
195
|
-
queryArgs.search
|
|
196
|
-
) {
|
|
197
|
-
return true
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
return false
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
params() {
|
|
204
|
-
let params = {}
|
|
205
|
-
|
|
206
|
-
if (this.queryArgs.params) params = incorporate(params, this.queryArgs.params)
|
|
207
|
-
if (this.queryArgs.abilities) params.abilities = this.queryArgs.abilities
|
|
208
|
-
if (this.queryArgs.accessibleBy) params.accessible_by = inflection.underscore(this.queryArgs.accessibleBy)
|
|
209
|
-
if (this.queryArgs.count) params.count = this.queryArgs.count
|
|
210
|
-
if (this.queryArgs.distinct) params.distinct = this.queryArgs.distinct
|
|
211
|
-
if (this.queryArgs.groupBy) params.group_by = this.queryArgs.groupBy
|
|
212
|
-
if (this.queryArgs.ransack) params.q = this.queryArgs.ransack
|
|
213
|
-
if (this.queryArgs.limit) params.limit = this.queryArgs.limit
|
|
214
|
-
if (this.queryArgs.preload) params.preload = this.queryArgs.preload
|
|
215
|
-
if (this.queryArgs.page) params.page = this.queryArgs.page
|
|
216
|
-
if (this.queryArgs.per) params.per = this.queryArgs.per
|
|
217
|
-
if (this.queryArgs.search) params.search = this.queryArgs.search
|
|
218
|
-
if (this.queryArgs.select) params.select = this.queryArgs.select
|
|
219
|
-
if (this.queryArgs.selectColumns) params.select_columns = this.queryArgs.selectColumns
|
|
220
|
-
|
|
221
|
-
return params
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
per(per) {
|
|
225
|
-
return this._merge({per})
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
perKey(perKey) {
|
|
229
|
-
return this._merge({perKey})
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
ransack(params) {
|
|
233
|
-
if (params) this._merge({ransack: params})
|
|
234
|
-
return this
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
async result() {
|
|
238
|
-
const response = await this._response()
|
|
239
|
-
const models = digg(response, "collection")
|
|
240
|
-
|
|
241
|
-
this._addQueryToModels(models)
|
|
242
|
-
|
|
243
|
-
const result = new Result({collection: this, models, response})
|
|
244
|
-
|
|
245
|
-
return result
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
search(params) {
|
|
249
|
-
if (params) this._merge({search: params})
|
|
250
|
-
return this
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
searchKey(searchKey) {
|
|
254
|
-
return this._merge({searchKey})
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
select(originalSelect) {
|
|
258
|
-
const newSelect = {}
|
|
259
|
-
|
|
260
|
-
for (const originalModelName in originalSelect) {
|
|
261
|
-
const newModelName = inflection.underscore(originalModelName)
|
|
262
|
-
const newValues = []
|
|
263
|
-
const originalValues = originalSelect[originalModelName]
|
|
264
|
-
|
|
265
|
-
for (const originalAttributeName of originalValues) {
|
|
266
|
-
const newAttributeName = inflection.underscore(originalAttributeName)
|
|
267
|
-
newValues.push(newAttributeName)
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
newSelect[newModelName] = newValues
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
return this._merge({select: newSelect})
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
selectColumns(originalSelect) {
|
|
277
|
-
const newSelect = {}
|
|
278
|
-
|
|
279
|
-
for (const originalModelName in originalSelect) {
|
|
280
|
-
const newModelName = inflection.underscore(inflection.underscore(originalModelName))
|
|
281
|
-
const newValues = []
|
|
282
|
-
const originalValues = originalSelect[originalModelName]
|
|
283
|
-
|
|
284
|
-
for (const originalAttributeName of originalValues) {
|
|
285
|
-
const newAttributeName = inflection.underscore(originalAttributeName)
|
|
286
|
-
newValues.push(newAttributeName)
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
newSelect[newModelName] = newValues
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
return this._merge({selectColumns: newSelect})
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
sort(sortBy) {
|
|
296
|
-
return this._merge({ransack: {s: sortBy}})
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
async toArray() {
|
|
300
|
-
const response = await this._response()
|
|
301
|
-
const models = digg(response, "collection")
|
|
302
|
-
|
|
303
|
-
this._addQueryToModels(models)
|
|
304
|
-
|
|
305
|
-
return models
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
modelClass() {
|
|
309
|
-
const modelName = digg(this.args.modelClass.modelClassData(), "name")
|
|
310
|
-
|
|
311
|
-
return modelClassRequire(modelName)
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
clone() {
|
|
315
|
-
const clonedQueryArgs = cloneDeep(this.queryArgs)
|
|
316
|
-
|
|
317
|
-
return new ApiMakerCollection(this.args, clonedQueryArgs)
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
// This is needed when reloading a version of the model with the same selected attributes and preloads
|
|
321
|
-
_addQueryToModels(models) {
|
|
322
|
-
for (const model of models) {
|
|
323
|
-
model.collection = this
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
_merge(newQueryArgs) {
|
|
328
|
-
incorporate(this.queryArgs, newQueryArgs)
|
|
329
|
-
|
|
330
|
-
return this
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
_response() {
|
|
334
|
-
const modelClassData = this.args.modelClass.modelClassData()
|
|
335
|
-
|
|
336
|
-
return CommandsPool.addCommand(
|
|
337
|
-
{
|
|
338
|
-
args: this.params(),
|
|
339
|
-
command: `${modelClassData.collectionName}-index`,
|
|
340
|
-
collectionName: modelClassData.collectionName,
|
|
341
|
-
type: "index"
|
|
342
|
-
},
|
|
343
|
-
{}
|
|
344
|
-
)
|
|
345
|
-
}
|
|
346
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import objectToFormData from "object-to-formdata"
|
|
2
|
-
|
|
3
|
-
export default class ApiMakerCommandSubmitData {
|
|
4
|
-
constructor (data) {
|
|
5
|
-
this.data = data
|
|
6
|
-
this.filesCount = 0
|
|
7
|
-
this.jsonData = this.traverseObject(this.data, "json")
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
getFilesCount = () => this.filesCount
|
|
11
|
-
getJsonData = () => this.jsonData
|
|
12
|
-
|
|
13
|
-
getRawData () {
|
|
14
|
-
if (!this.rawData) {
|
|
15
|
-
this.rawData = this.traverseObject(this.data, "raw")
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return this.rawData
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
getFormData () {
|
|
22
|
-
const objectForFormData = this.getRawData() || {}
|
|
23
|
-
|
|
24
|
-
objectForFormData.json = JSON.stringify(this.getJsonData())
|
|
25
|
-
|
|
26
|
-
const formData = objectToFormData.serialize(objectForFormData)
|
|
27
|
-
|
|
28
|
-
return formData
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
convertDynamic (value, type) {
|
|
32
|
-
if (Array.isArray(value)) {
|
|
33
|
-
return this.traverseArray(value, type)
|
|
34
|
-
} else if (typeof value == "object" && value !== null && value.constructor.name == "Object") {
|
|
35
|
-
return this.traverseObject(value, type)
|
|
36
|
-
} else {
|
|
37
|
-
return value
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
shouldSkip (object, type) {
|
|
42
|
-
if (type == "json" && object instanceof File) {
|
|
43
|
-
this.filesCount += 1
|
|
44
|
-
return true
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
if (type == "raw" && !Array.isArray(object) && !this.isObject(object) && !(object instanceof File)) {
|
|
48
|
-
return true
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return false
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
isObject (value) {
|
|
55
|
-
if (typeof value == "object" && value !== null && value.constructor.name == "Object") {
|
|
56
|
-
return true
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return false
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
traverseArray (array, type) {
|
|
63
|
-
const newArray = []
|
|
64
|
-
|
|
65
|
-
for (const value of array) {
|
|
66
|
-
if (this.shouldSkip(value, type)) {
|
|
67
|
-
continue
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (Array.isArray(value)) {
|
|
71
|
-
newArray.push(this.convertDynamic(value, type))
|
|
72
|
-
} else if (this.isObject(value)) {
|
|
73
|
-
newArray.push(this.convertDynamic(value, type))
|
|
74
|
-
} else {
|
|
75
|
-
newArray.push(value)
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
return newArray
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
traverseObject (object, type) {
|
|
83
|
-
const newObject = {}
|
|
84
|
-
|
|
85
|
-
for (const key in object) {
|
|
86
|
-
const value = object[key]
|
|
87
|
-
|
|
88
|
-
if (this.shouldSkip(value, type)) {
|
|
89
|
-
continue
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (Array.isArray(value)) {
|
|
93
|
-
newObject[key] = this.convertDynamic(value, type)
|
|
94
|
-
} else if (this.isObject(value)) {
|
|
95
|
-
newObject[key] = this.convertDynamic(value, type)
|
|
96
|
-
} else {
|
|
97
|
-
newObject[key] = value
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return newObject
|
|
102
|
-
}
|
|
103
|
-
}
|
package/src/commands-pool.js
DELETED
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import Api from "./api"
|
|
2
|
-
import CommandSubmitData from "./command-submit-data"
|
|
3
|
-
import CustomError from "./custom-error"
|
|
4
|
-
import DestroyError from "./destroy-error"
|
|
5
|
-
import Deserializer from "./deserializer"
|
|
6
|
-
import {dig, digg} from "diggerize"
|
|
7
|
-
import events from "./events"
|
|
8
|
-
import FormDataObjectizer from "form-data-objectizer"
|
|
9
|
-
import RunLast from "./run-last"
|
|
10
|
-
import Serializer from "./serializer"
|
|
11
|
-
import SessionStatusUpdater from "./session-status-updater"
|
|
12
|
-
import ValidationError from "./validation-error"
|
|
13
|
-
import {ValidationErrors} from "./validation-errors"
|
|
14
|
-
|
|
15
|
-
const shared = {}
|
|
16
|
-
|
|
17
|
-
export default class ApiMakerCommandsPool {
|
|
18
|
-
static addCommand(data, args = {}) {
|
|
19
|
-
let pool
|
|
20
|
-
|
|
21
|
-
if (args.instant) {
|
|
22
|
-
pool = new ApiMakerCommandsPool()
|
|
23
|
-
} else {
|
|
24
|
-
pool = ApiMakerCommandsPool.current()
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const promiseResult = pool.addCommand(data)
|
|
28
|
-
|
|
29
|
-
if (args.instant) {
|
|
30
|
-
pool.flushRunLast.run()
|
|
31
|
-
} else {
|
|
32
|
-
pool.flushRunLast.queue()
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return promiseResult
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
static current() {
|
|
39
|
-
if (!shared.currentApiMakerCommandsPool) shared.currentApiMakerCommandsPool = new ApiMakerCommandsPool()
|
|
40
|
-
|
|
41
|
-
return shared.currentApiMakerCommandsPool
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
static flush() {
|
|
45
|
-
ApiMakerCommandsPool.current().flush()
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
constructor() {
|
|
49
|
-
this.flushCount = 0
|
|
50
|
-
this.pool = {}
|
|
51
|
-
this.poolData = {}
|
|
52
|
-
this.currentId = 1
|
|
53
|
-
this.globalRequestData = {}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
addCommand(data) {
|
|
57
|
-
const stack = Error().stack
|
|
58
|
-
|
|
59
|
-
return new Promise((resolve, reject) => {
|
|
60
|
-
const id = this.currentId
|
|
61
|
-
this.currentId += 1
|
|
62
|
-
|
|
63
|
-
const commandType = data.type
|
|
64
|
-
const commandName = data.command
|
|
65
|
-
const collectionName = data.collectionName
|
|
66
|
-
|
|
67
|
-
this.pool[id] = {resolve, reject, stack}
|
|
68
|
-
|
|
69
|
-
if (!this.poolData[commandType]) this.poolData[commandType] = {}
|
|
70
|
-
if (!this.poolData[commandType][collectionName]) this.poolData[commandType][collectionName] = {}
|
|
71
|
-
if (!this.poolData[commandType][collectionName][commandName]) this.poolData[commandType][collectionName][commandName] = {}
|
|
72
|
-
|
|
73
|
-
let args
|
|
74
|
-
|
|
75
|
-
if (data.args?.nodeName == "FORM") {
|
|
76
|
-
const formData = new FormData(data.args)
|
|
77
|
-
|
|
78
|
-
args = FormDataObjectizer.toObject(formData)
|
|
79
|
-
} else if (data.args instanceof FormData) {
|
|
80
|
-
args = FormDataObjectizer.toObject(data.args)
|
|
81
|
-
} else {
|
|
82
|
-
args = Serializer.serialize(data.args)
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
this.poolData[commandType][collectionName][commandName][id] = {
|
|
86
|
-
args,
|
|
87
|
-
primary_key: data.primaryKey,
|
|
88
|
-
id
|
|
89
|
-
}
|
|
90
|
-
})
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
commandsCount() {
|
|
94
|
-
return Object.keys(this.pool)
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
async sendRequest({commandSubmitData, url}) {
|
|
98
|
-
let response
|
|
99
|
-
|
|
100
|
-
for (let i = 0; i < 3; i++) {
|
|
101
|
-
if (commandSubmitData.getFilesCount() > 0) {
|
|
102
|
-
response = await Api.requestLocal({path: url, method: "POST", rawData: commandSubmitData.getFormData()})
|
|
103
|
-
} else {
|
|
104
|
-
response = await Api.requestLocal({path: url, method: "POST", data: commandSubmitData.getJsonData()})
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (response.success === false && response.type == "invalid_authenticity_token") {
|
|
108
|
-
console.log("Invalid authenticity token - try again")
|
|
109
|
-
await SessionStatusUpdater.current().updateSessionStatus()
|
|
110
|
-
continue
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
return response
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
throw new Error("Couldnt successfully execute request")
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
flush = async () => {
|
|
120
|
-
if (this.commandsCount() == 0) {
|
|
121
|
-
return
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
const currentPool = this.pool
|
|
125
|
-
const currentPoolData = this.poolData
|
|
126
|
-
|
|
127
|
-
this.pool = {}
|
|
128
|
-
this.poolData = {}
|
|
129
|
-
this.flushCount++
|
|
130
|
-
|
|
131
|
-
try {
|
|
132
|
-
const submitData = {pool: currentPoolData}
|
|
133
|
-
|
|
134
|
-
if (Object.keys(this.globalRequestData).length > 0)
|
|
135
|
-
submitData.global = this.globalRequestData
|
|
136
|
-
|
|
137
|
-
const commandSubmitData = new CommandSubmitData(submitData)
|
|
138
|
-
const url = "/api_maker/commands"
|
|
139
|
-
const response = await this.sendRequest({commandSubmitData, url})
|
|
140
|
-
|
|
141
|
-
for (const commandId in response.responses) {
|
|
142
|
-
const commandResponse = response.responses[commandId]
|
|
143
|
-
const commandResponseData = Deserializer.parse(commandResponse.data)
|
|
144
|
-
const commandData = currentPool[parseInt(commandId, 10)]
|
|
145
|
-
const responseType = commandResponse.type
|
|
146
|
-
|
|
147
|
-
if (commandResponseData && typeof commandResponseData == "object") {
|
|
148
|
-
const bugReportUrl = dig(commandResponseData, "bug_report_url")
|
|
149
|
-
|
|
150
|
-
if (bugReportUrl) {
|
|
151
|
-
console.log(`Bug report URL: ${bugReportUrl}`)
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
if (responseType == "success") {
|
|
156
|
-
commandData.resolve(commandResponseData)
|
|
157
|
-
} else if (responseType == "error") {
|
|
158
|
-
const error = new CustomError("Command error", {response: commandResponseData})
|
|
159
|
-
|
|
160
|
-
error.stack += "\n"
|
|
161
|
-
error.stack += commandData.stack.split("\n").slice(1).join("\n")
|
|
162
|
-
|
|
163
|
-
commandData.reject(error)
|
|
164
|
-
} else if (responseType == "failed") {
|
|
165
|
-
this.handleFailedResponse(commandData, commandResponseData)
|
|
166
|
-
} else {
|
|
167
|
-
throw new Error(`Unhandled response type: ${responseType}`)
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
} finally {
|
|
171
|
-
this.flushCount--
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
handleFailedResponse(commandData, commandResponseData) {
|
|
176
|
-
let error
|
|
177
|
-
|
|
178
|
-
if (commandResponseData.error_type == "destroy_error") {
|
|
179
|
-
error = new DestroyError(`Destroy failed`, {response: commandResponseData})
|
|
180
|
-
} else if (commandResponseData.error_type == "validation_error") {
|
|
181
|
-
const validationErrors = new ValidationErrors({
|
|
182
|
-
model: digg(commandResponseData, "model"),
|
|
183
|
-
validationErrors: digg(commandResponseData, "validation_errors")
|
|
184
|
-
})
|
|
185
|
-
error = new ValidationError(validationErrors, {response: commandResponseData})
|
|
186
|
-
|
|
187
|
-
events.emit("onValidationErrors", validationErrors)
|
|
188
|
-
} else {
|
|
189
|
-
let errorMessage
|
|
190
|
-
|
|
191
|
-
if (!commandResponseData.errors) { errorMessage = "Command failed" }
|
|
192
|
-
|
|
193
|
-
error = new CustomError(errorMessage, {response: commandResponseData})
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
commandData.reject(error)
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
isActive() {
|
|
200
|
-
if (this.commandsCount() > 0) {
|
|
201
|
-
return true
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
if (this.flushCount > 0) {
|
|
205
|
-
return true
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
return false
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
flushRunLast = new RunLast(this.flush)
|
|
212
|
-
}
|
package/src/compose.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export default function apiMakerCompose(wrappedComponentClass, ...funcs) {
|
|
2
|
-
if (!wrappedComponentClass) throw new Error("No 'wrappedComponentClass' given")
|
|
3
|
-
|
|
4
|
-
let currentComponentClass = wrappedComponentClass
|
|
5
|
-
|
|
6
|
-
for (const func of funcs) {
|
|
7
|
-
currentComponentClass = func(currentComponentClass)
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
return currentComponentClass
|
|
11
|
-
}
|