@seedgrid/fe-components 2026.11.1 → 2026.11.2
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/dist/ai/seedgrid-components.manifest.json +1180 -0
- package/dist/generated/compiledStyles.d.ts +1 -1
- package/dist/generated/compiledStyles.d.ts.map +1 -1
- package/dist/generated/compiledStyles.js +1 -1
- package/dist/i18n/en-US.d.ts.map +1 -1
- package/dist/i18n/en-US.js +29 -0
- package/dist/i18n/es.d.ts.map +1 -1
- package/dist/i18n/es.js +29 -0
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +29 -0
- package/dist/i18n/pt-BR.d.ts.map +1 -1
- package/dist/i18n/pt-BR.js +29 -0
- package/dist/i18n/pt-PT.d.ts.map +1 -1
- package/dist/i18n/pt-PT.js +29 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/inputs/SgCameraCapture.d.ts +25 -0
- package/dist/inputs/SgCameraCapture.d.ts.map +1 -0
- package/dist/inputs/SgCameraCapture.js +114 -0
- package/dist/inputs/SgCameraCapture.meta.d.ts +4 -0
- package/dist/inputs/SgCameraCapture.meta.d.ts.map +1 -0
- package/dist/inputs/SgCameraCapture.meta.js +63 -0
- package/dist/inputs/SgFileUpload.d.ts +69 -0
- package/dist/inputs/SgFileUpload.d.ts.map +1 -0
- package/dist/inputs/SgFileUpload.js +234 -0
- package/dist/inputs/SgFileUpload.meta.d.ts +4 -0
- package/dist/inputs/SgFileUpload.meta.d.ts.map +1 -0
- package/dist/inputs/SgFileUpload.meta.js +71 -0
- package/dist/inputs/SgImageUpload.d.ts +20 -0
- package/dist/inputs/SgImageUpload.d.ts.map +1 -0
- package/dist/inputs/SgImageUpload.js +74 -0
- package/dist/inputs/SgImageUpload.meta.d.ts +4 -0
- package/dist/inputs/SgImageUpload.meta.d.ts.map +1 -0
- package/dist/inputs/SgImageUpload.meta.js +73 -0
- package/dist/inputs/SgInputDateTime.d.ts +29 -0
- package/dist/inputs/SgInputDateTime.d.ts.map +1 -0
- package/dist/inputs/SgInputDateTime.js +130 -0
- package/dist/inputs/SgInputDateTime.meta.d.ts +4 -0
- package/dist/inputs/SgInputDateTime.meta.d.ts.map +1 -0
- package/dist/inputs/SgInputDateTime.meta.js +73 -0
- package/dist/inputs/cameraLogic.d.ts +27 -0
- package/dist/inputs/cameraLogic.d.ts.map +1 -0
- package/dist/inputs/cameraLogic.js +57 -0
- package/dist/inputs/dateTimeLogic.d.ts +22 -0
- package/dist/inputs/dateTimeLogic.d.ts.map +1 -0
- package/dist/inputs/dateTimeLogic.js +140 -0
- package/dist/inputs/fileUploadLogic.d.ts +62 -0
- package/dist/inputs/fileUploadLogic.d.ts.map +1 -0
- package/dist/inputs/fileUploadLogic.js +254 -0
- package/dist/inputs/imageUploadLogic.d.ts +31 -0
- package/dist/inputs/imageUploadLogic.d.ts.map +1 -0
- package/dist/inputs/imageUploadLogic.js +70 -0
- package/dist/menus/SgDockMenu.d.ts.map +1 -1
- package/dist/menus/SgDockMenu.js +2 -0
- package/dist/sandbox.cjs +62 -51
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -5038,6 +5038,1186 @@
|
|
|
5038
5038
|
}
|
|
5039
5039
|
}
|
|
5040
5040
|
},
|
|
5041
|
+
{
|
|
5042
|
+
"componentId": "form.input.datetime",
|
|
5043
|
+
"exportName": "SgInputDateTime",
|
|
5044
|
+
"sgMeta": {
|
|
5045
|
+
"version": "0.1",
|
|
5046
|
+
"componentId": "form.input.datetime",
|
|
5047
|
+
"package": "@seedgrid/fe-components",
|
|
5048
|
+
"exportName": "SgInputDateTime",
|
|
5049
|
+
"slug": "sg-input-date-time",
|
|
5050
|
+
"displayName": "SgInputDateTime",
|
|
5051
|
+
"category": "input",
|
|
5052
|
+
"subcategory": "datetime",
|
|
5053
|
+
"description": "Campo de data e hora que entrega e recebe instantes ISO 8601 em UTC, exibindo a hora no fuso escolhido, com limites, passo de minutos e validacao.",
|
|
5054
|
+
"tags": [
|
|
5055
|
+
"form",
|
|
5056
|
+
"date",
|
|
5057
|
+
"time",
|
|
5058
|
+
"datetime",
|
|
5059
|
+
"rhf"
|
|
5060
|
+
],
|
|
5061
|
+
"capabilities": [
|
|
5062
|
+
"rhf",
|
|
5063
|
+
"controlled",
|
|
5064
|
+
"min-max",
|
|
5065
|
+
"time-zone",
|
|
5066
|
+
"minute-step",
|
|
5067
|
+
"iso-utc"
|
|
5068
|
+
],
|
|
5069
|
+
"fieldSemantics": [
|
|
5070
|
+
"dateTime",
|
|
5071
|
+
"timestamp",
|
|
5072
|
+
"schedule",
|
|
5073
|
+
"appointment",
|
|
5074
|
+
"deadline"
|
|
5075
|
+
],
|
|
5076
|
+
"props": [
|
|
5077
|
+
{
|
|
5078
|
+
"name": "id",
|
|
5079
|
+
"type": "string",
|
|
5080
|
+
"required": true,
|
|
5081
|
+
"description": "Identificador unico do campo.",
|
|
5082
|
+
"semanticRole": "data",
|
|
5083
|
+
"bindable": false
|
|
5084
|
+
},
|
|
5085
|
+
{
|
|
5086
|
+
"name": "name",
|
|
5087
|
+
"type": "string",
|
|
5088
|
+
"required": false,
|
|
5089
|
+
"description": "Nome do campo para formularios.",
|
|
5090
|
+
"semanticRole": "data",
|
|
5091
|
+
"bindable": true
|
|
5092
|
+
},
|
|
5093
|
+
{
|
|
5094
|
+
"name": "label",
|
|
5095
|
+
"type": "string",
|
|
5096
|
+
"required": false,
|
|
5097
|
+
"description": "Rotulo principal exibido ao usuario.",
|
|
5098
|
+
"semanticRole": "label",
|
|
5099
|
+
"bindable": true
|
|
5100
|
+
},
|
|
5101
|
+
{
|
|
5102
|
+
"name": "value",
|
|
5103
|
+
"type": "string | Date | null",
|
|
5104
|
+
"required": false,
|
|
5105
|
+
"description": "Instante controlado (ISO 8601 ou Date).",
|
|
5106
|
+
"semanticRole": "data",
|
|
5107
|
+
"bindable": true
|
|
5108
|
+
},
|
|
5109
|
+
{
|
|
5110
|
+
"name": "defaultValue",
|
|
5111
|
+
"type": "string | Date | null",
|
|
5112
|
+
"required": false,
|
|
5113
|
+
"description": "Instante inicial (nao controlado).",
|
|
5114
|
+
"semanticRole": "data",
|
|
5115
|
+
"bindable": true
|
|
5116
|
+
},
|
|
5117
|
+
{
|
|
5118
|
+
"name": "required",
|
|
5119
|
+
"type": "boolean",
|
|
5120
|
+
"required": false,
|
|
5121
|
+
"default": false,
|
|
5122
|
+
"description": "Marca o campo como obrigatorio.",
|
|
5123
|
+
"semanticRole": "validation",
|
|
5124
|
+
"bindable": true
|
|
5125
|
+
},
|
|
5126
|
+
{
|
|
5127
|
+
"name": "minDate",
|
|
5128
|
+
"type": "string | Date",
|
|
5129
|
+
"required": false,
|
|
5130
|
+
"description": "Menor instante permitido.",
|
|
5131
|
+
"semanticRole": "validation",
|
|
5132
|
+
"bindable": true
|
|
5133
|
+
},
|
|
5134
|
+
{
|
|
5135
|
+
"name": "maxDate",
|
|
5136
|
+
"type": "string | Date",
|
|
5137
|
+
"required": false,
|
|
5138
|
+
"description": "Maior instante permitido.",
|
|
5139
|
+
"semanticRole": "validation",
|
|
5140
|
+
"bindable": true
|
|
5141
|
+
},
|
|
5142
|
+
{
|
|
5143
|
+
"name": "timeZone",
|
|
5144
|
+
"type": "string",
|
|
5145
|
+
"required": false,
|
|
5146
|
+
"default": "local",
|
|
5147
|
+
"description": "Fuso do campo: local, UTC, deslocamento (+03:00) ou nome IANA.",
|
|
5148
|
+
"semanticRole": "data",
|
|
5149
|
+
"bindable": true
|
|
5150
|
+
},
|
|
5151
|
+
{
|
|
5152
|
+
"name": "showSeconds",
|
|
5153
|
+
"type": "boolean",
|
|
5154
|
+
"required": false,
|
|
5155
|
+
"default": false,
|
|
5156
|
+
"description": "Mostra e aceita segundos.",
|
|
5157
|
+
"semanticRole": "appearance",
|
|
5158
|
+
"bindable": true
|
|
5159
|
+
},
|
|
5160
|
+
{
|
|
5161
|
+
"name": "minuteStep",
|
|
5162
|
+
"type": "number",
|
|
5163
|
+
"required": false,
|
|
5164
|
+
"description": "Passo dos minutos (5, 10, 15, 30).",
|
|
5165
|
+
"semanticRole": "validation",
|
|
5166
|
+
"bindable": true
|
|
5167
|
+
},
|
|
5168
|
+
{
|
|
5169
|
+
"name": "onChange",
|
|
5170
|
+
"type": "(value: string | null, local: string) => void",
|
|
5171
|
+
"required": false,
|
|
5172
|
+
"description": "Instante ISO UTC (ou null) e texto local do campo.",
|
|
5173
|
+
"semanticRole": "event",
|
|
5174
|
+
"bindable": false
|
|
5175
|
+
},
|
|
5176
|
+
{
|
|
5177
|
+
"name": "alwaysFloat",
|
|
5178
|
+
"type": "boolean",
|
|
5179
|
+
"required": false
|
|
5180
|
+
},
|
|
5181
|
+
{
|
|
5182
|
+
"name": "clearButton",
|
|
5183
|
+
"type": "boolean",
|
|
5184
|
+
"required": false
|
|
5185
|
+
},
|
|
5186
|
+
{
|
|
5187
|
+
"name": "enabled",
|
|
5188
|
+
"type": "boolean",
|
|
5189
|
+
"required": false
|
|
5190
|
+
},
|
|
5191
|
+
{
|
|
5192
|
+
"name": "error",
|
|
5193
|
+
"type": "string",
|
|
5194
|
+
"required": false
|
|
5195
|
+
},
|
|
5196
|
+
{
|
|
5197
|
+
"name": "filled",
|
|
5198
|
+
"type": "boolean",
|
|
5199
|
+
"required": false
|
|
5200
|
+
},
|
|
5201
|
+
{
|
|
5202
|
+
"name": "hintText",
|
|
5203
|
+
"type": "string",
|
|
5204
|
+
"required": false
|
|
5205
|
+
},
|
|
5206
|
+
{
|
|
5207
|
+
"name": "iconButtons",
|
|
5208
|
+
"type": "ReactNode[]",
|
|
5209
|
+
"required": false
|
|
5210
|
+
},
|
|
5211
|
+
{
|
|
5212
|
+
"name": "labelAlign",
|
|
5213
|
+
"type": "\"start\" | \"center\" | \"end\"",
|
|
5214
|
+
"required": false
|
|
5215
|
+
},
|
|
5216
|
+
{
|
|
5217
|
+
"name": "labelPosition",
|
|
5218
|
+
"type": "\"top\" | \"left\" | \"float\"",
|
|
5219
|
+
"required": false
|
|
5220
|
+
},
|
|
5221
|
+
{
|
|
5222
|
+
"name": "labelText",
|
|
5223
|
+
"type": "string",
|
|
5224
|
+
"required": false
|
|
5225
|
+
},
|
|
5226
|
+
{
|
|
5227
|
+
"name": "labelWidth",
|
|
5228
|
+
"type": "string | number",
|
|
5229
|
+
"required": false
|
|
5230
|
+
},
|
|
5231
|
+
{
|
|
5232
|
+
"name": "maxLength",
|
|
5233
|
+
"type": "number",
|
|
5234
|
+
"required": false
|
|
5235
|
+
},
|
|
5236
|
+
{
|
|
5237
|
+
"name": "maxLengthMessage",
|
|
5238
|
+
"type": "string",
|
|
5239
|
+
"required": false
|
|
5240
|
+
},
|
|
5241
|
+
{
|
|
5242
|
+
"name": "minLength",
|
|
5243
|
+
"type": "number",
|
|
5244
|
+
"required": false
|
|
5245
|
+
},
|
|
5246
|
+
{
|
|
5247
|
+
"name": "minLengthMessage",
|
|
5248
|
+
"type": "string",
|
|
5249
|
+
"required": false
|
|
5250
|
+
},
|
|
5251
|
+
{
|
|
5252
|
+
"name": "minNumberOfWords",
|
|
5253
|
+
"type": "number",
|
|
5254
|
+
"required": false
|
|
5255
|
+
},
|
|
5256
|
+
{
|
|
5257
|
+
"name": "minNumberOfWordsMessage",
|
|
5258
|
+
"type": "string",
|
|
5259
|
+
"required": false
|
|
5260
|
+
},
|
|
5261
|
+
{
|
|
5262
|
+
"name": "onClear",
|
|
5263
|
+
"type": "(() => void)",
|
|
5264
|
+
"required": false
|
|
5265
|
+
},
|
|
5266
|
+
{
|
|
5267
|
+
"name": "onEnter",
|
|
5268
|
+
"type": "((() => void) & (() => void))",
|
|
5269
|
+
"required": false,
|
|
5270
|
+
"description": "Disparado ao receber foco — padrao seedgrid."
|
|
5271
|
+
},
|
|
5272
|
+
{
|
|
5273
|
+
"name": "onExit",
|
|
5274
|
+
"type": "((() => void) & (() => void))",
|
|
5275
|
+
"required": false,
|
|
5276
|
+
"description": "Disparado ao perder o foco (apos validacao) — padrao seedgrid."
|
|
5277
|
+
},
|
|
5278
|
+
{
|
|
5279
|
+
"name": "onValidation",
|
|
5280
|
+
"type": "((message: string | null) => void)",
|
|
5281
|
+
"required": false
|
|
5282
|
+
},
|
|
5283
|
+
{
|
|
5284
|
+
"name": "placeholder",
|
|
5285
|
+
"type": "string",
|
|
5286
|
+
"required": false
|
|
5287
|
+
},
|
|
5288
|
+
{
|
|
5289
|
+
"name": "prefixIcon",
|
|
5290
|
+
"type": "ReactNode",
|
|
5291
|
+
"required": false
|
|
5292
|
+
},
|
|
5293
|
+
{
|
|
5294
|
+
"name": "prefixText",
|
|
5295
|
+
"type": "string",
|
|
5296
|
+
"required": false
|
|
5297
|
+
},
|
|
5298
|
+
{
|
|
5299
|
+
"name": "readOnly",
|
|
5300
|
+
"type": "boolean",
|
|
5301
|
+
"required": false
|
|
5302
|
+
},
|
|
5303
|
+
{
|
|
5304
|
+
"name": "requiredMessage",
|
|
5305
|
+
"type": "string",
|
|
5306
|
+
"required": false
|
|
5307
|
+
},
|
|
5308
|
+
{
|
|
5309
|
+
"name": "showCharCounter",
|
|
5310
|
+
"type": "boolean",
|
|
5311
|
+
"required": false
|
|
5312
|
+
},
|
|
5313
|
+
{
|
|
5314
|
+
"name": "suffixText",
|
|
5315
|
+
"type": "string",
|
|
5316
|
+
"required": false
|
|
5317
|
+
},
|
|
5318
|
+
{
|
|
5319
|
+
"name": "textInputType",
|
|
5320
|
+
"type": "\"none\" | \"text\" | \"email\" | \"search\" | \"tel\" | \"url\" | \"numeric\" | \"decimal\"",
|
|
5321
|
+
"required": false
|
|
5322
|
+
},
|
|
5323
|
+
{
|
|
5324
|
+
"name": "validateOnBlur",
|
|
5325
|
+
"type": "boolean",
|
|
5326
|
+
"required": false
|
|
5327
|
+
},
|
|
5328
|
+
{
|
|
5329
|
+
"name": "validation",
|
|
5330
|
+
"type": "((value: string) => string | null)",
|
|
5331
|
+
"required": false
|
|
5332
|
+
},
|
|
5333
|
+
{
|
|
5334
|
+
"name": "width",
|
|
5335
|
+
"type": "string | number",
|
|
5336
|
+
"required": false
|
|
5337
|
+
},
|
|
5338
|
+
{
|
|
5339
|
+
"name": "withBorder",
|
|
5340
|
+
"type": "boolean",
|
|
5341
|
+
"required": false
|
|
5342
|
+
}
|
|
5343
|
+
],
|
|
5344
|
+
"states": [
|
|
5345
|
+
"default",
|
|
5346
|
+
"focused",
|
|
5347
|
+
"disabled",
|
|
5348
|
+
"readOnly",
|
|
5349
|
+
"error"
|
|
5350
|
+
],
|
|
5351
|
+
"examples": [
|
|
5352
|
+
{
|
|
5353
|
+
"id": "basic",
|
|
5354
|
+
"title": "Basico",
|
|
5355
|
+
"file": "apps/showcase/src/app/components/sg-input-date-time/samples/basico.tsx.sample",
|
|
5356
|
+
"kind": "sample"
|
|
5357
|
+
},
|
|
5358
|
+
{
|
|
5359
|
+
"id": "playground",
|
|
5360
|
+
"title": "Playground",
|
|
5361
|
+
"file": "apps/showcase/src/app/components/sg-input-date-time/sg-input-date-time.tsx.playground",
|
|
5362
|
+
"kind": "playground"
|
|
5363
|
+
}
|
|
5364
|
+
],
|
|
5365
|
+
"showcase": {
|
|
5366
|
+
"route": "/components/sg-input-date-time",
|
|
5367
|
+
"hasPlayground": true,
|
|
5368
|
+
"hasPropsTable": true
|
|
5369
|
+
},
|
|
5370
|
+
"sdui": {
|
|
5371
|
+
"rendererType": "field.datetime",
|
|
5372
|
+
"acceptsDataBinding": true,
|
|
5373
|
+
"defaultProps": {
|
|
5374
|
+
"labelPosition": "float",
|
|
5375
|
+
"clearButton": true
|
|
5376
|
+
}
|
|
5377
|
+
}
|
|
5378
|
+
},
|
|
5379
|
+
"aiHints": {
|
|
5380
|
+
"version": "0.1",
|
|
5381
|
+
"preferredUseCases": [
|
|
5382
|
+
"Agendamentos, compromissos e prazos que exigem data e hora.",
|
|
5383
|
+
"Campos de timestamp que precisam trafegar como instante UTC.",
|
|
5384
|
+
"Formularios com limites de data e hora e fuso explicito."
|
|
5385
|
+
],
|
|
5386
|
+
"avoidUseCases": [
|
|
5387
|
+
"Somente data; prefira SgInputDate.",
|
|
5388
|
+
"Somente hora do dia sem data; prefira um campo de hora.",
|
|
5389
|
+
"Texto livre; prefira SgInputText."
|
|
5390
|
+
],
|
|
5391
|
+
"synonyms": [
|
|
5392
|
+
"datetime input",
|
|
5393
|
+
"date time picker",
|
|
5394
|
+
"timestamp field",
|
|
5395
|
+
"appointment field"
|
|
5396
|
+
],
|
|
5397
|
+
"relatedEntityFields": [
|
|
5398
|
+
"createdAt",
|
|
5399
|
+
"scheduledAt",
|
|
5400
|
+
"startsAt",
|
|
5401
|
+
"endsAt",
|
|
5402
|
+
"dueAt",
|
|
5403
|
+
"timestamp"
|
|
5404
|
+
],
|
|
5405
|
+
"compositionHints": [
|
|
5406
|
+
"Combinar dois campos (inicio/fim) com minDate/maxDate para intervalos.",
|
|
5407
|
+
"Usar dentro de SgPanel em formularios de agenda."
|
|
5408
|
+
],
|
|
5409
|
+
"rankingSignals": {
|
|
5410
|
+
"freeText": 0,
|
|
5411
|
+
"structuredChoice": 0.1,
|
|
5412
|
+
"date": 0.95,
|
|
5413
|
+
"number": 0,
|
|
5414
|
+
"denseLayout": 0.7
|
|
5415
|
+
}
|
|
5416
|
+
}
|
|
5417
|
+
},
|
|
5418
|
+
{
|
|
5419
|
+
"componentId": "form.input.file-upload",
|
|
5420
|
+
"exportName": "SgFileUpload",
|
|
5421
|
+
"sgMeta": {
|
|
5422
|
+
"version": "0.1",
|
|
5423
|
+
"componentId": "form.input.file-upload",
|
|
5424
|
+
"package": "@seedgrid/fe-components",
|
|
5425
|
+
"exportName": "SgFileUpload",
|
|
5426
|
+
"slug": "sg-file-upload",
|
|
5427
|
+
"displayName": "SgFileUpload",
|
|
5428
|
+
"category": "input",
|
|
5429
|
+
"subcategory": "file",
|
|
5430
|
+
"description": "Seleciona um ou varios arquivos (clique ou arrastar e soltar), confere o tipo pelo conteudo e valida quantidade e tamanho (por arquivo e total). Mostra a lista com o icone do tipo e permite remover. Nao envia nada ao servidor: entrega os arquivos ao pai.",
|
|
5431
|
+
"tags": [
|
|
5432
|
+
"form",
|
|
5433
|
+
"file",
|
|
5434
|
+
"upload",
|
|
5435
|
+
"attachment",
|
|
5436
|
+
"document",
|
|
5437
|
+
"pdf",
|
|
5438
|
+
"spreadsheet",
|
|
5439
|
+
"rhf"
|
|
5440
|
+
],
|
|
5441
|
+
"capabilities": [
|
|
5442
|
+
"rhf",
|
|
5443
|
+
"controlled",
|
|
5444
|
+
"drag-and-drop",
|
|
5445
|
+
"multiple",
|
|
5446
|
+
"validation"
|
|
5447
|
+
],
|
|
5448
|
+
"fieldSemantics": [
|
|
5449
|
+
"file",
|
|
5450
|
+
"attachment",
|
|
5451
|
+
"document",
|
|
5452
|
+
"upload",
|
|
5453
|
+
"pdf",
|
|
5454
|
+
"spreadsheet"
|
|
5455
|
+
],
|
|
5456
|
+
"props": [
|
|
5457
|
+
{
|
|
5458
|
+
"name": "id",
|
|
5459
|
+
"type": "string",
|
|
5460
|
+
"required": true,
|
|
5461
|
+
"description": "Identificador unico do campo.",
|
|
5462
|
+
"semanticRole": "data",
|
|
5463
|
+
"bindable": false
|
|
5464
|
+
},
|
|
5465
|
+
{
|
|
5466
|
+
"name": "name",
|
|
5467
|
+
"type": "string",
|
|
5468
|
+
"required": false,
|
|
5469
|
+
"description": "Nome do campo para formularios.",
|
|
5470
|
+
"semanticRole": "data",
|
|
5471
|
+
"bindable": true
|
|
5472
|
+
},
|
|
5473
|
+
{
|
|
5474
|
+
"name": "label",
|
|
5475
|
+
"type": "string",
|
|
5476
|
+
"required": false,
|
|
5477
|
+
"description": "Rotulo exibido acima da area.",
|
|
5478
|
+
"semanticRole": "label",
|
|
5479
|
+
"bindable": true
|
|
5480
|
+
},
|
|
5481
|
+
{
|
|
5482
|
+
"name": "value",
|
|
5483
|
+
"type": "SgFileValue[] | null",
|
|
5484
|
+
"required": false,
|
|
5485
|
+
"description": "Arquivos controlados (sempre lista; um arquivo = lista de um). Um arquivo ja salvo entra como { name, url }.",
|
|
5486
|
+
"semanticRole": "data",
|
|
5487
|
+
"bindable": true
|
|
5488
|
+
},
|
|
5489
|
+
{
|
|
5490
|
+
"name": "mediaType",
|
|
5491
|
+
"type": "MediaType[]",
|
|
5492
|
+
"required": false,
|
|
5493
|
+
"description": "Tipos aceitos: image, video, audio, pdf, doc, docx, xls, xlsx, ppt, pptx, csv, txt, zip ou all. O tipo e conferido pelo conteudo do arquivo.",
|
|
5494
|
+
"semanticRole": "validation",
|
|
5495
|
+
"bindable": true
|
|
5496
|
+
},
|
|
5497
|
+
{
|
|
5498
|
+
"name": "accept",
|
|
5499
|
+
"type": "string",
|
|
5500
|
+
"required": false,
|
|
5501
|
+
"description": "Tipos extras em texto livre (.pdf, image/png, image/*), separados por virgula; soma-se ao mediaType.",
|
|
5502
|
+
"semanticRole": "validation",
|
|
5503
|
+
"bindable": true
|
|
5504
|
+
},
|
|
5505
|
+
{
|
|
5506
|
+
"name": "maxFiles",
|
|
5507
|
+
"type": "number",
|
|
5508
|
+
"required": false,
|
|
5509
|
+
"default": 1,
|
|
5510
|
+
"description": "Quantos arquivos o campo guarda. Com 1, escolher outro substitui; maior que 1 liga a selecao multipla.",
|
|
5511
|
+
"semanticRole": "validation",
|
|
5512
|
+
"bindable": true
|
|
5513
|
+
},
|
|
5514
|
+
{
|
|
5515
|
+
"name": "maxSizePerFile",
|
|
5516
|
+
"type": "SizeLimit",
|
|
5517
|
+
"required": false,
|
|
5518
|
+
"description": "Tamanho maximo de cada arquivo: bytes (numero) ou texto com unidade (\"500KB\", \"1.5MB\", \"1GB\").",
|
|
5519
|
+
"semanticRole": "validation",
|
|
5520
|
+
"bindable": true
|
|
5521
|
+
},
|
|
5522
|
+
{
|
|
5523
|
+
"name": "maxSizeTotal",
|
|
5524
|
+
"type": "SizeLimit",
|
|
5525
|
+
"required": false,
|
|
5526
|
+
"description": "Tamanho maximo da soma dos arquivos: bytes (numero) ou texto com unidade.",
|
|
5527
|
+
"semanticRole": "validation",
|
|
5528
|
+
"bindable": true
|
|
5529
|
+
},
|
|
5530
|
+
{
|
|
5531
|
+
"name": "disabled",
|
|
5532
|
+
"type": "boolean",
|
|
5533
|
+
"required": false,
|
|
5534
|
+
"default": false,
|
|
5535
|
+
"description": "Desabilita a escolha e a remocao.",
|
|
5536
|
+
"semanticRole": "appearance",
|
|
5537
|
+
"bindable": true
|
|
5538
|
+
},
|
|
5539
|
+
{
|
|
5540
|
+
"name": "onChange",
|
|
5541
|
+
"type": "(files: SgFileValue[]) => void",
|
|
5542
|
+
"required": false,
|
|
5543
|
+
"description": "Lista de arquivos validos apos escolher ou remover.",
|
|
5544
|
+
"semanticRole": "event",
|
|
5545
|
+
"bindable": false
|
|
5546
|
+
},
|
|
5547
|
+
{
|
|
5548
|
+
"name": "onError",
|
|
5549
|
+
"type": "(code: FileErrorCode, message: string, fileName: string) => void",
|
|
5550
|
+
"required": false,
|
|
5551
|
+
"description": "Arquivo recusado (type, size, total, count). Os demais seguem validos.",
|
|
5552
|
+
"semanticRole": "event",
|
|
5553
|
+
"bindable": false
|
|
5554
|
+
},
|
|
5555
|
+
{
|
|
5556
|
+
"name": "defaultValue",
|
|
5557
|
+
"type": "SgFileValue[]",
|
|
5558
|
+
"required": false,
|
|
5559
|
+
"description": "Arquivos iniciais (campo nao controlado)."
|
|
5560
|
+
},
|
|
5561
|
+
{
|
|
5562
|
+
"name": "dropManyTextKey",
|
|
5563
|
+
"type": "string",
|
|
5564
|
+
"required": false
|
|
5565
|
+
},
|
|
5566
|
+
{
|
|
5567
|
+
"name": "dropTextKey",
|
|
5568
|
+
"type": "string",
|
|
5569
|
+
"required": false,
|
|
5570
|
+
"description": "Chaves de i18n do texto da area vazia (um arquivo / varios)."
|
|
5571
|
+
},
|
|
5572
|
+
{
|
|
5573
|
+
"name": "error",
|
|
5574
|
+
"type": "string",
|
|
5575
|
+
"required": false
|
|
5576
|
+
},
|
|
5577
|
+
{
|
|
5578
|
+
"name": "extraCheck",
|
|
5579
|
+
"type": "((file: File, info: { mime: string; }) => Promise<SgFileRejection | null>)",
|
|
5580
|
+
"required": false,
|
|
5581
|
+
"description": "Regra extra, assincrona, por arquivo (depois da conferencia de tipo). E como o SgImageUpload confere dimensao."
|
|
5582
|
+
},
|
|
5583
|
+
{
|
|
5584
|
+
"name": "hintText",
|
|
5585
|
+
"type": "string",
|
|
5586
|
+
"required": false
|
|
5587
|
+
},
|
|
5588
|
+
{
|
|
5589
|
+
"name": "keyPrefix",
|
|
5590
|
+
"type": "string",
|
|
5591
|
+
"required": false,
|
|
5592
|
+
"description": "Prefixo do `data-sg` dos elementos internos (`sg-file`, `sg-image`)."
|
|
5593
|
+
},
|
|
5594
|
+
{
|
|
5595
|
+
"name": "labelText",
|
|
5596
|
+
"type": "string",
|
|
5597
|
+
"required": false
|
|
5598
|
+
},
|
|
5599
|
+
{
|
|
5600
|
+
"name": "onEnter",
|
|
5601
|
+
"type": "(() => void)",
|
|
5602
|
+
"required": false
|
|
5603
|
+
},
|
|
5604
|
+
{
|
|
5605
|
+
"name": "onExit",
|
|
5606
|
+
"type": "(() => void)",
|
|
5607
|
+
"required": false
|
|
5608
|
+
},
|
|
5609
|
+
{
|
|
5610
|
+
"name": "pickerAccept",
|
|
5611
|
+
"type": "string",
|
|
5612
|
+
"required": false,
|
|
5613
|
+
"description": "Valor do atributo `accept` do seletor do navegador (padrao: derivado de mediaType/accept)."
|
|
5614
|
+
},
|
|
5615
|
+
{
|
|
5616
|
+
"name": "readOnly",
|
|
5617
|
+
"type": "boolean",
|
|
5618
|
+
"required": false
|
|
5619
|
+
},
|
|
5620
|
+
{
|
|
5621
|
+
"name": "required",
|
|
5622
|
+
"type": "boolean",
|
|
5623
|
+
"required": false
|
|
5624
|
+
},
|
|
5625
|
+
{
|
|
5626
|
+
"name": "requiredMessage",
|
|
5627
|
+
"type": "string",
|
|
5628
|
+
"required": false
|
|
5629
|
+
},
|
|
5630
|
+
{
|
|
5631
|
+
"name": "thumbnailBuilder",
|
|
5632
|
+
"type": "((file: SgFileValue, size: number) => ReactNode)",
|
|
5633
|
+
"required": false,
|
|
5634
|
+
"description": "Miniatura de cada arquivo (sem ela, a lista usa o icone do tipo)."
|
|
5635
|
+
},
|
|
5636
|
+
{
|
|
5637
|
+
"name": "thumbnailSize",
|
|
5638
|
+
"type": "number",
|
|
5639
|
+
"required": false,
|
|
5640
|
+
"description": "Lado da miniatura em px (padrao 96)."
|
|
5641
|
+
},
|
|
5642
|
+
{
|
|
5643
|
+
"name": "typeNames",
|
|
5644
|
+
"type": "string",
|
|
5645
|
+
"required": false,
|
|
5646
|
+
"description": "Texto dos tipos aceitos na mensagem de tipo recusado (padrao: mediaType/accept)."
|
|
5647
|
+
}
|
|
5648
|
+
],
|
|
5649
|
+
"states": [
|
|
5650
|
+
"default",
|
|
5651
|
+
"focused",
|
|
5652
|
+
"loading",
|
|
5653
|
+
"disabled",
|
|
5654
|
+
"readOnly",
|
|
5655
|
+
"error"
|
|
5656
|
+
],
|
|
5657
|
+
"examples": [
|
|
5658
|
+
{
|
|
5659
|
+
"id": "basic",
|
|
5660
|
+
"title": "Basico",
|
|
5661
|
+
"file": "apps/showcase/src/app/components/sg-file-upload/samples/basico.tsx.sample",
|
|
5662
|
+
"kind": "sample"
|
|
5663
|
+
},
|
|
5664
|
+
{
|
|
5665
|
+
"id": "many",
|
|
5666
|
+
"title": "Varios arquivos",
|
|
5667
|
+
"file": "apps/showcase/src/app/components/sg-file-upload/samples/varios.tsx.sample",
|
|
5668
|
+
"kind": "sample"
|
|
5669
|
+
},
|
|
5670
|
+
{
|
|
5671
|
+
"id": "playground",
|
|
5672
|
+
"title": "Playground",
|
|
5673
|
+
"file": "apps/showcase/src/app/components/sg-file-upload/sg-file-upload.tsx.playground",
|
|
5674
|
+
"kind": "playground"
|
|
5675
|
+
}
|
|
5676
|
+
],
|
|
5677
|
+
"showcase": {
|
|
5678
|
+
"route": "/components/sg-file-upload",
|
|
5679
|
+
"hasPlayground": true,
|
|
5680
|
+
"hasPropsTable": true
|
|
5681
|
+
},
|
|
5682
|
+
"sdui": {
|
|
5683
|
+
"rendererType": "field.file",
|
|
5684
|
+
"acceptsDataBinding": true,
|
|
5685
|
+
"defaultProps": {}
|
|
5686
|
+
}
|
|
5687
|
+
},
|
|
5688
|
+
"aiHints": {
|
|
5689
|
+
"version": "0.1",
|
|
5690
|
+
"preferredUseCases": [
|
|
5691
|
+
"Anexar um ou varios documentos (PDF, planilhas, apresentacoes, zip) a um cadastro ou solicitacao.",
|
|
5692
|
+
"Escolher arquivos validando tipo (pelo conteudo), quantidade e tamanho antes de enviar.",
|
|
5693
|
+
"Formularios que precisam de arquivos como campo."
|
|
5694
|
+
],
|
|
5695
|
+
"avoidUseCases": [
|
|
5696
|
+
"Fotos e imagens com miniatura, dimensao minima ou proporcao; para isso use SgImageUpload.",
|
|
5697
|
+
"Capturar pela camera do dispositivo; para isso use SgCameraCapture.",
|
|
5698
|
+
"Envio ao servidor ou progresso de upload; nao fazem parte do componente."
|
|
5699
|
+
],
|
|
5700
|
+
"synonyms": [
|
|
5701
|
+
"file upload",
|
|
5702
|
+
"attachment",
|
|
5703
|
+
"anexar arquivo",
|
|
5704
|
+
"upload de arquivo",
|
|
5705
|
+
"documento",
|
|
5706
|
+
"file picker"
|
|
5707
|
+
],
|
|
5708
|
+
"relatedEntityFields": [
|
|
5709
|
+
"attachment",
|
|
5710
|
+
"document",
|
|
5711
|
+
"file",
|
|
5712
|
+
"contract",
|
|
5713
|
+
"invoice",
|
|
5714
|
+
"receipt"
|
|
5715
|
+
],
|
|
5716
|
+
"compositionHints": [
|
|
5717
|
+
"Envie os arquivos recebidos em onChange pelo servico de arquivos do host; o componente nunca envia sozinho.",
|
|
5718
|
+
"Para imagens com miniatura e regras de dimensao, use SgImageUpload (composicao deste componente)."
|
|
5719
|
+
],
|
|
5720
|
+
"rankingSignals": {
|
|
5721
|
+
"freeText": 0,
|
|
5722
|
+
"structuredChoice": 0.1,
|
|
5723
|
+
"date": 0,
|
|
5724
|
+
"number": 0,
|
|
5725
|
+
"denseLayout": 0.4
|
|
5726
|
+
}
|
|
5727
|
+
}
|
|
5728
|
+
},
|
|
5729
|
+
{
|
|
5730
|
+
"componentId": "form.input.image-upload",
|
|
5731
|
+
"exportName": "SgImageUpload",
|
|
5732
|
+
"sgMeta": {
|
|
5733
|
+
"version": "0.1",
|
|
5734
|
+
"componentId": "form.input.image-upload",
|
|
5735
|
+
"package": "@seedgrid/fe-components",
|
|
5736
|
+
"exportName": "SgImageUpload",
|
|
5737
|
+
"slug": "sg-image-upload",
|
|
5738
|
+
"displayName": "SgImageUpload",
|
|
5739
|
+
"category": "input",
|
|
5740
|
+
"subcategory": "file",
|
|
5741
|
+
"description": "Seleciona uma ou varias imagens (clique ou arrastar e soltar), valida tipo (pelo conteudo), tamanho, dimensao minima e proporcao, mostra as miniaturas e permite remover. Composicao do SgFileUpload. Nao envia nada ao servidor: entrega os arquivos ao pai.",
|
|
5742
|
+
"tags": [
|
|
5743
|
+
"form",
|
|
5744
|
+
"image",
|
|
5745
|
+
"upload",
|
|
5746
|
+
"photo",
|
|
5747
|
+
"avatar",
|
|
5748
|
+
"file",
|
|
5749
|
+
"rhf"
|
|
5750
|
+
],
|
|
5751
|
+
"capabilities": [
|
|
5752
|
+
"rhf",
|
|
5753
|
+
"controlled",
|
|
5754
|
+
"drag-and-drop",
|
|
5755
|
+
"preview",
|
|
5756
|
+
"validation"
|
|
5757
|
+
],
|
|
5758
|
+
"fieldSemantics": [
|
|
5759
|
+
"image",
|
|
5760
|
+
"photo",
|
|
5761
|
+
"avatar",
|
|
5762
|
+
"logo",
|
|
5763
|
+
"picture",
|
|
5764
|
+
"attachment"
|
|
5765
|
+
],
|
|
5766
|
+
"props": [
|
|
5767
|
+
{
|
|
5768
|
+
"name": "id",
|
|
5769
|
+
"type": "string",
|
|
5770
|
+
"required": true,
|
|
5771
|
+
"description": "Identificador unico do campo.",
|
|
5772
|
+
"semanticRole": "data",
|
|
5773
|
+
"bindable": false
|
|
5774
|
+
},
|
|
5775
|
+
{
|
|
5776
|
+
"name": "name",
|
|
5777
|
+
"type": "string",
|
|
5778
|
+
"required": false,
|
|
5779
|
+
"description": "Nome do campo para formularios.",
|
|
5780
|
+
"semanticRole": "data",
|
|
5781
|
+
"bindable": true
|
|
5782
|
+
},
|
|
5783
|
+
{
|
|
5784
|
+
"name": "label",
|
|
5785
|
+
"type": "string",
|
|
5786
|
+
"required": false,
|
|
5787
|
+
"description": "Rotulo exibido acima da area.",
|
|
5788
|
+
"semanticRole": "label",
|
|
5789
|
+
"bindable": true
|
|
5790
|
+
},
|
|
5791
|
+
{
|
|
5792
|
+
"name": "value",
|
|
5793
|
+
"type": "SgFileValue[] | null",
|
|
5794
|
+
"required": false,
|
|
5795
|
+
"description": "Imagens controladas (sempre lista; uma imagem = lista de uma). Uma imagem ja salva entra como { name, url }.",
|
|
5796
|
+
"semanticRole": "data",
|
|
5797
|
+
"bindable": true
|
|
5798
|
+
},
|
|
5799
|
+
{
|
|
5800
|
+
"name": "accept",
|
|
5801
|
+
"type": "string",
|
|
5802
|
+
"required": false,
|
|
5803
|
+
"description": "Restringe os formatos de imagem em texto livre (.png, image/jpeg), separados por virgula.",
|
|
5804
|
+
"semanticRole": "validation",
|
|
5805
|
+
"bindable": true
|
|
5806
|
+
},
|
|
5807
|
+
{
|
|
5808
|
+
"name": "maxFiles",
|
|
5809
|
+
"type": "number",
|
|
5810
|
+
"required": false,
|
|
5811
|
+
"default": 1,
|
|
5812
|
+
"description": "Quantas imagens o campo guarda. Com 1, escolher outra substitui; maior que 1 liga a selecao multipla e a grade de miniaturas.",
|
|
5813
|
+
"semanticRole": "validation",
|
|
5814
|
+
"bindable": true
|
|
5815
|
+
},
|
|
5816
|
+
{
|
|
5817
|
+
"name": "maxSizePerFile",
|
|
5818
|
+
"type": "SizeLimit",
|
|
5819
|
+
"required": false,
|
|
5820
|
+
"description": "Tamanho maximo de cada imagem: bytes (numero) ou texto com unidade (\"500KB\", \"2MB\").",
|
|
5821
|
+
"semanticRole": "validation",
|
|
5822
|
+
"bindable": true
|
|
5823
|
+
},
|
|
5824
|
+
{
|
|
5825
|
+
"name": "maxSizeTotal",
|
|
5826
|
+
"type": "SizeLimit",
|
|
5827
|
+
"required": false,
|
|
5828
|
+
"description": "Tamanho maximo da soma das imagens: bytes (numero) ou texto com unidade.",
|
|
5829
|
+
"semanticRole": "validation",
|
|
5830
|
+
"bindable": true
|
|
5831
|
+
},
|
|
5832
|
+
{
|
|
5833
|
+
"name": "minWidth",
|
|
5834
|
+
"type": "number",
|
|
5835
|
+
"required": false,
|
|
5836
|
+
"description": "Largura minima em px.",
|
|
5837
|
+
"semanticRole": "validation",
|
|
5838
|
+
"bindable": true
|
|
5839
|
+
},
|
|
5840
|
+
{
|
|
5841
|
+
"name": "minHeight",
|
|
5842
|
+
"type": "number",
|
|
5843
|
+
"required": false,
|
|
5844
|
+
"description": "Altura minima em px.",
|
|
5845
|
+
"semanticRole": "validation",
|
|
5846
|
+
"bindable": true
|
|
5847
|
+
},
|
|
5848
|
+
{
|
|
5849
|
+
"name": "aspect",
|
|
5850
|
+
"type": "number",
|
|
5851
|
+
"required": false,
|
|
5852
|
+
"description": "Proporcao largura/altura exigida (1 = quadrada).",
|
|
5853
|
+
"semanticRole": "validation",
|
|
5854
|
+
"bindable": true
|
|
5855
|
+
},
|
|
5856
|
+
{
|
|
5857
|
+
"name": "disabled",
|
|
5858
|
+
"type": "boolean",
|
|
5859
|
+
"required": false,
|
|
5860
|
+
"default": false,
|
|
5861
|
+
"description": "Desabilita a escolha e a remocao.",
|
|
5862
|
+
"semanticRole": "appearance",
|
|
5863
|
+
"bindable": true
|
|
5864
|
+
},
|
|
5865
|
+
{
|
|
5866
|
+
"name": "onChange",
|
|
5867
|
+
"type": "(files: SgFileValue[]) => void",
|
|
5868
|
+
"required": false,
|
|
5869
|
+
"description": "Lista de imagens validas apos escolher ou remover.",
|
|
5870
|
+
"semanticRole": "event",
|
|
5871
|
+
"bindable": false
|
|
5872
|
+
},
|
|
5873
|
+
{
|
|
5874
|
+
"name": "onError",
|
|
5875
|
+
"type": "(code: FileErrorCode, message: string, fileName: string) => void",
|
|
5876
|
+
"required": false,
|
|
5877
|
+
"description": "Imagem recusada (type, size, total, count, dimension, aspect). As demais seguem validas.",
|
|
5878
|
+
"semanticRole": "event",
|
|
5879
|
+
"bindable": false
|
|
5880
|
+
},
|
|
5881
|
+
{
|
|
5882
|
+
"name": "defaultValue",
|
|
5883
|
+
"type": "SgFileValue[]",
|
|
5884
|
+
"required": false,
|
|
5885
|
+
"description": "Arquivos iniciais (campo nao controlado)."
|
|
5886
|
+
},
|
|
5887
|
+
{
|
|
5888
|
+
"name": "error",
|
|
5889
|
+
"type": "string",
|
|
5890
|
+
"required": false
|
|
5891
|
+
},
|
|
5892
|
+
{
|
|
5893
|
+
"name": "hintText",
|
|
5894
|
+
"type": "string",
|
|
5895
|
+
"required": false
|
|
5896
|
+
},
|
|
5897
|
+
{
|
|
5898
|
+
"name": "labelText",
|
|
5899
|
+
"type": "string",
|
|
5900
|
+
"required": false
|
|
5901
|
+
},
|
|
5902
|
+
{
|
|
5903
|
+
"name": "onEnter",
|
|
5904
|
+
"type": "(() => void)",
|
|
5905
|
+
"required": false
|
|
5906
|
+
},
|
|
5907
|
+
{
|
|
5908
|
+
"name": "onExit",
|
|
5909
|
+
"type": "(() => void)",
|
|
5910
|
+
"required": false
|
|
5911
|
+
},
|
|
5912
|
+
{
|
|
5913
|
+
"name": "previewHeight",
|
|
5914
|
+
"type": "number",
|
|
5915
|
+
"required": false,
|
|
5916
|
+
"description": "Altura da miniatura em px (padrao 160; na grade, no maximo 120)."
|
|
5917
|
+
},
|
|
5918
|
+
{
|
|
5919
|
+
"name": "readOnly",
|
|
5920
|
+
"type": "boolean",
|
|
5921
|
+
"required": false
|
|
5922
|
+
},
|
|
5923
|
+
{
|
|
5924
|
+
"name": "required",
|
|
5925
|
+
"type": "boolean",
|
|
5926
|
+
"required": false
|
|
5927
|
+
},
|
|
5928
|
+
{
|
|
5929
|
+
"name": "requiredMessage",
|
|
5930
|
+
"type": "string",
|
|
5931
|
+
"required": false
|
|
5932
|
+
}
|
|
5933
|
+
],
|
|
5934
|
+
"states": [
|
|
5935
|
+
"default",
|
|
5936
|
+
"focused",
|
|
5937
|
+
"loading",
|
|
5938
|
+
"disabled",
|
|
5939
|
+
"readOnly",
|
|
5940
|
+
"error"
|
|
5941
|
+
],
|
|
5942
|
+
"examples": [
|
|
5943
|
+
{
|
|
5944
|
+
"id": "basic",
|
|
5945
|
+
"title": "Basico",
|
|
5946
|
+
"file": "apps/showcase/src/app/components/sg-image-upload/samples/basico.tsx.sample",
|
|
5947
|
+
"kind": "sample"
|
|
5948
|
+
},
|
|
5949
|
+
{
|
|
5950
|
+
"id": "many",
|
|
5951
|
+
"title": "Varias imagens",
|
|
5952
|
+
"file": "apps/showcase/src/app/components/sg-image-upload/samples/varias.tsx.sample",
|
|
5953
|
+
"kind": "sample"
|
|
5954
|
+
},
|
|
5955
|
+
{
|
|
5956
|
+
"id": "playground",
|
|
5957
|
+
"title": "Playground",
|
|
5958
|
+
"file": "apps/showcase/src/app/components/sg-image-upload/sg-image-upload.tsx.playground",
|
|
5959
|
+
"kind": "playground"
|
|
5960
|
+
}
|
|
5961
|
+
],
|
|
5962
|
+
"showcase": {
|
|
5963
|
+
"route": "/components/sg-image-upload",
|
|
5964
|
+
"hasPlayground": true,
|
|
5965
|
+
"hasPropsTable": true
|
|
5966
|
+
},
|
|
5967
|
+
"sdui": {
|
|
5968
|
+
"rendererType": "field.image",
|
|
5969
|
+
"acceptsDataBinding": true,
|
|
5970
|
+
"defaultProps": {}
|
|
5971
|
+
}
|
|
5972
|
+
},
|
|
5973
|
+
"aiHints": {
|
|
5974
|
+
"version": "0.1",
|
|
5975
|
+
"preferredUseCases": [
|
|
5976
|
+
"Foto de perfil, avatar, logotipo ou foto de documento com pre-visualizacao.",
|
|
5977
|
+
"Escolher uma ou varias imagens validando tipo, tamanho e dimensao antes de enviar.",
|
|
5978
|
+
"Formularios que precisam de imagens como campo."
|
|
5979
|
+
],
|
|
5980
|
+
"avoidUseCases": [
|
|
5981
|
+
"Arquivos que nao sao imagem (PDF, planilhas); nesses casos use SgFileUpload.",
|
|
5982
|
+
"Capturar pela camera do dispositivo; para isso use SgCameraCapture.",
|
|
5983
|
+
"Recorte ou compressao de imagem; nao fazem parte do componente."
|
|
5984
|
+
],
|
|
5985
|
+
"synonyms": [
|
|
5986
|
+
"image upload",
|
|
5987
|
+
"photo upload",
|
|
5988
|
+
"avatar picker",
|
|
5989
|
+
"enviar foto",
|
|
5990
|
+
"upload de imagem",
|
|
5991
|
+
"logo upload"
|
|
5992
|
+
],
|
|
5993
|
+
"relatedEntityFields": [
|
|
5994
|
+
"photo",
|
|
5995
|
+
"avatar",
|
|
5996
|
+
"logo",
|
|
5997
|
+
"image",
|
|
5998
|
+
"picture",
|
|
5999
|
+
"documentPhoto"
|
|
6000
|
+
],
|
|
6001
|
+
"compositionHints": [
|
|
6002
|
+
"Envie os arquivos recebidos em onChange pelo servico de arquivos do host; o componente nunca envia sozinho.",
|
|
6003
|
+
"Combine com SgPanel e SgInputText em cadastros de pessoa ou produto."
|
|
6004
|
+
],
|
|
6005
|
+
"rankingSignals": {
|
|
6006
|
+
"freeText": 0,
|
|
6007
|
+
"structuredChoice": 0.1,
|
|
6008
|
+
"date": 0,
|
|
6009
|
+
"number": 0,
|
|
6010
|
+
"denseLayout": 0.4
|
|
6011
|
+
}
|
|
6012
|
+
}
|
|
6013
|
+
},
|
|
6014
|
+
{
|
|
6015
|
+
"componentId": "form.input.camera-capture",
|
|
6016
|
+
"exportName": "SgCameraCapture",
|
|
6017
|
+
"sgMeta": {
|
|
6018
|
+
"version": "0.1",
|
|
6019
|
+
"componentId": "form.input.camera-capture",
|
|
6020
|
+
"package": "@seedgrid/fe-components",
|
|
6021
|
+
"exportName": "SgCameraCapture",
|
|
6022
|
+
"slug": "sg-camera-capture",
|
|
6023
|
+
"displayName": "SgCameraCapture",
|
|
6024
|
+
"category": "input",
|
|
6025
|
+
"subcategory": "camera",
|
|
6026
|
+
"description": "Pre-visualizacao da camera com guia de enquadramento (oval ou retangulo), alternancia entre frontal e traseira e captura que devolve a imagem ao pai. Mostra os estados sem permissao e sem camera. Nao envia nada ao servidor.",
|
|
6027
|
+
"tags": [
|
|
6028
|
+
"camera",
|
|
6029
|
+
"photo",
|
|
6030
|
+
"capture",
|
|
6031
|
+
"selfie",
|
|
6032
|
+
"getUserMedia",
|
|
6033
|
+
"input"
|
|
6034
|
+
],
|
|
6035
|
+
"capabilities": [
|
|
6036
|
+
"camera",
|
|
6037
|
+
"preview",
|
|
6038
|
+
"guide-overlay",
|
|
6039
|
+
"switch-camera",
|
|
6040
|
+
"capture"
|
|
6041
|
+
],
|
|
6042
|
+
"fieldSemantics": [
|
|
6043
|
+
"photo",
|
|
6044
|
+
"selfie",
|
|
6045
|
+
"picture",
|
|
6046
|
+
"documentPhoto",
|
|
6047
|
+
"avatar"
|
|
6048
|
+
],
|
|
6049
|
+
"props": [
|
|
6050
|
+
{
|
|
6051
|
+
"name": "id",
|
|
6052
|
+
"type": "string",
|
|
6053
|
+
"required": true,
|
|
6054
|
+
"description": "Identificador unico do componente.",
|
|
6055
|
+
"semanticRole": "data",
|
|
6056
|
+
"bindable": false
|
|
6057
|
+
},
|
|
6058
|
+
{
|
|
6059
|
+
"name": "label",
|
|
6060
|
+
"type": "string",
|
|
6061
|
+
"required": false,
|
|
6062
|
+
"description": "Rotulo exibido acima da pre-visualizacao.",
|
|
6063
|
+
"semanticRole": "label",
|
|
6064
|
+
"bindable": true
|
|
6065
|
+
},
|
|
6066
|
+
{
|
|
6067
|
+
"name": "facing",
|
|
6068
|
+
"type": "\"user\" | \"environment\"",
|
|
6069
|
+
"required": false,
|
|
6070
|
+
"default": "user",
|
|
6071
|
+
"description": "Camera inicial: frontal (user) ou traseira (environment).",
|
|
6072
|
+
"semanticRole": "appearance",
|
|
6073
|
+
"bindable": true
|
|
6074
|
+
},
|
|
6075
|
+
{
|
|
6076
|
+
"name": "guide",
|
|
6077
|
+
"type": "\"none\" | \"oval\" | \"rect\"",
|
|
6078
|
+
"required": false,
|
|
6079
|
+
"default": "none",
|
|
6080
|
+
"description": "Guia de enquadramento sobre a pre-visualizacao.",
|
|
6081
|
+
"semanticRole": "appearance",
|
|
6082
|
+
"bindable": true
|
|
6083
|
+
},
|
|
6084
|
+
{
|
|
6085
|
+
"name": "resolution",
|
|
6086
|
+
"type": "\"low\" | \"medium\" | \"high\"",
|
|
6087
|
+
"required": false,
|
|
6088
|
+
"default": "medium",
|
|
6089
|
+
"description": "Resolucao pedida (640x480, 1280x720, 1920x1080).",
|
|
6090
|
+
"semanticRole": "appearance",
|
|
6091
|
+
"bindable": true
|
|
6092
|
+
},
|
|
6093
|
+
{
|
|
6094
|
+
"name": "allowSwitch",
|
|
6095
|
+
"type": "boolean",
|
|
6096
|
+
"required": false,
|
|
6097
|
+
"default": true,
|
|
6098
|
+
"description": "Mostra o botao de alternar entre frontal e traseira.",
|
|
6099
|
+
"semanticRole": "appearance",
|
|
6100
|
+
"bindable": true
|
|
6101
|
+
},
|
|
6102
|
+
{
|
|
6103
|
+
"name": "previewHeight",
|
|
6104
|
+
"type": "number",
|
|
6105
|
+
"required": false,
|
|
6106
|
+
"default": 320,
|
|
6107
|
+
"description": "Altura da pre-visualizacao em px.",
|
|
6108
|
+
"semanticRole": "appearance",
|
|
6109
|
+
"bindable": true
|
|
6110
|
+
},
|
|
6111
|
+
{
|
|
6112
|
+
"name": "disabled",
|
|
6113
|
+
"type": "boolean",
|
|
6114
|
+
"required": false,
|
|
6115
|
+
"default": false,
|
|
6116
|
+
"description": "Nao abre a camera nem permite capturar.",
|
|
6117
|
+
"semanticRole": "appearance",
|
|
6118
|
+
"bindable": true
|
|
6119
|
+
},
|
|
6120
|
+
{
|
|
6121
|
+
"name": "onCapture",
|
|
6122
|
+
"type": "(image: Blob) => void",
|
|
6123
|
+
"required": false,
|
|
6124
|
+
"description": "Imagem JPEG capturada.",
|
|
6125
|
+
"semanticRole": "event",
|
|
6126
|
+
"bindable": false
|
|
6127
|
+
},
|
|
6128
|
+
{
|
|
6129
|
+
"name": "onError",
|
|
6130
|
+
"type": "(code, message) => void",
|
|
6131
|
+
"required": false,
|
|
6132
|
+
"description": "Camera indisponivel (permission, noCamera, failed).",
|
|
6133
|
+
"semanticRole": "event",
|
|
6134
|
+
"bindable": false
|
|
6135
|
+
},
|
|
6136
|
+
{
|
|
6137
|
+
"name": "hintText",
|
|
6138
|
+
"type": "string",
|
|
6139
|
+
"required": false
|
|
6140
|
+
},
|
|
6141
|
+
{
|
|
6142
|
+
"name": "labelText",
|
|
6143
|
+
"type": "string",
|
|
6144
|
+
"required": false
|
|
6145
|
+
}
|
|
6146
|
+
],
|
|
6147
|
+
"states": [
|
|
6148
|
+
"default",
|
|
6149
|
+
"starting",
|
|
6150
|
+
"ready",
|
|
6151
|
+
"permission",
|
|
6152
|
+
"noCamera",
|
|
6153
|
+
"failed",
|
|
6154
|
+
"disabled"
|
|
6155
|
+
],
|
|
6156
|
+
"examples": [
|
|
6157
|
+
{
|
|
6158
|
+
"id": "basic",
|
|
6159
|
+
"title": "Basico",
|
|
6160
|
+
"file": "apps/showcase/src/app/components/sg-camera-capture/samples/basico.tsx.sample",
|
|
6161
|
+
"kind": "sample"
|
|
6162
|
+
},
|
|
6163
|
+
{
|
|
6164
|
+
"id": "playground",
|
|
6165
|
+
"title": "Playground",
|
|
6166
|
+
"file": "apps/showcase/src/app/components/sg-camera-capture/sg-camera-capture.tsx.playground",
|
|
6167
|
+
"kind": "playground"
|
|
6168
|
+
}
|
|
6169
|
+
],
|
|
6170
|
+
"showcase": {
|
|
6171
|
+
"route": "/components/sg-camera-capture",
|
|
6172
|
+
"hasPlayground": true,
|
|
6173
|
+
"hasPropsTable": true
|
|
6174
|
+
},
|
|
6175
|
+
"sdui": {
|
|
6176
|
+
"rendererType": "field.camera",
|
|
6177
|
+
"acceptsDataBinding": false,
|
|
6178
|
+
"defaultProps": {}
|
|
6179
|
+
}
|
|
6180
|
+
},
|
|
6181
|
+
"aiHints": {
|
|
6182
|
+
"version": "0.1",
|
|
6183
|
+
"preferredUseCases": [
|
|
6184
|
+
"Tirar foto na hora (selfie, foto de documento, portaria) com guia de enquadramento.",
|
|
6185
|
+
"Fluxos que precisam da camera do dispositivo e de tratamento de permissao negada.",
|
|
6186
|
+
"Capturar uma imagem para entregar ao host enviar."
|
|
6187
|
+
],
|
|
6188
|
+
"avoidUseCases": [
|
|
6189
|
+
"Escolher uma imagem ja existente; para isso use SgImageUpload.",
|
|
6190
|
+
"Gravar video ou audio; o componente captura apenas fotos.",
|
|
6191
|
+
"Analise de qualidade ou reconhecimento facial; isso e do host."
|
|
6192
|
+
],
|
|
6193
|
+
"synonyms": [
|
|
6194
|
+
"camera",
|
|
6195
|
+
"tirar foto",
|
|
6196
|
+
"captura de foto",
|
|
6197
|
+
"selfie",
|
|
6198
|
+
"webcam",
|
|
6199
|
+
"take photo"
|
|
6200
|
+
],
|
|
6201
|
+
"relatedEntityFields": [
|
|
6202
|
+
"photo",
|
|
6203
|
+
"selfie",
|
|
6204
|
+
"documentPhoto",
|
|
6205
|
+
"avatar",
|
|
6206
|
+
"picture"
|
|
6207
|
+
],
|
|
6208
|
+
"compositionHints": [
|
|
6209
|
+
"Combine com SgImageUpload: camera para tirar na hora, upload para escolher da galeria.",
|
|
6210
|
+
"Envie o Blob recebido em onCapture pelo servico de arquivos do host."
|
|
6211
|
+
],
|
|
6212
|
+
"rankingSignals": {
|
|
6213
|
+
"freeText": 0,
|
|
6214
|
+
"structuredChoice": 0,
|
|
6215
|
+
"date": 0,
|
|
6216
|
+
"number": 0,
|
|
6217
|
+
"denseLayout": 0.3
|
|
6218
|
+
}
|
|
6219
|
+
}
|
|
6220
|
+
},
|
|
5041
6221
|
{
|
|
5042
6222
|
"componentId": "form.input.email",
|
|
5043
6223
|
"exportName": "SgInputEmail",
|